aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.hound.yml5
-rw-r--r--Gemfile1
-rw-r--r--Gemfile.lock3
-rw-r--r--README.md12
-rw-r--r--config/crontab-example26
-rw-r--r--doc/README.md12
-rw-r--r--lib/tasks/config_files.rake5
-rwxr-xr-xscript/site-specific-install.sh1
8 files changed, 33 insertions, 32 deletions
diff --git a/.hound.yml b/.hound.yml
index 574cfe7ac..01bb3875d 100644
--- a/.hound.yml
+++ b/.hound.yml
@@ -5,7 +5,4 @@ Style/IndentationWidth:
Enabled: false
Style/HashSyntax:
- Description: >-
- Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax
- { :a => 1, :b => 2 }.
- Enabled: false
+ EnforcedStyle: hash_rockets
diff --git a/Gemfile b/Gemfile
index fa6c39262..b79d0c145 100644
--- a/Gemfile
+++ b/Gemfile
@@ -82,6 +82,7 @@ end
group :development do
gem 'capistrano'
gem 'mailcatcher'
+ gem 'quiet_assets'
gem 'rdoc'
end
diff --git a/Gemfile.lock b/Gemfile.lock
index fd02983c0..ea5bce848 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -162,6 +162,8 @@ GEM
railties (~> 3.0)
pg (0.15.1)
polyglot (0.3.4)
+ quiet_assets (1.0.2)
+ railties (>= 3.1, < 5.0)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
@@ -312,6 +314,7 @@ DEPENDENCIES
newrelic_rpm
nokogiri
pg
+ quiet_assets
rack
rails (= 3.2.18)
rails-i18n
diff --git a/README.md b/README.md
index a860470a4..2a0d3ed80 100644
--- a/README.md
+++ b/README.md
@@ -17,12 +17,12 @@ Please join our mailing list at
https://groups.google.com/group/alaveteli-dev and introduce yourself, or
drop a line to hello@alaveteli.org to let us know that you're using Alaveteli.
-Some documentation can be found in the
-[`doc/` folder](https://github.com/mysociety/alaveteli/tree/master/doc).
-There's background information and more documentation on
-[our wiki](https://github.com/mysociety/alaveteli/wiki/Home/), and lots
-of useful information (including a blog) on
-[the project website](http://alaveteli.org)
+There's lots of useful information and documentation (including a blog)
+on [the project website](http://alaveteli.org). There's background
+information and notes on [our
+wiki](https://github.com/mysociety/alaveteli/wiki/Home/), and upgrade
+notes in the [`doc/`
+folder](https://github.com/mysociety/alaveteli/tree/master/doc/CHANGES.md)
## How to contribute
diff --git a/config/crontab-example b/config/crontab-example
index 8fe13151b..212a4a689 100644
--- a/config/crontab-example
+++ b/config/crontab-example
@@ -5,32 +5,32 @@
# Email: hello@mysociety.org. WWW: http://www.mysociety.org/
PATH=/usr/local/bin:/usr/bin:/bin
-MAILTO=cron-!!(*= $site *)!!@mysociety.org
+MAILTO=!!(*= $mailto *)!!
# Every 5 minutes
-*/5 * * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-xapian-index verbose=true" >> !!(*= $vhost_dir *)!!/logs/update-xapian-index.log || echo "stalled?"
+*/5 * * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-xapian-index verbose=true" >> !!(*= $vhost_dir *)!!/logs/update-xapian-index.log || echo "stalled?"
# 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 !!(*= $vhost_dir *)!!/send-batch-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/send-batch-requests || echo "stalled?"
+0,10,20,30,40,50 * * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -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?"
+09 * * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-comment-on-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-comment-on-request || echo "stalled?"
# Only root can read the log files
-31 * * * * root run-with-lockfile -n !!(*= $vhost_dir *)!!/load-mail-server-logs.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/load-mail-server-logs || echo "stalled?"
+31 * * * * root !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/load-mail-server-logs.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/load-mail-server-logs || echo "stalled?"
# Once a day, early morning
-23 4 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/delete-old-things.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/delete-old-things || echo "stalled?"
-0 6 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-overdue-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-overdue-requests || echo "stalled?"
-0 7 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-new-response-reminders.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-new-response-reminders || echo "stalled?"
-0 8 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-not-clarified-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-not-clarified-request || echo "stalled?"
-2 4 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/check-recent-requests-sent.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/check-recent-requests-sent || echo "stalled?"
-45 3 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/stop-new-responses-on-old-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/stop-new-responses-on-old-requests || echo "stalled?"
-55 4 * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/update-public-body-stats.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-public-body-stats || echo "stalled?"
+23 4 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/delete-old-things.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/delete-old-things || echo "stalled?"
+0 6 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-overdue-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-overdue-requests || echo "stalled?"
+0 7 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-new-response-reminders.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-new-response-reminders || echo "stalled?"
+0 8 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/alert-not-clarified-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-not-clarified-request || echo "stalled?"
+2 4 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/check-recent-requests-sent.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/check-recent-requests-sent || echo "stalled?"
+45 3 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/stop-new-responses-on-old-requests.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/stop-new-responses-on-old-requests || echo "stalled?"
+55 4 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/update-public-body-stats.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/update-public-body-stats || echo "stalled?"
# Only root can restart apache
-31 1 * * * root run-with-lockfile -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/compact-xapian-database production" || echo "stalled?"
+31 1 * * * root !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/compact-xapian-database production" || echo "stalled?"
# Once a day on all servers
diff --git a/doc/README.md b/doc/README.md
index d8e9b409c..181076f2c 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,9 +1,9 @@
-The main Alaveteli documentation now lives on the [Alaveteli documentation site](http://code.alaveteli.org/docs/)
+The main Alaveteli documentation now lives on the [Alaveteli site](http://alaveteli.org/docs/)
Specifically:
-[Installation](http://code.alaveteli.org/docs/installing/)
-[Themes](http://code.alaveteli.org/docs/customising/themes/)
-[Translation](http://code.alaveteli.org/docs/customising/translation/)
-[Email](http://code.alaveteli.org/docs/installing/email/)
-[Deployment](http://code.alaveteli.org/docs/installing/deploy/)
+* [Installation](http://alaveteli.org/docs/installing/)
+* [Themes](http://alaveteli.org/docs/customising/themes/)
+* [Translation](http://alaveteli.org/docs/customising/translation/)
+* [Email](http://alaveteli.org/docs/installing/email/)
+* [Deployment](http://alaveteli.org/docs/installing/deploy/)
diff --git a/lib/tasks/config_files.rake b/lib/tasks/config_files.rake
index d0e4001f0..60814cb27 100644
--- a/lib/tasks/config_files.rake
+++ b/lib/tasks/config_files.rake
@@ -50,7 +50,7 @@ namespace :config_files do
desc 'Convert Debian .ugly crontab file in config to a form suitable for installing in /etc/cron.d'
task :convert_crontab => :environment do
- example = 'rake config_files:convert_crontab DEPLOY_USER=deploy VHOST_DIR=/dir/above/alaveteli VCSPATH=alaveteli SITE=alaveteli CRONTAB=config/crontab-example'
+ example = 'rake config_files:convert_crontab DEPLOY_USER=deploy VHOST_DIR=/dir/above/alaveteli VCSPATH=alaveteli SITE=alaveteli CRONTAB=config/crontab-example MAILTO=cron-alaveteli@example.org'
check_for_env_vars(['DEPLOY_USER',
'VHOST_DIR',
'VCSPATH',
@@ -60,7 +60,8 @@ namespace :config_files do
:user => ENV['DEPLOY_USER'],
:vhost_dir => ENV['VHOST_DIR'],
:vcspath => ENV['VCSPATH'],
- :site => ENV['SITE']
+ :site => ENV['SITE'],
+ :mailto => ENV.fetch('MAILTO') { "cron-#{ ENV['SITE'] }@mysociety.org" }
}
convert_ugly(ENV['CRONTAB'], replacements).each do |line|
puts line
diff --git a/script/site-specific-install.sh b/script/site-specific-install.sh
index 7d47a5990..fce230822 100755
--- a/script/site-specific-install.sh
+++ b/script/site-specific-install.sh
@@ -148,7 +148,6 @@ echo -n "Creating /etc/cron.d/alaveteli... "
sed -r \
-e "/foi-purge-varnish/d" \
-e "s,^(MAILTO=).*,\1root@$HOST," \
- -e "s,run-with-lockfile,$REPOSITORY/commonlib/bin/run-with-lockfile.sh,g" \
-i /etc/cron.d/alaveteli
echo $DONE_MSG