aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rwxr-xr-xconfig/alert-tracks-debian.example4
-rw-r--r--config/application.rb5
-rw-r--r--config/crontab-example4
-rw-r--r--config/httpd.conf-example4
-rw-r--r--config/initializers/alaveteli.rb2
-rw-r--r--config/initializers/xml.rb2
-rwxr-xr-xconfig/purge-varnish-debian.example4
-rw-r--r--config/run-with-rbenv-path.example8
8 files changed, 29 insertions, 4 deletions
diff --git a/config/alert-tracks-debian.example b/config/alert-tracks-debian.example
index a098bc332..ac4a55c8f 100755
--- a/config/alert-tracks-debian.example
+++ b/config/alert-tracks-debian.example
@@ -24,6 +24,10 @@ DUSER=!!(*= $user *)!!
# RAILS_ENV=your_rails_env
# export RAILS_ENV
+# Uncomment the following line if running under rbenv - we want this daemon to run
+# in the context of the ruby version defined for the site
+# PATH=/home/!!(*= $user *)!!/.rbenv/shims:/usr/local/bin:/usr/bin:/bin
+
trap "" 1
export PIDFILE LOGFILE
diff --git a/config/application.rb b/config/application.rb
index ed7488454..89b625cb4 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -85,7 +85,7 @@ module Alaveteli
config.middleware.insert_before ::ActionDispatch::Cookies, WhatDoTheyKnow::StripEmptySessions, :key => '_wdtk_cookie_session', :path => "/", :httponly => true
# Strip non-UTF-8 request parameters
- if RUBY_VERSION.to_f >= 1.9
+ if RUBY_VERSION == '1.9.3'
config.middleware.insert 0, Rack::UTF8Sanitizer
end
@@ -113,10 +113,9 @@ module Alaveteli
'fancybox.js']
# ... while these are individual files that can't easily be
# grouped:
- config.assets.precompile += ['jquery.Jcrop.css',
+ config.assets.precompile += ['jquery.Jcrop.min.css',
'excanvas.min.js',
'select-authorities.js',
- 'jquery_ujs.js',
'new-request.js',
'fonts.css',
'print.css',
diff --git a/config/crontab-example b/config/crontab-example
index bfcba0568..a83f418fa 100644
--- a/config/crontab-example
+++ b/config/crontab-example
@@ -5,6 +5,10 @@
# Email: hello@mysociety.org. WWW: http://www.mysociety.org/
PATH=/usr/local/bin:/usr/bin:/bin
+# Uncomment the following line if running under rbenv - we want this cron to run
+# in the context of the ruby version defined for the site
+# PATH=/home/!!(*= $user *)!!/.rbenv/shims:/usr/local/bin:/usr/bin:/bin
+
MAILTO=!!(*= $mailto *)!!
# Every 5 minutes
diff --git a/config/httpd.conf-example b/config/httpd.conf-example
index 00722fbdf..f70068481 100644
--- a/config/httpd.conf-example
+++ b/config/httpd.conf-example
@@ -25,6 +25,10 @@
PassengerAppRoot /var/www/alaveteli
PassengerResolveSymlinksInDocumentRoot on
+ # Uncomment the following line if you want to run Alaveteli
+ # with the ruby set by rbenv
+ # PassengerRuby /home/alaveteli/.rbenv/shims/ruby
+
# See http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/
# and http://blog.scoutapp.com/articles/2009/12/08/production-rails-tuning-with-passenger-passengermaxprocesses
# for more information on tuning Passenger
diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb
index 506e3471f..d4b4be7bc 100644
--- a/config/initializers/alaveteli.rb
+++ b/config/initializers/alaveteli.rb
@@ -11,7 +11,7 @@ load "debug_helpers.rb"
load "util.rb"
# Application version
-ALAVETELI_VERSION = '0.21.0.36'
+ALAVETELI_VERSION = '0.21.0.38'
# Add new inflection rules using the following format
# (all these examples are active by default):
diff --git a/config/initializers/xml.rb b/config/initializers/xml.rb
new file mode 100644
index 000000000..aefd54214
--- /dev/null
+++ b/config/initializers/xml.rb
@@ -0,0 +1,2 @@
+ActiveSupport::XmlMini.backend = 'Nokogiri'
+
diff --git a/config/purge-varnish-debian.example b/config/purge-varnish-debian.example
index 457a77ed8..779266d2d 100755
--- a/config/purge-varnish-debian.example
+++ b/config/purge-varnish-debian.example
@@ -24,6 +24,10 @@ DUSER=!!(*= $user *)!!
# RAILS_ENV=your_rails_env
# export RAILS_ENV
+# Uncomment the following line if running under rbenv - we want this daemon to run
+# in the context of the ruby version defined for the site
+# PATH=/home/!!(*= $user *)!!/.rbenv/shims:/usr/local/bin:/usr/bin:/bin
+
type varnishadm > /dev/null 2>&1 || exit
trap "" 1
diff --git a/config/run-with-rbenv-path.example b/config/run-with-rbenv-path.example
new file mode 100644
index 000000000..25dec9b60
--- /dev/null
+++ b/config/run-with-rbenv-path.example
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# We want this script to run in the context of the ruby version defined for the site
+PATH=/home/!!(*= $user *)!!/.rbenv/shims:$PATH
+
+source "$1"
+
+exit $?