summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-08 12:09:27 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-08 12:09:27 +0200
commit25d3b71220e4e3b31a81ef95037481c8c24a56c3 (patch)
tree4177f63998c817384c6347f0310113e23a1c488d
parent9982eacf41135b0c21056c94e7417c2f110fa904 (diff)
downloadgitlab-ci-25d3b71220e4e3b31a81ef95037481c8c24a56c3.tar.gz
Update config/* to work with rails4
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--config/application.rb9
-rw-r--r--config/environments/development.rb9
-rw-r--r--config/environments/production.rb4
-rw-r--r--config/environments/test.rb5
-rw-r--r--config/initializers/secret_token.rb1
5 files changed, 12 insertions, 16 deletions
diff --git a/config/application.rb b/config/application.rb
index 3e5c811..99c7ad2 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -2,12 +2,7 @@ require File.expand_path('../boot', __FILE__)
require 'rails/all'
-if defined?(Bundler)
- # If you precompile assets before deploying to production, use this line
- # Bundler.require(*Rails.groups(:assets => %w(development test)))
- # If you want your assets lazily compiled in production, use this line
- Bundler.require(:default, :assets, Rails.env)
-end
+Bundler.require(:default, Rails.env)
module GitlabCi
class Application < Rails::Application
@@ -58,5 +53,7 @@ module GitlabCi
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
+
+ config.active_record.whitelist_attributes = false
end
end
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 73c9fb1..723ed89 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -6,9 +6,6 @@ GitlabCi::Application.configure do
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
- # Log error messages when you accidentally call methods on nil.
- config.whiny_nils = true
-
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
@@ -25,13 +22,11 @@ GitlabCi::Application.configure do
# Raise exception on mass assignment protection for Active Record models
config.active_record.mass_assignment_sanitizer = :strict
- # Log the query plan for queries taking more than this (works
- # with SQLite, MySQL, and PostgreSQL)
- config.active_record.auto_explain_threshold_in_seconds = 0.5
-
# Do not compress assets
config.assets.compress = false
# Expands the lines which load the assets
config.assets.debug = true
+
+ config.eager_load = false
end
diff --git a/config/environments/production.rb b/config/environments/production.rb
index f120540..ff7c551 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -64,4 +64,8 @@ GitlabCi::Application.configure do
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
# config.active_record.auto_explain_threshold_in_seconds = 0.5
+ #
+ config.eager_load = true
+
+ config.assets.js_compressor = :uglifier
end
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 13bffaa..4ba8e77 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -11,9 +11,6 @@ GitlabCi::Application.configure do
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
- # Log error messages when you accidentally call methods on nil
- config.whiny_nils = true
-
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
@@ -34,4 +31,6 @@ GitlabCi::Application.configure do
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
+
+ config.eager_load = false
end
diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb
index aaf65b5..ccbda95 100644
--- a/config/initializers/secret_token.rb
+++ b/config/initializers/secret_token.rb
@@ -5,3 +5,4 @@
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
GitlabCi::Application.config.secret_token = '41cff934d5a788409310b2b4dc931ca9be9c5113ede94f41d44bf71b403f007d8031efa855d6d111393d33ca839722db98445a1a6f020331a3f43bd29a50c93e'
+GitlabCi::Application.config.secret_key_token = '41cff934d5a788409310b2b4dc931ca9be9c5113ede94f41d44bf71b403f007d8031efa855d6d111393d33ca839722db98445a1a6f020331a3f43bd29a50c93e'