summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-04-15 08:49:08 +0200
committerJames Lopez <james@jameslopez.es>2016-04-15 08:49:08 +0200
commit05985b49a45ace4d43701e16a61e5cea74ac4a35 (patch)
tree9e7c0d487b92b63123d841fb5aa29a01ac4ef014 /lib
parente5f7a545308922bf790f1ef8becb6e8dcd573f95 (diff)
parent447a9050888c9712db847d4c52bc9977926faa2e (diff)
downloadgitlab-ce-05985b49a45ace4d43701e16a61e5cea74ac4a35.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/project-import_url
Diffstat (limited to 'lib')
-rw-r--r--lib/award_emoji.rb16
-rw-r--r--lib/gitlab/current_settings.rb3
-rw-r--r--lib/gitlab/repository_check_logger.rb7
-rw-r--r--lib/support/nginx/gitlab_ci29
4 files changed, 22 insertions, 33 deletions
diff --git a/lib/award_emoji.rb b/lib/award_emoji.rb
index 4fc3443ac68..5f8ff01b0a9 100644
--- a/lib/award_emoji.rb
+++ b/lib/award_emoji.rb
@@ -14,19 +14,29 @@ class AwardEmoji
food_drink: "Food"
}.with_indifferent_access
+ CATEGORY_ALIASES = {
+ symbols: "objects_symbols",
+ foods: "food_drink",
+ travel: "travel_places"
+ }.with_indifferent_access
+
def self.normilize_emoji_name(name)
aliases[name] || name
end
def self.emoji_by_category
unless @emoji_by_category
- @emoji_by_category = {}
+ @emoji_by_category = Hash.new { |h, key| h[key] = [] }
emojis.each do |emoji_name, data|
data["name"] = emoji_name
- @emoji_by_category[data["category"]] ||= []
- @emoji_by_category[data["category"]] << data
+ # Skip Fitzpatrick(tone) modifiers
+ next if data["category"] == "modifier"
+
+ category = CATEGORY_ALIASES[data["category"]] || data["category"]
+
+ @emoji_by_category[category] << data
end
@emoji_by_category = @emoji_by_category.sort.to_h
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index 1acc22fe5bf..f44d1b3a44e 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -34,7 +34,8 @@ module Gitlab
max_artifacts_size: Settings.artifacts['max_size'],
require_two_factor_authentication: false,
two_factor_grace_period: 48,
- akismet_enabled: false
+ akismet_enabled: false,
+ repository_checks_enabled: true,
)
end
diff --git a/lib/gitlab/repository_check_logger.rb b/lib/gitlab/repository_check_logger.rb
new file mode 100644
index 00000000000..485b596ca57
--- /dev/null
+++ b/lib/gitlab/repository_check_logger.rb
@@ -0,0 +1,7 @@
+module Gitlab
+ class RepositoryCheckLogger < Gitlab::Logger
+ def self.file_name_noext
+ 'repocheck'
+ end
+ end
+end
diff --git a/lib/support/nginx/gitlab_ci b/lib/support/nginx/gitlab_ci
deleted file mode 100644
index bf05edfd780..00000000000
--- a/lib/support/nginx/gitlab_ci
+++ /dev/null
@@ -1,29 +0,0 @@
-# GITLAB CI
-server {
- listen 80 default_server; # e.g., listen 192.168.1.1:80;
- server_name YOUR_CI_SERVER_FQDN; # e.g., server_name source.example.com;
-
- access_log /var/log/nginx/gitlab_ci_access.log;
- error_log /var/log/nginx/gitlab_ci_error.log;
-
- # expose API to fix runners
- location /api {
- proxy_read_timeout 300;
- proxy_connect_timeout 300;
- proxy_redirect off;
- proxy_set_header X-Real-IP $remote_addr;
-
- # You need to specify your DNS servers that are able to resolve YOUR_GITLAB_SERVER_FQDN
- resolver 8.8.8.8 8.8.4.4;
- proxy_pass $scheme://YOUR_GITLAB_SERVER_FQDN/ci$request_uri;
- }
-
- # redirect all other CI requests
- location / {
- return 301 $scheme://YOUR_GITLAB_SERVER_FQDN/ci$request_uri;
- }
-
- # adjust this to match the largest build log your runners might submit,
- # set to 0 to disable limit
- client_max_body_size 10m;
-} \ No newline at end of file