aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/database.yml-example2
-rw-r--r--config/httpd.conf-example4
-rw-r--r--config/initializers/alaveteli.rb13
-rw-r--r--config/packages4
-rw-r--r--config/packages_development9
-rw-r--r--config/routes.rb14
6 files changed, 27 insertions, 19 deletions
diff --git a/config/database.yml-example b/config/database.yml-example
index b1597e6fe..e48577f23 100644
--- a/config/database.yml-example
+++ b/config/database.yml-example
@@ -19,6 +19,8 @@ test:
password: <password>
host: localhost
port: 5432
+# Uncomment the following if the user is not a postgres superuser
+# constraint_disabling: false
production:
adapter: postgresql
diff --git a/config/httpd.conf-example b/config/httpd.conf-example
index 0115ad8d9..1326252f5 100644
--- a/config/httpd.conf-example
+++ b/config/httpd.conf-example
@@ -1,4 +1,4 @@
-# Apache configuracreated_attion for FOI site.
+# Apache configuration for FOI site.
#
# For development ignore this, you can just run ./scripts/server as for any
# Ruby on Rails application.
@@ -51,7 +51,7 @@ RewriteRule ^/request/((\d{1,3})\d*)/(response/\d+/attach/(html/)?\d+/.+) /views
# Recommend setting this to 3 or less on servers with 512MB RAM
PassengerMaxPoolSize 6
# The RackEnv variable applies to Rails 3 applications, while
- # the RailsEnv variable applies to applicatoins for earlier
+ # the RailsEnv variable applies to applications for earlier
# versions of Rails. There doesn't seem to be any harm in
# setting both, however.
RailsEnv production
diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb
index 35d486837..22ea238b7 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.10'
+ALAVETELI_VERSION = '0.11'
# Add new inflection rules using the following format
# (all these examples are active by default):
@@ -43,15 +43,11 @@ I18n.locale = default_locale
I18n.available_locales = available_locales.map {|locale_name| locale_name.to_sym}
I18n.default_locale = default_locale
-# Customise will_paginate URL generation
-WillPaginate::ViewHelpers.pagination_options[:renderer] = 'WillPaginateExtension::LinkRenderer'
-
# Load monkey patches and other things from lib/
require 'ruby19.rb'
require 'activesupport_cache_extensions.rb'
require 'use_spans_for_errors.rb'
require 'activerecord_errors_extensions.rb'
-require 'willpaginate_extension.rb'
require 'i18n_fixes.rb'
require 'world_foi_websites.rb'
require 'alaveteli_external_command.rb'
@@ -59,3 +55,10 @@ require 'quiet_opener.rb'
require 'mail_handler'
require 'public_body_categories'
require 'ability'
+require 'normalize_string'
+require 'alaveteli_file_types'
+
+# Allow tests to be run under a non-superuser database account if required
+if Rails.env == 'test' and ActiveRecord::Base.configurations['test']['constraint_disabling'] == false
+ require 'no_constraint_disabling'
+end
diff --git a/config/packages b/config/packages
index db51e5bdd..f4d0a674c 100644
--- a/config/packages
+++ b/config/packages
@@ -20,7 +20,6 @@ gnuplot-nox
php5-cli
sharutils
unzip
-wdg-html-validator
mutt
tnef (>= 1.4.5)
gettext
@@ -36,4 +35,5 @@ rake (>= 0.9.2.2)
build-essential
bundler
sqlite3
-libsqlite3-dev \ No newline at end of file
+libsqlite3-dev
+libicu-dev
diff --git a/config/packages_development b/config/packages_development
new file mode 100644
index 000000000..14ca815a2
--- /dev/null
+++ b/config/packages_development
@@ -0,0 +1,9 @@
+# This is a list of packages needed on a fresh Ubuntu installation for
+# development.
+#
+# It assumes you're using RVM or a similar Ruby manager and have already
+# run `bundle install`.
+#
+# To install, paste this list after `sudo apt-get install` and run.
+
+postgresql sharutils pdftk elinks php5-cli tnef python-yaml
diff --git a/config/routes.rb b/config/routes.rb
index 1895543d7..062973e37 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -14,7 +14,6 @@ Alaveteli::Application.routes.draw do
#### General contoller
match '/' => 'general#frontpage', :as => :frontpage
match '/blog' => 'general#blog', :as => :blog
- match '/stylesheets/custom.css' => 'general#custom_css', :as => :custom_css
match '/search' => 'general#search_redirect', :as => :search_redirect
match '/search/all' => 'general#search_redirect', :as => :search_redirect
# XXX combined is the search query, and then if sorted a "/newest" at the end.
@@ -24,8 +23,6 @@ Alaveteli::Application.routes.draw do
match '/search/*combined/all' => 'general#search', :as => :search_general, :view => 'all'
match '/search(/*combined)' => 'general#search', :as => :search_general
match '/advancedsearch' => 'general#search_redirect', :as => :advanced_search, :advanced => true
-
- match '/random' => 'general#random_request', :as => :random_request
#####
##### Request controller
@@ -59,15 +56,12 @@ Alaveteli::Application.routes.draw do
match '/upload/request/:url_title' => 'request#upload_response', :as => :upload_response
match '/request/:url_title/download' => 'request#download_entire_request', :as => :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
- # mechanism, which assumes all post-login actions are available via GET, so we
- # refrain.
- match '/request/:url_title/report' => 'request#report_request', :as => :report
####
+ resources :request, :only => [] do
+ resource :report, :only => [:new, :create]
+ end
+
#### User controller
# Use /profile for things to do with the currently signed in user.
# Use /user/XXXX for things that anyone can see about that user.