aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/Vagrantfile23
-rw-r--r--config/application.rb18
-rw-r--r--config/crontab-example2
-rw-r--r--config/general.yml-example8
-rw-r--r--config/initializers/alaveteli.rb3
-rw-r--r--config/routes.rb9
6 files changed, 31 insertions, 32 deletions
diff --git a/config/Vagrantfile b/config/Vagrantfile
deleted file mode 100644
index 4253215fc..000000000
--- a/config/Vagrantfile
+++ /dev/null
@@ -1,23 +0,0 @@
-# This Vagrantfile should be used with the --no-color option, e.g.
-# vagrant --no-color up
-# Then you should be able to visit the site at:
-# http://alaveteli.10.10.10.30.xip.io
-
-Vagrant::Config.run do |config|
- config.vm.box = "precise64"
- config.vm.box_url = "http://files.vagrantup.com/precise64.box"
- config.vm.network :hostonly, "10.10.10.30"
- # The bundle install fails unless you have quite a large amount of
- # memory; insist on 1.5GiB:
- config.vm.customize ["modifyvm", :id, "--memory", 1536]
- # Fetch and run the install script:
- config.vm.provision :shell, :inline => "wget -O install-site.sh https://raw.github.com/mysociety/commonlib/master/bin/install-site.sh"
- config.vm.provision :shell, :inline => "chmod a+rx install-site.sh"
- # This is only needed before the install-script branch is merged to
- # master:
- config.vm.provision :shell, :inline => "sed -i -e 's/BRANCH=master/BRANCH=install-script/' install-site.sh"
- config.vm.provision :shell, :inline => "./install-site.sh " \
- "alaveteli " \
- "alaveteli " \
- "alaveteli.10.10.10.30.xip.io"
-end
diff --git a/config/application.rb b/config/application.rb
index 6b7d1b976..923542607 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -68,6 +68,7 @@ module Alaveteli
end
config.autoload_paths << "#{Rails.root.to_s}/lib/mail_handler"
+ config.autoload_paths << "#{Rails.root.to_s}/lib/attachment_to_html"
# See Rails::Configuration for more options
ENV['RECAPTCHA_PUBLIC_KEY'] = ::AlaveteliConfiguration::recaptcha_public_key
@@ -92,16 +93,16 @@ module Alaveteli
# Change the path that assets are served from
# config.assets.prefix = "/assets"
- # These additional precompiled Javascript files are actually
- # manifests that require the real javascript files:
+ # These additional precompiled asset files are actually
+ # manifests that require the real asset files:
config.assets.precompile += ['admin.js',
'profile-photos.js',
- 'stats.js']
+ 'stats.js',
+ 'fancybox.css',
+ 'fancybox.js']
# ... while these are individual files that can't easily be
# grouped:
- config.assets.precompile += ['jquery.fancybox-1.3.4.pack.js',
- 'jquery.fancybox-1.3.4.css',
- 'jquery.Jcrop.css',
+ config.assets.precompile += ['jquery.Jcrop.css',
'excanvas.min.js',
'select-authorities.js',
'jquery_ujs.js',
@@ -112,5 +113,10 @@ module Alaveteli
'ie6.css',
'ie7.css']
+ config.sass.load_paths += [
+ "#{Gem.loaded_specs['foundation-rails'].full_gem_path}/vendor/assets/stylesheets/foundation/components",
+ "#{Gem.loaded_specs['foundation-rails'].full_gem_path}/vendor/assets/stylesheets/foundation/"
+ ]
+
end
end
diff --git a/config/crontab-example b/config/crontab-example
index 64d0c45c9..8fe13151b 100644
--- a/config/crontab-example
+++ b/config/crontab-example
@@ -12,7 +12,7 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org
# Every 10 minutes
5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/foi-alert-tracks check
5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/foi-purge-varnish check
-0,10,20,30,40,50 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-batch-requests.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/send-batch-requests || echo "stalled?"
+0,10,20,30,40,50 * * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/send-batch-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/send-batch-requests || echo "stalled?"
# Once an hour
09 * * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-comment-on-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-comment-on-request || echo "stalled?"
diff --git a/config/general.yml-example b/config/general.yml-example
index 6140cfe73..6e223406e 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -172,7 +172,6 @@ VARNISH_HOST: localhost
# Adding a value here will enable Google Analytics on all non-admin pages for non-admin users.
GA_CODE: ''
-
# If you want to override *all* the public body request emails with your own
# email so that request emails that would normally go to the public body
# go to you, then uncomment below and fill in your email.
@@ -216,6 +215,10 @@ USE_MAILCATCHER_IN_DEVELOPMENT: true
# config.action_controller.perform_caching is set to true
CACHE_FRAGMENTS: true
+# The default bundle path is vendor/bundle; you can set this option to
+# change it.
+BUNDLE_PATH: vendor/bundle
+
# In some deployments of Alaveteli you may wish to install each newly
# deployed version alongside the previous ones, in which case certain
# files and resources should be shared between these installations:
@@ -250,3 +253,6 @@ SHARED_DIRECTORIES:
# user via the user admin page.
ALLOW_BATCH_REQUESTS: false
+
+# Should we use the responsive stylesheets?
+RESPONSIVE_STYLING: false
diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb
index c7672d05b..6fb6b1420 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.17'
+ALAVETELI_VERSION = '0.18'
# Add new inflection rules using the following format
# (all these examples are active by default):
@@ -52,6 +52,7 @@ require 'alaveteli_localization'
require 'message_prominence'
require 'theme'
require 'xapian_queries'
+require 'date_quarter'
AlaveteliLocalization.set_locales(AlaveteliConfiguration::available_locales,
AlaveteliConfiguration::default_locale)
diff --git a/config/routes.rb b/config/routes.rb
index 87a62c0bf..d9d21f0bd 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -233,6 +233,7 @@ Alaveteli::Application.routes.draw do
match '/admin/user/destroy_track' => 'admin_user#destroy_track', :as => :admin_user_destroy_track
match '/admin/user/login_as/:id' => 'admin_user#login_as', :as => :admin_user_login_as
match '/admin/user/clear_profile_photo/:id' => 'admin_user#clear_profile_photo', :as => :admin_clear_profile_photo
+ match '/admin/user/modify_comment_visibility/:id' => 'admin_user#modify_comment_visibility', :as => 'admin_user_modify_comment_visibility'
####
#### AdminTrack controller
@@ -247,6 +248,14 @@ Alaveteli::Application.routes.draw do
match '/admin/censor/destroy/:censor_rule_id' => 'admin_censor_rule#destroy', :as => :admin_rule_destroy
####
+ #### AdminSpamAddresses controller
+ scope '/admin' do
+ resources :spam_addresses,
+ :controller => 'admin_spam_addresses',
+ :only => [:index, :create, :destroy]
+ end
+ ####
+
#### Api controller
match '/api/v2/request.json' => 'api#create_request', :as => :api_create_request, :via => :post