##// END OF EJS Templates
Allow a config/additional_environment.rb file to customize the Rails::Initializer....
Eric Davis -
r2904:e02caeab0f07
parent child
Show More
@@ -0,0 +1,13
1 # Copy this file to additional_environment.rb and add any statements
2 # that need to be passed to the Rails::Initializer. `config` is
3 # available in this context.
4 #
5 # Example:
6 #
7 # config.log_level = :debug
8 # config.gem "example_plugin", :lib => false
9 # config.gem "timesheet_plugin", :lib => false, :version => '0.5.0'
10 # config.gem "aws-s3", :lib => "aws/s3"
11 # ...
12 #
13
@@ -1,18 +1,19
1 /config/additional_environment.rb
1 /config/database.yml
2 /config/database.yml
2 /config/email.yml
3 /config/email.yml
3 /config/initializers/session_store.rb
4 /config/initializers/session_store.rb
4 /coverage
5 /coverage
5 /db/*.db
6 /db/*.db
6 /db/*.sqlite3
7 /db/*.sqlite3
7 /db/schema.rb
8 /db/schema.rb
8 /files/*
9 /files/*
9 /log/*.log*
10 /log/*.log*
10 /log/mongrel_debug
11 /log/mongrel_debug
11 /public/dispatch.*
12 /public/dispatch.*
12 /public/plugin_assets
13 /public/plugin_assets
13 /tmp/*
14 /tmp/*
14 /tmp/cache/*
15 /tmp/cache/*
15 /tmp/sessions/*
16 /tmp/sessions/*
16 /tmp/sockets/*
17 /tmp/sockets/*
17 /tmp/test/*
18 /tmp/test/*
18 /vendor/rails
19 /vendor/rails
@@ -1,52 +1,58
1 # Be sure to restart your web server when you modify this file.
1 # Be sure to restart your web server when you modify this file.
2
2
3 # Uncomment below to force Rails into production mode when
3 # Uncomment below to force Rails into production mode when
4 # you don't control web/app server and can't set it the proper way
4 # you don't control web/app server and can't set it the proper way
5 # ENV['RAILS_ENV'] ||= 'production'
5 # ENV['RAILS_ENV'] ||= 'production'
6
6
7 # Specifies gem version of Rails to use when vendor/rails is not present
7 # Specifies gem version of Rails to use when vendor/rails is not present
8 RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
8 RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
9
9
10 # Bootstrap the Rails environment, frameworks, and default configuration
10 # Bootstrap the Rails environment, frameworks, and default configuration
11 require File.join(File.dirname(__FILE__), 'boot')
11 require File.join(File.dirname(__FILE__), 'boot')
12
12
13 # Load Engine plugin if available
13 # Load Engine plugin if available
14 begin
14 begin
15 require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
15 require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')
16 rescue LoadError
16 rescue LoadError
17 # Not available
17 # Not available
18 end
18 end
19
19
20 Rails::Initializer.run do |config|
20 Rails::Initializer.run do |config|
21 # Settings in config/environments/* take precedence those specified here
21 # Settings in config/environments/* take precedence those specified here
22
22
23 # Skip frameworks you're not going to use
23 # Skip frameworks you're not going to use
24 # config.frameworks -= [ :action_web_service, :action_mailer ]
24 # config.frameworks -= [ :action_web_service, :action_mailer ]
25
25
26 # Add additional load paths for sweepers
26 # Add additional load paths for sweepers
27 config.load_paths += %W( #{RAILS_ROOT}/app/sweepers )
27 config.load_paths += %W( #{RAILS_ROOT}/app/sweepers )
28
28
29 # Force all environments to use the same logger level
29 # Force all environments to use the same logger level
30 # (by default production uses :info, the others :debug)
30 # (by default production uses :info, the others :debug)
31 # config.log_level = :debug
31 # config.log_level = :debug
32
32
33 # Enable page/fragment caching by setting a file-based store
33 # Enable page/fragment caching by setting a file-based store
34 # (remember to create the caching directory and make it readable to the application)
34 # (remember to create the caching directory and make it readable to the application)
35 # config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
35 # config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
36
36
37 # Activate observers that should always be running
37 # Activate observers that should always be running
38 # config.active_record.observers = :cacher, :garbage_collector
38 # config.active_record.observers = :cacher, :garbage_collector
39 config.active_record.observers = :message_observer, :issue_observer, :journal_observer, :news_observer, :document_observer, :wiki_content_observer
39 config.active_record.observers = :message_observer, :issue_observer, :journal_observer, :news_observer, :document_observer, :wiki_content_observer
40
40
41 # Make Active Record use UTC-base instead of local time
41 # Make Active Record use UTC-base instead of local time
42 # config.active_record.default_timezone = :utc
42 # config.active_record.default_timezone = :utc
43
43
44 # Use Active Record's schema dumper instead of SQL when creating the test database
44 # Use Active Record's schema dumper instead of SQL when creating the test database
45 # (enables use of different database adapters for development and test environments)
45 # (enables use of different database adapters for development and test environments)
46 # config.active_record.schema_format = :ruby
46 # config.active_record.schema_format = :ruby
47
47
48 # Deliveries are disabled by default. Do NOT modify this section.
48 # Deliveries are disabled by default. Do NOT modify this section.
49 # Define your email configuration in email.yml instead.
49 # Define your email configuration in email.yml instead.
50 # It will automatically turn deliveries on
50 # It will automatically turn deliveries on
51 config.action_mailer.perform_deliveries = false
51 config.action_mailer.perform_deliveries = false
52
53 # Load any local configuration that is kept out of source control
54 # (e.g. gems, patches).
55 if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
56 instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
57 end
52 end
58 end
General Comments 0
You need to be logged in to leave comments. Login now