summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb8
-rw-r--r--config/gitlab.yml.example11
-rw-r--r--config/initializers/1_settings.rb1
-rw-r--r--config/initializers/2_app.rb4
-rw-r--r--config/initializers/sentry.rb1
-rw-r--r--config/routes.rb8
-rw-r--r--config/sidekiq.yml.example2
7 files changed, 27 insertions, 8 deletions
diff --git a/config/application.rb b/config/application.rb
index 1e9ec74cdbf..b905f1a3e90 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -6,6 +6,8 @@ I18n.config.enforce_available_locales = false
Bundler.require(:default, Rails.env)
module Gitlab
+ REDIS_CACHE_NAMESPACE = 'cache:gitlab'
+
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
@@ -43,8 +45,8 @@ module Gitlab
# Enable the asset pipeline
config.assets.enabled = true
- config.assets.paths << Emoji.images_path
- config.assets.precompile << "emoji/*.png"
+ config.assets.paths << Gemojione.index.images_path
+ config.assets.precompile << "*.png"
config.assets.precompile << "print.css"
# Version of your assets, change this if you want to expire all your assets
@@ -89,7 +91,7 @@ module Gitlab
redis_config_hash[:path] = redis_uri.path
end
- redis_config_hash[:namespace] = 'cache:gitlab'
+ redis_config_hash[:namespace] = REDIS_CACHE_NAMESPACE
redis_config_hash[:expires_in] = 2.weeks # Cache should not grow forever
config.cache_store = :redis_store, redis_config_hash
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index faf05ecd466..05f127d622a 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -288,15 +288,22 @@ production: &base
# auto_sign_in_with_provider: saml
# CAUTION!
- # This allows users to login without having a user account first (default: false).
+ # This allows users to login without having a user account first. Define the allowed providers
+ # using an array, e.g. ["saml", "twitter"], or as true/false to allow all providers or none.
# User accounts will be created automatically when authentication was successful.
- allow_single_sign_on: false
+ allow_single_sign_on: ["saml"]
+
# Locks down those users until they have been cleared by the admin (default: true).
block_auto_created_users: true
# Look up new users in LDAP servers. If a match is found (same uid), automatically
# link the omniauth identity with the LDAP account. (default: false)
auto_link_ldap_user: false
+ # Allow users with existing accounts to login and auto link their account via SAML
+ # login, without having to do a manual login first and manually add SAML
+ # (default: false)
+ auto_link_saml_user: false
+
## Auth providers
# Uncomment the following lines and fill in the data of the auth provider you want to use
# If your favorite auth provider is not listed you can use others:
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index d8170557f7e..713204b1c51 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -131,6 +131,7 @@ Settings.omniauth['auto_sign_in_with_provider'] = false if Settings.omniauth['au
Settings.omniauth['allow_single_sign_on'] = false if Settings.omniauth['allow_single_sign_on'].nil?
Settings.omniauth['block_auto_created_users'] = true if Settings.omniauth['block_auto_created_users'].nil?
Settings.omniauth['auto_link_ldap_user'] = false if Settings.omniauth['auto_link_ldap_user'].nil?
+Settings.omniauth['auto_link_saml_user'] = false if Settings.omniauth['auto_link_saml_user'].nil?
Settings.omniauth['providers'] ||= []
Settings.omniauth['cas3'] ||= Settingslogic.new({})
diff --git a/config/initializers/2_app.rb b/config/initializers/2_app.rb
index 35b150c9929..bd74f90e7d2 100644
--- a/config/initializers/2_app.rb
+++ b/config/initializers/2_app.rb
@@ -3,6 +3,6 @@ module Gitlab
Settings
end
- VERSION = File.read(Rails.root.join("VERSION")).strip
- REVISION = Gitlab::Popen.popen(%W(#{config.git.bin_path} log --pretty=format:%h -n 1)).first.chomp
+ VERSION = File.read(Rails.root.join("VERSION")).strip.freeze
+ REVISION = Gitlab::Popen.popen(%W(#{config.git.bin_path} log --pretty=format:%h -n 1)).first.chomp.freeze
end
diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb
index d0630b9fa07..e87899b2d5c 100644
--- a/config/initializers/sentry.rb
+++ b/config/initializers/sentry.rb
@@ -14,6 +14,7 @@ if Rails.env.production?
if sentry_enabled
Raven.configure do |config|
config.dsn = current_application_settings.sentry_dsn
+ config.release = Gitlab::REVISION
end
end
end
diff --git a/config/routes.rb b/config/routes.rb
index 507bcbc53d7..30681356c5f 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -334,6 +334,12 @@ Rails.application.routes.draw do
resources :groups, only: [:index]
resources :snippets, only: [:index]
+ resources :todos, only: [:index, :destroy] do
+ collection do
+ delete :destroy_all
+ end
+ end
+
resources :projects, only: [:index] do
collection do
get :starred
@@ -502,6 +508,7 @@ Rails.application.routes.draw do
get :builds
post :cancel_builds
post :retry_builds
+ post :revert
end
end
@@ -617,6 +624,7 @@ Rails.application.routes.draw do
get :status
post :cancel
post :retry
+ post :erase
end
resource :artifacts, only: [] do
diff --git a/config/sidekiq.yml.example b/config/sidekiq.yml.example
index c691db67c6c..714bc06cb24 100644
--- a/config/sidekiq.yml.example
+++ b/config/sidekiq.yml.example
@@ -1,2 +1,2 @@
---
+---
:concurrency: 5 \ No newline at end of file