Changeset 687

Show
Ignore:
Timestamp:
01/07/08 09:15:24 (6 months ago)
Author:
jlong
Message:

rails2: updated environments

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/rails2/config/environment.rb

    r592 r687  
    1 # Uncomment below to force Rails into production mode when  
     1# Be sure to restart your server when you modify this file 
     2 
     3# Uncomment below to force Rails into production mode when 
    24# you don't control web/app server and can't set it the proper way 
    35# ENV['RAILS_ENV'] ||= 'production' 
    46 
    5 # Bootstrap the Rails environment, frameworks, and default configuration 
     7# Specifies gem version of Rails to use when vendor/rails is not present 
    68require File.join(File.dirname(__FILE__), 'boot') 
    79 
     
    911 
    1012Radiant::Initializer.run do |config| 
    11   # Settings in config/environments/* take precedence those specified here 
     13  # Settings in config/environments/* take precedence over those specified here. 
     14  # Application configuration should go into files in config/initializers 
     15  # -- all .rb files in that directory are automatically loaded. 
     16  # See Rails::Configuration for more options. 
     17 
     18  # Skip frameworks you're not going to use (only works if using vendor/rails). 
     19  # To use Rails without a database, you must remove the Active Record framework 
     20  config.frameworks -= [ :action_web_service, :action_mailer ] 
    1221   
    13   # Skip frameworks you're not going to use 
    14   config.frameworks -= [ :action_web_service, :action_mailer ] 
    15  
     22  # Only load the plugins named here, in the order given. By default, all plugins  
     23  # in vendor/plugins are loaded in alphabetical order. 
     24  # :all can be used as a placeholder for all plugins not explicitly named 
     25  # config.plugins = [ :exception_notification, :ssl_requirement, :all ] 
     26   
    1627  # Add additional load paths for when Radiant is running in instance mode 
    1728  config.load_paths += %w( 
     
    2435  config.view_path = File.join(RADIANT_ROOT, 'app', 'views') 
    2536   
     37  # Make sure plugins are loaded from lib and vendor 
     38  config.plugin_paths = [ 
     39    "#{RAILS_ROOT}/vendor/plugins", 
     40    "#{RADIANT_ROOT}/lib/plugins", 
     41    "#{RADIANT_ROOT}/vendor/plugins" 
     42  ] 
     43   
    2644  # Only load the extensions named here, in the order given. By default all plugins in vendor/extensions are 
    2745  # loaded, in alphabetical order. :all can be used as a placeholder for all extensions not explicitly named.  
     
    3149  # (by default production uses :info, the others :debug) 
    3250  # config.log_level = :debug 
     51   
     52  # Your secret key for verifying cookie session data integrity. 
     53  # If you change this key, all old sessions will become invalid! 
     54  # Make sure the secret is at least 30 characters and all random,  
     55  # no regular words or you'll be exposed to dictionary attacks. 
     56  config.action_controller.session = { 
     57    :session_key => '_radiant_session', 
     58    :secret      => 'asdfqwerfxcoivswqenadfasdfqewpfioutyqwel' 
     59  } 
     60   
     61  # Use the database for sessions instead of the cookie-based default, 
     62  # which shouldn't be used to store highly confidential information 
     63  # (create the session table with 'rake db:sessions:create') 
     64  config.action_controller.session_store = :active_record_store 
    3365 
    34   # Use the database for sessions instead of the file system 
    35   # (create the session table with 'rake create_sessions_table') 
    36   # config.action_controller.session_store = :active_record_store 
    37  
     66  # Use SQL instead of Active Record's schema dumper when creating the test database. 
     67  # This is necessary if your schema can't be completely dumped by the schema dumper, 
     68  # like if you have constraints or database-specific column types 
     69  # config.active_record.schema_format = :sql 
     70   
    3871  # Enable page/fragment caching by setting a file-based store 
    3972  # (remember to create the caching directory and make it readable to the application) 
    4073  # config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/fragment_cache" 
    4174  config.action_controller.page_cache_directory = "#{RAILS_ROOT}/cache" 
     75   
     76  # Activate observers that should always be running 
     77  config.active_record.observers = :user_action_observer 
    4278 
    4379  # Make Active Record use UTC-base instead of local time 
    4480  config.active_record.default_timezone = :utc 
    45    
    46   # Activate observers that should always be running 
    47   config.active_record.observers = :user_action_observer 
    48    
    49   # Make sure plugins are loaded from lib and vendor 
    50   config.plugin_paths = [ 
    51     "#{RAILS_ROOT}/vendor/plugins", 
    52     "#{RADIANT_ROOT}/lib/plugins", 
    53     "#{RADIANT_ROOT}/vendor/plugins" 
    54   ] 
    55  
    56   # Use ActiveRecord sessions 
    57   config.action_controller.session_store = :active_record_store 
    58  
    59   # See Rails::Configuration for more options 
    6081end 
    6182 
  • branches/rails2/config/environments/development.rb

    r45 r687  
    99config.whiny_nils        = true 
    1010 
    11 # Enable the breakpoint server that script/breakpointer connects to 
    12 config.breakpoint_server = true 
    13  
    1411# Show full error reports and caching is turned off, but ResponseCache caching is on 
    1512config.action_controller.consider_all_requests_local = true 
     13config.action_view.debug_rjs                         = true 
    1614config.action_controller.perform_caching             = false 
     15config.action_view.cache_template_extensions         = false 
    1716ResponseCache.defaults[:perform_caching]             = true 
    1817 
  • branches/rails2/config/environments/test.rb

    r644 r687  
    2424ResponseCache.defaults[:perform_caching]             = false 
    2525 
     26# Disable request forgery protection in test environment 
     27config.action_controller.allow_forgery_protection    = false 
     28 
    2629# Tell ActionMailer not to deliver emails to the real world. 
    2730# The :test delivery method accumulates sent emails in the