diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 7 | ||||
-rw-r--r-- | config/deploy.rb | 14 | ||||
-rw-r--r-- | config/general.yml-example | 29 | ||||
-rw-r--r-- | config/initializers/alaveteli.rb | 4 | ||||
-rw-r--r-- | config/routes.rb | 7 |
5 files changed, 51 insertions, 10 deletions
diff --git a/config/application.rb b/config/application.rb index 2356148a1..6b7d1b976 100644 --- a/config/application.rb +++ b/config/application.rb @@ -77,6 +77,12 @@ module Alaveteli require "#{Rails.root}/lib/whatdotheyknow/strip_empty_sessions" config.middleware.insert_before ::ActionDispatch::Cookies, WhatDoTheyKnow::StripEmptySessions, :key => '_wdtk_cookie_session', :path => "/", :httponly => true + # Allow the generation of full URLs in emails + config.action_mailer.default_url_options = { :host => AlaveteliConfiguration::domain } + if AlaveteliConfiguration::force_ssl + config.action_mailer.default_url_options[:protocol] = "https" + end + # Enable the asset pipeline config.assets.enabled = true @@ -94,6 +100,7 @@ module Alaveteli # ... while these are individual files that can't easily be # grouped: config.assets.precompile += ['jquery.fancybox-1.3.4.pack.js', + 'jquery.fancybox-1.3.4.css', 'jquery.Jcrop.css', 'excanvas.min.js', 'select-authorities.js', diff --git a/config/deploy.rb b/config/deploy.rb index a0189c855..c73d16f53 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -17,14 +17,13 @@ set :rails_env, configuration['rails_env'] server configuration['server'], :app, :web, :db, :primary => true -namespace :rake do - namespace :themes do - task :install do - run "cd #{latest_release} && bundle exec rake themes:install RAILS_ENV=#{rails_env}" - end +namespace :themes do + task :install do + run "cd #{latest_release} && bundle exec rake themes:install RAILS_ENV=#{rails_env}" end end + # Not in the rake namespace because we're also specifying app-specific arguments here namespace :xapian do desc 'Rebuilds the Xapian index as per the ./scripts/rebuild-xapian-index script' @@ -55,7 +54,6 @@ namespace :deploy do "#{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", "#{release_path}/files" => "#{shared_path}/files", "#{release_path}/cache" => "#{shared_path}/cache", "#{release_path}/lib/acts_as_xapian/xapiandbs" => "#{shared_path}/xapiandbs", @@ -72,8 +70,8 @@ namespace :deploy do end end -after 'deploy:update_code', 'deploy:symlink_configuration' -after 'deploy:update_code', 'rake:themes:install' +before 'deploy:assets:precompile', 'deploy:symlink_configuration' +before 'deploy:assets:precompile', 'themes:install' # Put up a maintenance notice if doing a migration which could take a while before 'deploy:migrate', 'deploy:web:disable' diff --git a/config/general.yml-example b/config/general.yml-example index 1f6157dea..2b68721a5 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -215,6 +215,35 @@ USE_MAILCATCHER_IN_DEVELOPMENT: true # config.action_controller.perform_caching is set to true CACHE_FRAGMENTS: true +# In some deployments of Alaveteli you may wish to install each newly +# deployed version alongside the previous ones, in which case certain +# files and resources should be shared between these installations: +# for example, the 'files' directory, the 'cache' directory and the +# generated graphs such as 'public/foi-live-creation.png'. If you're +# installing Alaveteli in such a setup then set SHARED_FILES_PATH to +# the directory you're keeping these files under. Otherwise, leave it +# blank. +SHARED_FILES_PATH: '' + +# If you have SHARED_FILES_PATH set, then these options list the files +# and directories that are shared; i.e. those that the deploy scripts +# should create symlinks to from the repository. +SHARED_FILES: + - config/database.yml + - config/general.yml + - config/rails_env.rb + - config/newrelic.yml + - config/httpd.conf + - public/foi-live-creation.png + - public/foi-user-use.png + - config/aliases +SHARED_DIRECTORIES: + - files/ + - cache/ + - lib/acts_as_xapian/xapiandbs/ + - vendor/bundle + - public/assets + # Allow some users to make batch requests to multiple authorities. Once # this is set to true, you can enable batch requests for an individual # user via the user admin page. diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb index 631251b87..6df1823a5 100644 --- a/config/initializers/alaveteli.rb +++ b/config/initializers/alaveteli.rb @@ -10,7 +10,7 @@ load "debug_helpers.rb" load "util.rb" # Application version -ALAVETELI_VERSION = '0.15' +ALAVETELI_VERSION = '0.16' # Add new inflection rules using the following format # (all these examples are active by default): @@ -50,8 +50,8 @@ require 'normalize_string' require 'alaveteli_file_types' require 'alaveteli_localization' require 'message_prominence' -require 'actionmailer_patches' require 'theme' +require 'xapian_queries' AlaveteliLocalization.set_locales(AlaveteliConfiguration::available_locales, AlaveteliConfiguration::default_locale) diff --git a/config/routes.rb b/config/routes.rb index 8a7de6fdd..87a62c0bf 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -112,6 +112,8 @@ Alaveteli::Application.routes.draw do match '/body_statistics' => 'public_body#statistics', :as => :public_bodies_statistics #### + resource :change_request, :only => [:new, :create], :controller => 'public_body_change_requests' + #### Comment controller match '/annotate/request/:url_title' => 'comment#new', :as => :new_comment, :type => 'request' #### @@ -176,6 +178,11 @@ Alaveteli::Application.routes.draw do match '/admin/body/mass_tag_add' => 'admin_public_body#mass_tag_add', :as => :admin_body_mass_tag_add #### + #### AdminPublicBodyChangeRequest controller + match '/admin/change_request/edit/:id' => 'admin_public_body_change_requests#edit', :as => :admin_change_request_edit + match '/admin/change_request/update/:id' => 'admin_public_body_change_requests#update', :as => :admin_change_request_update + #### + #### AdminGeneral controller match '/admin' => 'admin_general#index', :as => :admin_general_index match '/admin/timeline' => 'admin_general#timeline', :as => :admin_timeline |