diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/deploy.rb | 1 | ||||
-rw-r--r-- | config/environment.rb | 18 | ||||
-rw-r--r-- | config/general.yml-example | 4 | ||||
-rw-r--r-- | config/initializers/fast_gettext.rb | 2 | ||||
-rw-r--r-- | config/packages | 2 | ||||
-rw-r--r-- | config/routes.rb | 2 |
6 files changed, 20 insertions, 9 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index 5c7c181c9..004c3df35 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -51,6 +51,7 @@ namespace :deploy do "#{release_path}/config/memcached.yml" => "#{shared_path}/memcached.yml", "#{release_path}/config/rails_env.rb" => "#{shared_path}/rails_env.rb", "#{release_path}/config/newrelic.yml" => "#{shared_path}/newrelic.yml", + "#{release_path}/config/aliases" => "#{shared_path}/aliases", "#{release_path}/public/foi-live-creation.png" => "#{shared_path}/foi-live-creation.png", "#{release_path}/public/foi-user-use.png" => "#{shared_path}/foi-user-use.png", "#{release_path}/public/favicon.ico" => "#{shared_path}/favicon.ico", diff --git a/config/environment.rb b/config/environment.rb index de20e73e4..5670aed0b 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,8 +1,16 @@ # Be sure to restart your web server when you modify this file. - -# the default encoding for IO is utf-8, and we use utf-8 internally if RUBY_VERSION.to_f >= 1.9 + # the default encoding for IO is utf-8, and we use utf-8 internally Encoding.default_external = Encoding.default_internal = Encoding::UTF_8 + # Suppress warning messages and require inflector to avoid iconv deprecation message + # "iconv will be deprecated in the future, use String#encode instead." when loading + # it as part of rails + original_verbose, $VERBOSE = $VERBOSE, nil + require 'active_support/inflector' + # Activate warning messages again. + $VERBOSE = original_verbose + require 'yaml' + YAML::ENGINE.yamler = "syck" end # Uncomment below to force Rails into production mode when @@ -20,7 +28,6 @@ $:.push(File.join(File.dirname(__FILE__), '../commonlib/rblib')) # ... if these fail to include, you need the commonlib submodule from git # (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/plugins/globalize2/lib')) load "validate.rb" @@ -87,6 +94,8 @@ Rails::Initializer.run do |config| require 'routing_filters.rb' end + config.autoload_paths << "#{RAILS_ROOT}/lib/mail_handler" + # See Rails::Configuration for more options ENV['RECAPTCHA_PUBLIC_KEY'] = Configuration::recaptcha_public_key ENV['RECAPTCHA_PRIVATE_KEY'] = Configuration::recaptcha_private_key @@ -135,7 +144,6 @@ WillPaginate::ViewHelpers.pagination_options[:renderer] = 'WillPaginateExtension # Load monkey patches and other things from lib/ require 'ruby19.rb' -require 'tmail_extensions.rb' require 'activesupport_cache_extensions.rb' require 'timezone_fixes.rb' require 'use_spans_for_errors.rb' @@ -143,12 +151,12 @@ require 'make_html_4_compliant.rb' require 'activerecord_errors_extensions.rb' require 'willpaginate_extension.rb' require 'sendmail_return_path.rb' -require 'tnef.rb' require 'i18n_fixes.rb' require 'rack_quote_monkeypatch.rb' require 'world_foi_websites.rb' require 'alaveteli_external_command.rb' require 'quiet_opener.rb' +require 'mail_handler' if !Configuration.exception_notifications_from.blank? && !Configuration.exception_notifications_to.blank? ExceptionNotification::Notifier.sender_address = Configuration::exception_notifications_from diff --git a/config/general.yml-example b/config/general.yml-example index fd134b0c2..bfe289541 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -32,6 +32,10 @@ AVAILABLE_LOCALES: 'en es' DEFAULT_LOCALE: 'en' USE_DEFAULT_BROWSER_LANGUAGE: true +# If you don't want the default locale to be included in URLs generated +# by the application, set this to false +INCLUDE_DEFAULT_LOCALE_IN_URLS: true + # How many days should have passed before an answer to a request is officially late? REPLY_LATE_AFTER_DAYS: 20 REPLY_VERY_LATE_AFTER_DAYS: 40 diff --git a/config/initializers/fast_gettext.rb b/config/initializers/fast_gettext.rb index 2ecf5cb5d..1cd6440e4 100644 --- a/config/initializers/fast_gettext.rb +++ b/config/initializers/fast_gettext.rb @@ -3,4 +3,4 @@ FastGettext.default_text_domain = 'app' I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks) - +RoutingFilter::Locale.include_default_locale = Configuration::include_default_locale_in_urls
\ No newline at end of file diff --git a/config/packages b/config/packages index ded8dc9a5..775a55e38 100644 --- a/config/packages +++ b/config/packages @@ -33,7 +33,7 @@ libpq-dev uuid-dev ruby1.8-dev rubygems -rake +rake (>= 0.9.2.2) build-essential bundler sqlite3 diff --git a/config/routes.rb b/config/routes.rb index 5fc0075a4..3512b4cd4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -32,8 +32,6 @@ ActionController::Routing::Routes.draw do |map| general.advanced_search '/advancedsearch', :action => 'search_redirect', :advanced => true general.random_request '/random', :action => 'random_request' - - general.fai_test '/test', :action => 'fai_test' end map.with_options :controller => 'request' do |request| |