aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/environment.rb16
-rw-r--r--config/general.yml-example14
-rw-r--r--config/memcached.yml-test2
-rw-r--r--config/routes.rb32
-rw-r--r--config/test.yml9
5 files changed, 18 insertions, 55 deletions
diff --git a/config/environment.rb b/config/environment.rb
index d580a1096..4621c6a02 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -18,7 +18,7 @@ end
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.3.16' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '2.3.17' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
@@ -43,7 +43,7 @@ require File.join(File.dirname(__FILE__), '../lib/old_rubygems_patch')
require 'configuration'
# Application version
-ALAVETELI_VERSION = '0.6.9'
+ALAVETELI_VERSION = '0.7'
Rails::Initializer.run do |config|
# Load intial mySociety config
@@ -117,17 +117,6 @@ end
# Domain for URLs (so can work for scripts, not just web pages)
ActionMailer::Base.default_url_options[:host] = Configuration::domain
-# So that javascript assets use full URL, so proxied admin URLs read javascript OK
-if (Configuration::domain != "")
- ActionController::Base.asset_host = Proc.new { |source, request|
- if ENV["RAILS_ENV"] != "test" && request.fullpath.match(/^\/admin\//)
- Configuration::admin_public_url
- else
- Configuration::domain
- end
- }
-end
-
# fallback locale and available locales
available_locales = Configuration::available_locales.split(/ /)
default_locale = Configuration::default_locale
@@ -145,7 +134,6 @@ require 'ruby19.rb'
require 'activesupport_cache_extensions.rb'
require 'timezone_fixes.rb'
require 'use_spans_for_errors.rb'
-require 'make_html_4_compliant.rb'
require 'activerecord_errors_extensions.rb'
require 'willpaginate_extension.rb'
require 'sendmail_return_path.rb'
diff --git a/config/general.yml-example b/config/general.yml-example
index 4b9c22f79..5005fda77 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -58,7 +58,6 @@ FRONTPAGE_PUBLICBODY_EXAMPLES: 'tgq'
# script). Earlier in the list means the templates have a higher
# priority.
THEME_URLS:
- - 'git://github.com/mysociety/adminbootstraptheme.git'
- 'git://github.com/mysociety/alavetelitheme.git'
# When rails-post-deploy installs the themes it will try this branch first
@@ -105,19 +104,6 @@ TRACK_SENDER_NAME: 'Alaveteli Webmaster'
# this up!
RAW_EMAILS_LOCATION: 'files/raw_emails'
-# The base URL for admin pages, must always end with a '/'
-# e.g. https://www.example.com/secure/alaveteli-admin/
-# If not specified, it will default to the path to the admin controller,
-# which is usually what you want. It is useful in situations where admin
-# requests are proxied via a secure server, for example.
-ADMIN_BASE_URL: ''
-
-# Where /stylesheets sits under for admin pages. See asset_host in
-# config/environment.rb. Can be full domain or relative path (not an
-# absolute path beginning with /). Again, unlikely to want to change
-# this.
-ADMIN_PUBLIC_URL: ''
-
# Secret key for signing cookie_store sessions
COOKIE_STORE_SESSION_SECRET: 'your secret key here, make it long and random'
diff --git a/config/memcached.yml-test b/config/memcached.yml-test
deleted file mode 100644
index 18d959876..000000000
--- a/config/memcached.yml-test
+++ /dev/null
@@ -1,2 +0,0 @@
-test:
- disabled: true \ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 3512b4cd4..ee7ebdcac 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -10,7 +10,7 @@ $alaveteli_route_extensions.each do |f|
end
ActionController::Routing::Routes.draw do |map|
-
+
# The priority is based upon order of creation: first created -> highest priority.
# Sample of regular route:
@@ -43,7 +43,7 @@ ActionController::Routing::Routes.draw do |map|
request.request_list '/list', :action => 'list'
request.select_authority '/select_authority', :action => 'select_authority'
-
+
request.new_request '/new', :action => 'new'
request.new_request_to_body '/new/:url_name', :action => 'new'
@@ -64,7 +64,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'
-
+
# It would be nice to add :conditions => { :method => :post } to this next one,
# because it ought not really to be available as a GET request since it changes
# the server state. Unfortunately this doesn’t play well with the PostRedirect
@@ -161,9 +161,9 @@ ActionController::Routing::Routes.draw do |map|
end
map.with_options :controller => 'request_game' do |game|
- game.play '/categorise/play', :action => 'play'
- game.request '/categorise/request/:url_title', :action => 'show'
- game.stop '/categorise/stop', :action => 'stop'
+ game.categorise_play '/categorise/play', :action => 'play'
+ game.categorise_request '/categorise/request/:url_title', :action => 'show'
+ game.categorise_stop '/categorise/stop', :action => 'stop'
end
map.with_options :controller => 'admin_public_body' do |body|
@@ -171,10 +171,10 @@ ActionController::Routing::Routes.draw do |map|
body.admin_body_index '/admin/body', :action => 'index'
body.admin_body_list '/admin/body/list', :action => 'list'
body.admin_body_show '/admin/body/show/:id', :action => 'show'
- body.admin_body_new '/admin/body/new/:id', :action => 'new'
+ body.admin_body_new '/admin/body/new', :action => 'new'
body.admin_body_edit '/admin/body/edit/:id', :action => 'edit'
body.admin_body_update '/admin/body/update/:id', :action => 'update'
- body.admin_body_create '/admin/body/create/:id', :action => 'create'
+ body.admin_body_create '/admin/body/create', :action => 'create'
body.admin_body_destroy '/admin/body/destroy/:id', :action => 'destroy'
body.admin_body_import_csv '/admin/body/import_csv', :action => 'import_csv'
body.admin_body_mass_tag_add '/admin/body/mass_tag_add', :action => 'mass_tag_add'
@@ -185,10 +185,10 @@ ActionController::Routing::Routes.draw do |map|
admin.admin_timeline '/admin/timeline', :action => 'timeline'
admin.admin_debug '/admin/debug', :action => 'debug'
admin.admin_stats '/admin/stats', :action => 'stats'
+ admin.admin_js '/admin/javascripts/admin.js', :action => 'admin_js'
end
map.with_options :controller => 'admin_request' do |admin|
- admin.admin_request_list_old_unclassified '/admin/unclassified', :action => 'list_old_unclassified'
admin.admin_request_index '/admin/request', :action => 'index'
admin.admin_request_list '/admin/request/list', :action => 'list'
admin.admin_request_show '/admin/request/show/:id', :action => 'show'
@@ -197,11 +197,11 @@ ActionController::Routing::Routes.draw do |map|
admin.admin_request_update '/admin/request/update/:id', :action => 'update'
admin.admin_request_destroy '/admin/request/destroy/:id', :action => 'fully_destroy'
admin.admin_request_edit_outgoing '/admin/request/edit_outgoing/:id', :action => 'edit_outgoing'
- admin.admin_request_destroy_outgoing '/admin/request/destroy_outgoing/:id', :action => 'destroy_outgoing'
+ admin.admin_request_destroy_outgoing '/admin/request/destroy_outgoing', :action => 'destroy_outgoing'
admin.admin_request_update_outgoing '/admin/request/update_outgoing/:id', :action => 'update_outgoing'
admin.admin_request_edit_comment '/admin/request/edit_comment/:id', :action => 'edit_comment'
admin.admin_request_update_comment '/admin/request/update_comment/:id', :action => 'update_comment'
- admin.admin_request_destroy_incoming '/admin/request/destroy_incoming/:id', :action => 'destroy_incoming'
+ admin.admin_request_destroy_incoming '/admin/request/destroy_incoming', :action => 'destroy_incoming'
admin.admin_request_redeliver_incoming '/admin/request/redeliver_incoming', :action => 'redeliver_incoming'
admin.admin_request_move_request '/admin/request/move_request', :action => 'move_request'
admin.admin_request_generate_upload_url '/admin/request/generate_upload_url/:id', :action => 'generate_upload_url'
@@ -217,7 +217,7 @@ ActionController::Routing::Routes.draw do |map|
user.admin_user_list_banned '/admin/user/banned', :action => 'list_banned'
user.admin_user_show '/admin/user/show/:id', :action => 'show'
user.admin_user_edit '/admin/user/edit/:id', :action => 'edit'
- user.admin_user_show '/admin/user/show_bounce_message/:id', :action => 'show_bounce_message'
+ user.admin_user_show_bounce '/admin/user/show_bounce_message/:id', :action => 'show_bounce_message'
user.admin_user_update '/admin/user/update/:id', :action => 'update'
user.admin_user_clear_bounce '/admin/user/clear_bounce/:id', :action => 'clear_bounce'
user.admin_user_destroy_track '/admin/user/destroy_track', :action => 'destroy_track'
@@ -236,16 +236,16 @@ ActionController::Routing::Routes.draw do |map|
rule.admin_rule_update '/admin/censor/update/:id', :action => 'update'
rule.admin_rule_destroy '/admin/censor/destroy/:censor_rule_id', :action => 'destroy'
end
-
+
map.with_options :controller => 'api' do |api|
api.api_create_request '/api/v2/request.json', :action => 'create_request', :conditions => { :method => :post }
-
+
api.api_show_request '/api/v2/request/:id.json', :action => 'show_request', :conditions => { :method => :get }
api.api_add_correspondence '/api/v2/request/:id.json', :action => 'add_correspondence', :conditions => { :method => :post }
-
+
api.api_body_request_events '/api/v2/body/:id/request_events.:feed_type', :action => 'body_request_events', :feed_type => '^(json|atom)$'
end
-
+
map.filter('conditionallyprependlocale')
# Allow downloading Web Service WSDL as a file with an extension
diff --git a/config/test.yml b/config/test.yml
index ef270dcf2..f40b11764 100644
--- a/config/test.yml
+++ b/config/test.yml
@@ -71,15 +71,6 @@ CONTACT_NAME: 'Alaveteli Webmaster'
# this up!
RAW_EMAILS_LOCATION: 'files/raw_emails'
-# The base URL for admin pages. You probably don't want to change this.
-ADMIN_BASE_URL: ''
-
-# Where /stylesheets sits under for admin pages. See asset_host in
-# config/environment.rb. Can be full domain or relative path (not an
-# absolute path beginning with /). Again, unlikely to want to change
-# this.
-ADMIN_PUBLIC_URL: ''
-
# Secret key for signing cookie_store sessions
COOKIE_STORE_SESSION_SECRET: 'your secret key here, make it long and random'