aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/crontab.ugly4
-rw-r--r--config/environments/development.rb1
-rw-r--r--config/general.yml-example8
-rw-r--r--config/initializers/theme_loader.rb10
-rw-r--r--config/routes.rb3
5 files changed, 22 insertions, 4 deletions
diff --git a/config/crontab.ugly b/config/crontab.ugly
index c5d023f2f..0bbcd2616 100644
--- a/config/crontab.ugly
+++ b/config/crontab.ugly
@@ -16,7 +16,6 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org
5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/purge-varnish check
# Once an hour
-39 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/alert-overdue-requests.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/alert-overdue-requests || echo "stalled?"
09 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/alert-comment-on-request.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/alert-comment-on-request || echo "stalled?"
# Only root can read the exim log files
@@ -24,7 +23,8 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org
# Once a day, early morning
23 4 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/delete-old-things.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/delete-old-things || echo "stalled?"
-0 8 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/alert-new-response-reminders.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/alert-new-response-reminders || echo "stalled?"
+0 6 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/alert-overdue-requests.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/alert-overdue-requests || echo "stalled?"
+0 7 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/alert-new-response-reminders.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/alert-new-response-reminders || echo "stalled?"
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?"
diff --git a/config/environments/development.rb b/config/environments/development.rb
index a1e8133a8..cfb727695 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -17,6 +17,7 @@ config.action_view.debug_rjs = true
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
+config.action_mailer.perform_deliveries = false
config.action_mailer.delivery_method = :sendmail # so is queued, rather than giving immediate errors
# Writes useful log files to debug memory leaks, of the sort where have
diff --git a/config/general.yml-example b/config/general.yml-example
index 3c50e8005..019eb7ada 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -34,8 +34,12 @@ SPECIAL_REPLY_VERY_LATE_AFTER_DAYS: 60
# example public bodies for the home page, semicolon delimited - short_names
FRONTPAGE_PUBLICBODY_EXAMPLES: 'tgq'
-# URL of theme to install (when running rails-post-deploy script)
-THEME_URL: 'git://github.com/sebbacon/alavetelitheme.git'
+# URLs of themes to download and use (when running rails-post-deploy
+# script). Earlier in the list means the templates have a higher
+# priority.
+THEME_URLS:
+ - 'git://github.com/sebbacon/adminbootstraptheme.git'
+ - 'git://github.com/sebbacon/alavetelitheme.git'
# Whether a user needs to sign in to start the New Request process
FORCE_REGISTRATION_ON_NEW_REQUEST: false
diff --git a/config/initializers/theme_loader.rb b/config/initializers/theme_loader.rb
new file mode 100644
index 000000000..4ddce6910
--- /dev/null
+++ b/config/initializers/theme_loader.rb
@@ -0,0 +1,10 @@
+theme_urls = MySociety::Config.get("THEME_URLS", [])
+if ENV["RAILS_ENV"] != "test" # Don't let the theme interfere with Alaveteli specs
+ for url in theme_urls.reverse
+ theme_name = url.sub(/.*\/(.*).git/, "\\1")
+ theme_main_include = File.expand_path "../../../vendor/plugins/#{theme_name}/lib/alavetelitheme.rb", __FILE__
+ if File.exists? theme_main_include
+ require theme_main_include
+ end
+ end
+end
diff --git a/config/routes.rb b/config/routes.rb
index 8afd4d12b..0ba8139c2 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -66,6 +66,7 @@ ActionController::Routing::Routes.draw do |map|
request.upload_response "/upload/request/:url_title", :action => 'upload_response'
request.download_entire_request '/request/:url_title/download', :action => 'download_entire_request'
+ request.report '/request/:url_title/report', :action => 'report_request'
end
@@ -119,6 +120,7 @@ ActionController::Routing::Routes.draw do |map|
map.with_options :controller => 'services' do |service|
service.other_country_message "/country_message", :action => 'other_country_message'
+ service.hidden_user_explanation "/hidden_user_explanation", :action => 'hidden_user_explanation'
end
map.with_options :controller => 'track' do |track|
@@ -202,6 +204,7 @@ ActionController::Routing::Routes.draw do |map|
admin.admin_request_show_raw_email '/admin/request/show_raw_email/:id', :action => 'show_raw_email'
admin.admin_request_download_raw_email '/admin/request/download_raw_email/:id', :action => 'download_raw_email'
admin.admin_request_clarification '/admin/request/mark_event_as_clarification', :action => 'mark_event_as_clarification'
+ admin.admin_request_hide '/admin/request/hide/:id', :action => 'hide_request'
end
map.with_options :controller => 'admin_user' do |user|