aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/crontab.ugly2
-rw-r--r--config/environment.rb2
-rw-r--r--config/general.yml-example9
-rw-r--r--config/routes.rb17
4 files changed, 23 insertions, 7 deletions
diff --git a/config/crontab.ugly b/config/crontab.ugly
index ecd3151ff..5f2fbdb3b 100644
--- a/config/crontab.ugly
+++ b/config/crontab.ugly
@@ -28,7 +28,7 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org
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?"
# Only root can restart apache
-31 1 * * * root run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/compact-xapian-database.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/compact-xapian-database production || echo "stalled?"
+31 1 * * * root run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/compact-xapian-database.lock "/data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/compact-xapian-database production" || echo "stalled?"
# Once a day on all servers
diff --git a/config/environment.rb b/config/environment.rb
index 6bd40cab4..c363e7fae 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -110,7 +110,7 @@ ActionMailer::Base.default_url_options[:host] = MySociety::Config.get("DOMAIN",
# So that javascript assets use full URL, so proxied admin URLs read javascript OK
if (MySociety::Config.get("DOMAIN", "") != "")
ActionController::Base.asset_host = Proc.new { |source, request|
- if request.fullpath.match(/^\/admin\//)
+ if ENV["RAILS_ENV"] != "test" && request.fullpath.match(/^\/admin\//)
MySociety::Config.get("ADMIN_PUBLIC_URL", "")
else
MySociety::Config.get("DOMAIN", 'localhost:3000')
diff --git a/config/general.yml-example b/config/general.yml-example
index 5eee675ff..48e8523ef 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -12,6 +12,10 @@ SITE_NAME: 'Alaveteli'
# Domain used in URLs generated by scripts (e.g. for going in some emails)
DOMAIN: '127.0.0.1:3000'
+# ISO country code of country currrently deployed in
+# (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
+ISO_COUNTRY_CODE: GB
+
# These feeds are displayed accordingly on the Alaveteli "blog" page:
BLOG_FEED: 'http://www.mysociety.org/category/projects/whatdotheyknow/feed/'
TWITTER_USERNAME: 'whatdotheyknow'
@@ -27,9 +31,6 @@ REPLY_VERY_LATE_AFTER_DAYS: 40
# We give some types of authority like schools a bit longer than everyone else
SPECIAL_REPLY_VERY_LATE_AFTER_DAYS: 60
-# example searches for the home page, semicolon delimited.
-FRONTPAGE_SEARCH_EXAMPLES: 'Geraldine Quango; Department for Humpadinking'
-
# example public bodies for the home page, semicolon delimited - short_names
FRONTPAGE_PUBLICBODY_EXAMPLES: 'tgq'
@@ -109,3 +110,5 @@ DEBUG_RECORD_MEMORY: false
# be another reason to try this setting.
USE_GHOSTSCRIPT_COMPRESSION: true
+# mySociety's gazeteer service. Shouldn't change.
+GAZE_URL: http://gaze.mysociety.org
diff --git a/config/routes.rb b/config/routes.rb
index c16c10eb9..c067de4e5 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -23,7 +23,9 @@ ActionController::Routing::Routes.draw do |map|
# Couldn't find a way to do this in routes which also picked up multiple other slashes
# and dots and other characters that can appear in search query. So we sort it all
# out in the controller.
- general.search_general '/search/*combined', :action => 'search'
+ general.search_general '/search/*combined/all', :action => 'search', :view => 'all'
+ general.search_general '/search/*combined', :action => 'search'
+ general.advanced_search '/advancedsearch', :action => 'search_redirect', :advanced => true
general.random_request '/random', :action => 'random_request'
@@ -32,7 +34,10 @@ ActionController::Routing::Routes.draw do |map|
map.with_options :controller => 'request' do |request|
request.request_list_recent '/list/recent', :action => 'list', :view => 'recent'
+ request.request_list_all '/list/all', :action => 'list', :view => 'all'
request.request_list_successful '/list/successful', :action => 'list', :view => 'successful'
+ request.request_list_unsuccessful '/list/unsuccessful', :action => 'list', :view => 'unsuccessful'
+ request.request_list_awaiting '/list/awaiting', :action => 'list', :view => 'awaiting'
request.request_list '/list', :action => 'list'
request.new_request '/new', :action => 'new'
@@ -81,10 +86,18 @@ ActionController::Routing::Routes.draw do |map|
map.with_options :controller => 'public_body' do |body|
body.list_public_bodies "/body", :action => 'list'
+ body.list_public_bodies_default "/body/list/all", :action => 'list'
body.list_public_bodies "/body/list/:tag", :action => 'list'
body.list_public_bodies_redirect "/local/:tag", :action => 'list_redirect'
body.all_public_bodies_csv "/body/all-authorities.csv", :action => 'list_all_csv'
- body.show_public_body "/body/:url_name.:format", :action => 'show'
+ body.show_public_body "/body/:url_name.:format", :action => 'show', :view => 'all'
+ body.show_public_body_all "/body/:url_name/all", :action => 'show', :view => 'all'
+ body.show_public_body_successful "/body/:url_name/successful", :action => 'show', :view => "successful"
+ body.show_public_body_unsuccessful "/body/:url_name/unsuccessful", :action => 'show', :view => "unsuccessful"
+ body.show_public_body_awaiting "/body/:url_name/awaiting", :action => 'show', :view => "awaiting"
+ body.show_public_body_tag "/body/:url_name/:tag", :action => 'show'
+ body.show_public_body_tag_view "/body/:url_name/:tag/:view", :action => 'show'
+
body.view_public_body_email "/body/:url_name/view_email", :action => 'view_email'
end