diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/crontab-example | 2 | ||||
-rw-r--r-- | config/deploy.rb | 1 | ||||
-rw-r--r-- | config/general.yml-example | 19 | ||||
-rw-r--r-- | config/httpd.conf-example | 10 | ||||
-rw-r--r-- | config/initializers/alaveteli.rb | 4 | ||||
-rw-r--r-- | config/packages | 5 | ||||
-rw-r--r-- | config/routes.rb | 20 | ||||
-rw-r--r-- | config/test.yml | 2 |
8 files changed, 48 insertions, 15 deletions
diff --git a/config/crontab-example b/config/crontab-example index 32baff170..d2c3f6bd9 100644 --- a/config/crontab-example +++ b/config/crontab-example @@ -26,6 +26,8 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org 0 8 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/alert-not-clarified-request.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/alert-not-clarified-request || echo "stalled?" 2 4 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/check-recent-requests-sent.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/check-recent-requests-sent || echo "stalled?" 45 3 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/stop-new-responses-on-old-requests.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/stop-new-responses-on-old-requests || echo "stalled?" +55 4 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/update-public-body-stats.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/update-public-body-stats || echo "stalled?" + # Only root can restart apache 31 1 * * * root run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/change-xapian-database.lock "/data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/compact-xapian-database production" || echo "stalled?" diff --git a/config/deploy.rb b/config/deploy.rb index 3ce1a1969..d26a199c8 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -58,7 +58,6 @@ namespace :deploy do "#{release_path}/files" => "#{shared_path}/files", "#{release_path}/cache" => "#{shared_path}/cache", "#{release_path}/vendor/plugins/acts_as_xapian/xapiandbs" => "#{shared_path}/xapiandbs", - "#{release_path}/public/download" => "#{release_path}/cache/zips/download" } # "ln -sf <a> <b>" creates a symbolic link but deletes <b> if it already exists diff --git a/config/general.yml-example b/config/general.yml-example index 2cca2a1c1..2aa9b2712 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -147,9 +147,9 @@ GAZE_URL: http://gaze.mysociety.org # The email address to which non-bounce responses should be forwarded FORWARD_NONBOUNCE_RESPONSES_TO: user-support@localhost -# Path to a program that converts a page at a URL to HTML. It should -# take two arguments: the URL, and a path to an output file. A static -# binary of wkhtmltopdf is recommended: +# Path to a program that converts an HTML page in a file to PDF. It +#should take two arguments: the URL, and a path to an output file. +# A static binary of wkhtmltopdf is recommended: # http://code.google.com/p/wkhtmltopdf/downloads/list # If the command is not present, a text-only version will be rendered # instead. @@ -197,3 +197,16 @@ MTA_LOG_TYPE: "exim" # this will be included in the message people see when their request is # successful. DONATION_URL: "http://www.mysociety.org/donate/" + +# If you set this to 'true' then a page of statistics on the +# performance of public bodies will be available: +PUBLIC_BODY_STATISTICS_PAGE: false + +# The page of statistics for public bodies will only consider public +# bodies that have had at least this number of requests: +MINIMUM_REQUESTS_FOR_STATISTICS: 50 + +# If only some of the public bodies have been translated into every +# available locale, you can allow a fallback to the default locale for +# listing of public bodies. +PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE: false diff --git a/config/httpd.conf-example b/config/httpd.conf-example index 1326252f5..dc2e4966e 100644 --- a/config/httpd.conf-example +++ b/config/httpd.conf-example @@ -69,3 +69,13 @@ RewriteRule ^/request/((\d{1,3})\d*)/(response/\d+/attach/(html/)?\d+/.+) /views AddOutputFilterByType DEFLATE font/opentype font/truetype font/eot AddOutputFilterByType DEFLATE image/svg+xml </IFModule> + +# Set the Sendfile header and switch sendfile on - Apache will +# now handle send_file calls from Alaveteli +<Location /> + <IfModule mod_xsendfile.c> + RequestHeader Set X-Sendfile-Type X-Sendfile + XSendFile On + XSendFileAllowAbove On + </IfModule> +</Location> diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb index 2c6ee2fbc..8ae78c80c 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.13' +ALAVETELI_VERSION = '0.14' # Add new inflection rules using the following format # (all these examples are active by default): @@ -25,7 +25,6 @@ ALAVETELI_VERSION = '0.13' # Mime::Type.register "text/richtext", :rtf # Mime::Type.register "application/x-mobile", :mobile -# The Rails cache is set up by the Interlock plugin to use memcached # Domain for URLs (so can work for scripts, not just web pages) ActionMailer::Base.default_url_options[:host] = AlaveteliConfiguration::domain @@ -50,6 +49,7 @@ require 'ability' require 'normalize_string' require 'alaveteli_file_types' require 'alaveteli_localization' +require 'message_prominence' AlaveteliLocalization.set_locales(AlaveteliConfiguration::available_locales, AlaveteliConfiguration::default_locale) diff --git a/config/packages b/config/packages index 5d6622c30..8bb00a849 100644 --- a/config/packages +++ b/config/packages @@ -3,7 +3,6 @@ # alavateli mailing list if you want to change it ruby1.8 ruby -libopenssl-ruby1.8 # needed for Ubuntu 10.04 TLS; included in libruby1.8 in Squeeze rdoc | rdoc1.8 irb | irb1.8 wv @@ -28,9 +27,11 @@ wkhtmltopdf-static libmagic-dev libmagickwand-dev libpq-dev +libxml2-dev +libxslt-dev uuid-dev ruby1.8-dev -rubygems +rubygems (>= 1.8.15) rake (>= 0.9.2.2) build-essential bundler diff --git a/config/routes.rb b/config/routes.rb index 5af94768c..cadb7ec54 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -105,6 +105,7 @@ Alaveteli::Application.routes.draw do match '/body/:url_name/view_email' => 'public_body#view_email', :as => :view_public_body_email match '/body/:url_name/:tag' => 'public_body#show', :as => :show_public_body_tag match '/body/:url_name/:tag/:view' => 'public_body#show', :as => :show_public_body_tag_view + match '/body_statistics' => 'public_body#statistics', :as => :public_bodies_statistics #### #### Comment controller @@ -176,7 +177,6 @@ Alaveteli::Application.routes.draw do match '/admin/timeline' => 'admin_general#timeline', :as => :admin_timeline match '/admin/debug' => 'admin_general#debug', :as => :admin_debug match '/admin/stats' => 'admin_general#stats', :as => :admin_stats - match '/admin/javascripts/admin.js' => 'admin_general#admin_js', :as => :admin_js #### #### AdminRequest controller @@ -187,13 +187,8 @@ Alaveteli::Application.routes.draw do match '/admin/request/edit/:id' => 'admin_request#edit', :as => :admin_request_edit match '/admin/request/update/:id' => 'admin_request#update', :as => :admin_request_update match '/admin/request/destroy/:id' => 'admin_request#fully_destroy', :as => :admin_request_destroy - match '/admin/request/edit_outgoing/:id' => 'admin_request#edit_outgoing', :as => :admin_request_edit_outgoing - match '/admin/request/destroy_outgoing/:id' => 'admin_request#destroy_outgoing', :as => :admin_request_destroy_outgoing - match '/admin/request/update_outgoing/:id' => 'admin_request#update_outgoing', :as => :admin_request_update_outgoing match '/admin/request/edit_comment/:id' => 'admin_request#edit_comment', :as => :admin_request_edit_comment match '/admin/request/update_comment/:id' => 'admin_request#update_comment', :as => :admin_request_update_comment - match '/admin/request/destroy_incoming' => 'admin_request#destroy_incoming', :as => :admin_request_destroy_incoming - match '/admin/request/redeliver_incoming' => 'admin_request#redeliver_incoming', :as => :admin_request_redeliver_incoming match '/admin/request/move_request' => 'admin_request#move_request', :as => :admin_request_move_request match '/admin/request/generate_upload_url/:id' => 'admin_request#generate_upload_url', :as => :admin_request_generate_upload_url match '/admin/request/show_raw_email/:id' => 'admin_request#show_raw_email', :as => :admin_request_show_raw_email @@ -202,6 +197,19 @@ Alaveteli::Application.routes.draw do match '/admin/request/hide/:id' => 'admin_request#hide_request', :as => :admin_request_hide #### + #### AdminIncomingMessage controller + match '/admin/incoming/destroy' => 'admin_incoming_message#destroy', :as => :admin_incoming_destroy + match '/admin/incoming/redeliver' => 'admin_incoming_message#redeliver', :as => :admin_incoming_redeliver + match '/admin/incoming/edit/:id' => 'admin_incoming_message#edit', :as => :admin_incoming_edit + match '/admin/incoming/update/:id' => 'admin_incoming_message#update', :as => :admin_incoming_update + #### + + #### AdminOutgoingMessage controller + match '/admin/outgoing/edit/:id' => 'admin_outgoing_message#edit', :as => :admin_outgoing_edit + match '/admin/outgoing/destroy/:id' => 'admin_outgoing_message#destroy', :as => :admin_outgoing_destroy + match '/admin/outgoing/update/:id' => 'admin_outgoing_message#update', :as => :admin_outgoing_update + #### + #### AdminUser controller match '/admin/user' => 'admin_user#index', :as => :admin_user_index match '/admin/user/list' => 'admin_user#list', :as => :admin_user_list diff --git a/config/test.yml b/config/test.yml index 5c08e928b..b26ca99d4 100644 --- a/config/test.yml +++ b/config/test.yml @@ -108,7 +108,7 @@ ACCELERATOR_PORT: '6081' # mySociety's gazeteer service. Shouldn't change. GAZE_URL: http://gaze.mysociety.org -# Path to a program that converts a page at a URL to HTML. It should +# Path to a program that converts a page in a file to PDF. It should # take two arguments: the URL, and a path to an output file. A static # binary of wkhtmltopdf is recommended: # http://code.google.com/p/wkhtmltopdf/downloads/list |