diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-09-10 15:13:01 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-09-10 15:13:01 +0300 |
commit | a6997e339be703e769b32765ffbdbf722ac2aea5 (patch) | |
tree | a39e76580ffa460349f509f169cc44b1fe9d8f54 /config | |
parent | e4b30f9db3d0b2a2d3b7274d312872fe41d22104 (diff) | |
parent | dadf6daac47badf01a7a0bac94527a4d68555db6 (diff) |
Merge branch 'master' into dashboard-titles
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/1_settings.rb | 2 | ||||
-rw-r--r-- | config/initializers/rouge_diff_lexer.rb | 24 | ||||
-rw-r--r-- | config/initializers/session_store.rb | 7 | ||||
-rw-r--r-- | config/routes.rb | 11 |
4 files changed, 42 insertions, 2 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index c47e5dab27c..689c3f3049d 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -158,7 +158,7 @@ Settings.gitlab.default_projects_features['snippets'] = false if Settings. Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE) Settings.gitlab['repository_downloads_path'] = File.absolute_path(Settings.gitlab['repository_downloads_path'] || 'tmp/repositories', Rails.root) Settings.gitlab['restricted_signup_domains'] ||= [] -Settings.gitlab['import_sources'] ||= ['github','bitbucket','gitlab','gitorious','google_code','git'] +Settings.gitlab['import_sources'] ||= ['github','bitbucket','gitlab','gitorious','google_code','fogbugz','git'] # # Reply by email diff --git a/config/initializers/rouge_diff_lexer.rb b/config/initializers/rouge_diff_lexer.rb new file mode 100644 index 00000000000..fdb2d7b748e --- /dev/null +++ b/config/initializers/rouge_diff_lexer.rb @@ -0,0 +1,24 @@ +# Here until https://github.com/jneen/rouge/pull/297 is merged into Rouge and the gem is updated in GitLab. +module Rouge + module Lexers + class Diff + def self.analyze_text(text) + return 1 if text.start_with?('Index: ') + return 1 if text.start_with?('diff ') + return 0.9 if text.start_with?('--- ') + end + + state :root do + rule(/^ .*\n/, Text) + rule(/^---\n/, Text) + rule(/^\+.*\n/, Generic::Inserted) + rule(/^-+.*\n/, Generic::Deleted) + rule(/^!.*\n/, Generic::Strong) + rule(/^@.*\n/, Generic::Subheading) + rule(/^([Ii]ndex|diff).*\n/, Generic::Heading) + rule(/^=.*\n/, Generic::Heading) + rule(/.*\n/, Text) + end + end + end +end diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 6d274cd95a1..88651394d1d 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -2,7 +2,12 @@ require 'gitlab/current_settings' include Gitlab::CurrentSettings -Settings.gitlab['session_expire_delay'] = current_application_settings.session_expire_delay + +# allow it to fail: it may to do so when create_from_defaults is executed before migrations are actually done +begin + Settings.gitlab['session_expire_delay'] = current_application_settings.session_expire_delay +rescue +end Gitlab::Application.config.session_store( :redis_store, # Using the cookie_store would enable session replay attacks. diff --git a/config/routes.rb b/config/routes.rb index 720aee2d2ac..fad6b3c569a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -99,6 +99,15 @@ Gitlab::Application.routes.draw do get :new_user_map, path: :user_map post :create_user_map, path: :user_map end + + resource :fogbugz, only: [:create, :new], controller: :fogbugz do + get :status + post :callback + get :jobs + + get :new_user_map, path: :user_map + post :create_user_map, path: :user_map + end end # @@ -202,6 +211,8 @@ Gitlab::Application.routes.draw do resources :services end + resources :labels + root to: 'dashboard#index' end |