diff options
author | Mark Longair <mhl@pobox.com> | 2013-11-07 15:49:15 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-11-07 15:49:15 +0000 |
commit | 99c35e70de774a4ad8dfeb3e72badb4a7e5f94aa (patch) | |
tree | fd57b28710e28d9f6305d808b79f3bced87a7d8b /lib | |
parent | 9541299e871bfd82d9c48745cce721a919dbde73 (diff) | |
parent | 0bd2e863f0f824aaa14cdabaeca865bea3c0b898 (diff) |
Merge branch 'install-script' into rails-3-develop
Diffstat (limited to 'lib')
-rw-r--r-- | lib/configuration.rb | 1 | ||||
-rw-r--r-- | lib/tasks/config_files.rake | 26 |
2 files changed, 21 insertions, 6 deletions
diff --git a/lib/configuration.rb b/lib/configuration.rb index ab985c8bf..fba70f27c 100644 --- a/lib/configuration.rb +++ b/lib/configuration.rb @@ -69,6 +69,7 @@ module AlaveteliConfiguration :TWITTER_WIDGET_ID => false, :USE_DEFAULT_BROWSER_LANGUAGE => true, :USE_GHOSTSCRIPT_COMPRESSION => false, + :USE_MAILCATCHER_IN_DEVELOPMENT => true, :UTILITY_SEARCH_PATH => ["/usr/bin", "/usr/local/bin"], :VARNISH_HOST => '', :WORKING_OR_CALENDAR_DAYS => 'working', diff --git a/lib/tasks/config_files.rake b/lib/tasks/config_files.rake index d3843f3a4..d0e4001f0 100644 --- a/lib/tasks/config_files.rake +++ b/lib/tasks/config_files.rake @@ -11,11 +11,7 @@ namespace :config_files do var = $1.to_sym replacement = replacements[var] if replacement == nil - if ! (skip[var] == true) - raise "Unhandled variable in .ugly file: $#{var}" - else - match - end + raise "Unhandled variable in .ugly file: $#{var}" else replacements[var] end @@ -52,5 +48,23 @@ namespace :config_files do end end + 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' + check_for_env_vars(['DEPLOY_USER', + 'VHOST_DIR', + 'VCSPATH', + 'SITE', + 'CRONTAB'], example) + replacements = { + :user => ENV['DEPLOY_USER'], + :vhost_dir => ENV['VHOST_DIR'], + :vcspath => ENV['VCSPATH'], + :site => ENV['SITE'] + } + convert_ugly(ENV['CRONTAB'], replacements).each do |line| + puts line + end + end -end
\ No newline at end of file +end |