aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/environment.rb16
-rw-r--r--config/environments/test.rb5
-rw-r--r--config/initializers/fast_gettext.rb3
-rw-r--r--config/packages3
4 files changed, 21 insertions, 6 deletions
diff --git a/config/environment.rb b/config/environment.rb
index c4351dbd1..4f72d030b 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -6,7 +6,7 @@
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '2.3.11' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
@@ -17,7 +17,7 @@ $:.push(File.join(File.dirname(__FILE__), '../commonlib/rblib'))
# (type "git submodule update --init" in the whatdotheyknow directory)
# ruby-ole and ruby-msg. We use a custom ruby-msg to avoid a name conflict
-$:.unshift(File.join(File.dirname(__FILE__), '../vendor/ruby-ole/lib'))
+$:.unshift(File.join(File.dirname(__FILE__), '../commonlib/rblib/ruby-ole/lib'))
$:.unshift(File.join(File.dirname(__FILE__), '../vendor/ruby-msg/lib'))
require 'memcache'
@@ -49,13 +49,20 @@ Rails::Initializer.run do |config|
# TEMP: uncomment this to turn on logging in production environments
# config.log_level = :debug
#
+ # Specify gems that this application depends on and have them installed with rake gems:install
+ config.gem "fast_gettext", :version => '>=0.4.8'
+ config.gem "rack", :version => '1.1.0'
+ config.gem "recaptcha", :lib => "recaptcha/rails"
+ config.gem 'rspec', :lib => false, :version => '1.3.1'
+ config.gem 'rspec-rails', :lib => false, :version => '1.3.3'
+ config.gem 'will_paginate', :version => '~> 2.3.11', :source => 'http://gemcutter.org'
# Your secret key for verifying cookie session data integrity.
# If you change this key, all old sessions will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
config.action_controller.session = {
- :session_key => '_wdtk_cookie_session',
+ :key => '_wdtk_cookie_session',
:secret => MySociety::Config.get("COOKIE_STORE_SESSION_SECRET", 'this default is insecure as code is open source, please override for live sites in config/general; this will do for local development')
}
config.action_controller.session_store = :cookie_store
@@ -63,7 +70,7 @@ Rails::Initializer.run do |config|
# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
- # config.active_record.schema_format = :sql
+ config.active_record.schema_format = :sql
# Activate observers that should always be running
# config.active_record.observers = :cacher, :garbage_collector
@@ -110,7 +117,6 @@ require 'tmail_extensions.rb'
require 'activesupport_cache_extensions.rb'
require 'public_body_categories.rb'
require 'timezone_fixes.rb'
-require 'fcgi_fixes.rb'
require 'use_spans_for_errors.rb'
require 'make_html_4_compliant.rb'
require 'activerecord_errors_extensions.rb'
diff --git a/config/environments/test.rb b/config/environments/test.rb
index bbca20a31..8058487ad 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -17,3 +17,8 @@ config.action_controller.perform_caching = false
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
+config.gem 'rspec-rails', :version => '>= 1.3.3', :lib => false unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))
+
+# Disable request forgery protection in test environment
+config.action_controller.allow_forgery_protection = false
+
diff --git a/config/initializers/fast_gettext.rb b/config/initializers/fast_gettext.rb
new file mode 100644
index 000000000..9ce0955e9
--- /dev/null
+++ b/config/initializers/fast_gettext.rb
@@ -0,0 +1,3 @@
+FastGettext.add_text_domain 'app', :path => File.join(RAILS_ROOT, 'locale'), :type => :po
+FastGettext.default_available_locales = ['en'] #all you want to allow
+FastGettext.default_text_domain = 'app' \ No newline at end of file
diff --git a/config/packages b/config/packages
index b287807fd..73f554acd 100644
--- a/config/packages
+++ b/config/packages
@@ -36,4 +36,5 @@ vpim
tnef (>= 1.4.5)
libmemcache-client-ruby (>= 1.7.8-2)
memcached
-rubygems \ No newline at end of file
+rubygems
+libfcgi-dev