diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/crontab-example | 5 | ||||
-rw-r--r-- | config/deploy.rb | 5 | ||||
-rw-r--r-- | config/deploy.yml.example | 2 | ||||
-rw-r--r-- | config/general.yml-example | 5 | ||||
-rw-r--r-- | config/initializers/alaveteli.rb | 4 | ||||
-rw-r--r-- | config/locales/rw.yml | 212 | ||||
-rwxr-xr-x | config/sysvinit-thin.ugly | 8 | ||||
-rw-r--r-- | config/test.yml | 2 |
8 files changed, 126 insertions, 117 deletions
diff --git a/config/crontab-example b/config/crontab-example index 44e328e4e..f65555b11 100644 --- a/config/crontab-example +++ b/config/crontab-example @@ -21,6 +21,7 @@ MAILTO=!!(*= $mailto *)!! 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 +31 1 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/commonlib/bin/run-with-lockfile.sh -n !!(*= $vhost_dir *)!!/change-xapian-database.lock "!!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/compact-xapian-database production !!(*= $site *)!!" || 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?" @@ -29,10 +30,6 @@ MAILTO=!!(*= $mailto *)!! 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 !!(*= $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 43 2 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/request-creation-graph 48 2 * * * !!(*= $user *)!! !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/user-use-graph diff --git a/config/deploy.rb b/config/deploy.rb index c1954d058..f4a0b536a 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -14,6 +14,7 @@ set :deploy_to, configuration['deploy_to'] set :user, configuration['user'] set :use_sudo, false set :rails_env, configuration['rails_env'] +set :daemon_name, configuration.fetch('daemon_name', 'alaveteli') server configuration['server'], :app, :web, :db, :primary => true @@ -35,9 +36,9 @@ end namespace :deploy do [:start, :stop, :restart].each do |t| - desc "#{t.to_s.capitalize} Alaveteli service defined in /etc/init.d/alaveteli" + desc "#{t.to_s.capitalize} Alaveteli service defined in /etc/init.d/" task t, :roles => :app, :except => { :no_release => true } do - run "/etc/init.d/alaveteli #{t}" + run "service #{ daemon_name } #{ t }" end end diff --git a/config/deploy.yml.example b/config/deploy.yml.example index a20eb3c22..93aba439a 100644 --- a/config/deploy.yml.example +++ b/config/deploy.yml.example @@ -6,6 +6,7 @@ production: user: deploy rails_env: production deploy_to: /srv/www/alaveteli_production + daemon_name: alaveteli staging: repository: git://github.com/mysociety/alaveteli.git branch: develop @@ -13,3 +14,4 @@ staging: user: deploy rails_env: production deploy_to: /srv/www/alaveteli_staging + daemon_name: alaveteli_staging diff --git a/config/general.yml-example b/config/general.yml-example index 5be62ee21..1f126c5a5 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -154,6 +154,11 @@ USE_DEFAULT_BROWSER_LANGUAGE: true # --- INCLUDE_DEFAULT_LOCALE_IN_URLS: true +# Are authorities required to respond by law? +# +# AUTHORITY_MUST_RESPOND: Boolean (default: true) +AUTHORITY_MUST_RESPOND: true + # The REPLY...AFTER_DAYS settings define how many days must have passed before # an answer to a request is officially late. The SPECIAL case is for some types # of authority (for example: in the UK, schools) which are granted a bit longer diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb index 72c620e44..840639228 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.20.0.4' +ALAVETELI_VERSION = '0.20.0.14' # Add new inflection rules using the following format # (all these examples are active by default): @@ -53,8 +53,6 @@ require 'theme' require 'xapian_queries' require 'date_quarter' require 'public_body_csv' -require 'category_and_heading_migrator' -require 'public_body_categories' require 'routing_filters' require 'alaveteli_text_masker' diff --git a/config/locales/rw.yml b/config/locales/rw.yml index 58422f264..caf72b604 100644 --- a/config/locales/rw.yml +++ b/config/locales/rw.yml @@ -10,138 +10,138 @@ rw: - Sat abbr_month_names: - - - Jan - - Feb - - Mar - - Apr - - May - - Jun - - Jul - - Aug - - Sep - - Oct - - Nov - - Dec + - Mutarama + - Gashyantare + - Werurwe + - Mata + - Gicurasi + - Kamena + - Nyakanga + - Kanama + - Nzeri + - Ukwakira + - Ugushyingo + - Ukuboza day_names: - - Sunday - - Monday - - Tuesday - - Wednesday - - Thursday - - Friday - - Saturday + - Ku cyumweru + - Kuwa mbere + - Kuwa kabiri + - Kuwa gatatu + - Kuwa kane + - Kuwa gatanu + - Kuwa gatandatu formats: default: ! '%Y-%m-%d' long: ! '%B %d, %Y' short: ! '%b %d' month_names: - - - January - - February - - March - - April - - May - - June - - July - - August - - September - - October - - November - - December + - Mutarama + - Gashyantare + - Werurwe + - Mata + - Gicurasi + - Kamena + - Nyakanga + - Kanama + - Nzeri + - Ukwakira + - Ugushyingo + - Ukuboza order: - - :year - - :month - - :day + - :umwaka + - :ukwezi + - :umunsi datetime: distance_in_words: about_x_hours: - one: about 1 hour - other: about %{count} hours + one: isaha ugereranyije + other: amasaha %{count} about_x_months: - one: about 1 month - other: about %{count} months + one: ukwezi ugereranyije + other: amezi %{count} about_x_years: - one: about 1 year - other: about %{count} years + one: umwaka ugereranyije + other: imyaka %{count} almost_x_years: - one: almost 1 year - other: almost %{count} years - half_a_minute: half a minute + one: umwaka ugereranyije + other: hafi y'imyaka %{count} + half_a_minute: igice cy'umunota less_than_x_minutes: - one: less than a minute - other: less than %{count} minutes + one: munsi y'umunota + other: munsi y'iminota %{count} less_than_x_seconds: - one: less than 1 second - other: less than %{count} seconds + one: munsi y'isegonda + other: munsi y'amasegonda %{count} over_x_years: - one: over 1 year - other: over %{count} years + one: hafi umwaka + other: imyaka %{count} x_days: - one: 1 day - other: ! '%{count} days' + one: umunsi umwe + other: ! 'iminsi %{count}' x_minutes: - one: 1 minute - other: ! '%{count} minutes' + one: umunota umwe + other: ! 'iminote %{count}' x_months: - one: 1 month - other: ! '%{count} months' + one: ukwezi kumwe + other: ! 'amazi %{count}' x_seconds: - one: 1 second - other: ! '%{count} seconds' + one: isegonda rimwe + other: ! 'amasegonda %{count}' prompts: - day: Day - hour: Hour - minute: Minute - month: Month - second: Seconds - year: Year + day: Umunsi + hour: Isaha + minute: Umunota + month: Ukwezi + second: Isegonda + year: Umwaka errors: format: ! '%{attribute} %{message}' messages: - accepted: must be accepted - blank: can't be blank - present: must be blank - confirmation: ! "doesn't match %{attribute}" - empty: can't be empty - equal_to: must be equal to %{count} - even: must be even + accepted: bigomba kwemerwa + blank: hagomba kuzuzwa + present: ntuhuzuze + confirmation: ! "ntibihura na %{attribute}" + empty: hagomba kuzuzwa + equal_to: bigomba kungana na%{count} + even: umubare ugomba kugabanyika na kabiri exclusion: is reserved - greater_than: must be greater than %{count} - greater_than_or_equal_to: must be greater than or equal to %{count} - inclusion: is not included in the list - invalid: is invalid - less_than: must be less than %{count} - less_than_or_equal_to: must be less than or equal to %{count} - not_a_number: is not a number - not_an_integer: must be an integer - odd: must be odd - record_invalid: ! 'Validation failed: %{errors}' + greater_than: bigomba kurenga %{count} + greater_than_or_equal_to: bigomba kurenga cyangwa kungana na %{count} + inclusion: ntibiri ku rutonde + invalid: sibyo + less_than: ntibirenge %{count} + less_than_or_equal_to: munsi cyangwa bingana na %{count} + not_a_number: si umubare + not_an_integer: hagomba kuba umubare + odd: hagomba kuba igiharwe + record_invalid: ! 'Kwemezwa byanze: %{errors}' restrict_dependent_destroy: - one: "Cannot delete record because a dependent %{record} exists" - many: "Cannot delete record because dependent %{record} exist" - taken: has already been taken + one: "Ntibyasibama kubera hari %{record} uwabyanditse" + many: "Ntibyasibama kubera hari %{record} uwabyanditse" + taken: byamaze gufatwa too_long: - one: is too long (maximum is 1 character) - other: is too long (maximum is %{count} characters) + one: Nturenze inyuguti imwe + other: Nturenze %{count} inyuguti too_short: - one: is too short (minimum is 1 character) - other: is too short (minimum is %{count} characters) + one: Byibura inyuguti imwe + other: Byibura %{count} inyuguti wrong_length: - one: is the wrong length (should be 1 character) - other: is the wrong length (should be %{count} characters) - other_than: "must be other than %{count}" + one: warengeje, inyuguti imwe gusa + other: warengeje, inyuguti %{count} gusa + other_than: "bitandukane na %{count}" template: - body: ! 'There were problems with the following fields:' + body: ! 'Havutse ibibazo kuri ibi bice:' header: - one: 1 error prohibited this %{model} from being saved - other: ! '%{count} errors prohibited this %{model} from being saved' + one: ikibazo kimwe cyatumye %{model} itinjizwa + other: ! 'ibibazo %{count} byatumye %{model} itinjizwa' helpers: select: - prompt: Please select + prompt: Hitamo submit: - create: Create %{model} - submit: Save %{model} - update: Update %{model} + create: Rema %{model} + submit: Bika %{model} + update: Hindura %{model} number: currency: format: @@ -162,10 +162,10 @@ rw: decimal_units: format: ! '%n %u' units: - billion: Billion - million: Million + billion: Tiriyari + million: Miriyoni quadrillion: Quadrillion - thousand: Thousand + thousand: ibihumbi trillion: Trillion unit: '' format: @@ -187,13 +187,13 @@ rw: format: delimiter: '' format: "%n%" - precision: - format: - delimiter: '' + precision: + format: + delimiter: '' support: array: - last_word_connector: ! ', and ' - two_words_connector: ! ' and ' + last_word_connector: ! ', na ' + two_words_connector: ! ' na ' words_connector: ! ', ' time: am: am @@ -201,4 +201,4 @@ rw: default: ! '%a, %d %b %Y %H:%M:%S %z' long: ! '%B %d, %Y %H:%M' short: ! '%d %b %H:%M' - pm: pm + pm: nyuma ya saa sita diff --git a/config/sysvinit-thin.ugly b/config/sysvinit-thin.ugly index b333f3738..0155ff8c3 100755 --- a/config/sysvinit-thin.ugly +++ b/config/sysvinit-thin.ugly @@ -22,7 +22,13 @@ RAILS_ENV=!!(*= $rails_env *)!! set -e # Check that the Daemon can be run -su -l -c "cd $SITE_HOME && bundle exec thin --version &> /dev/null || exit 0" $USER +CURRENT_USER=$(whoami) +if [ "$CURRENT_USER" = "$USER" ] + then + cd $SITE_HOME && bundle exec thin --version > /dev/null 2>&1 || exit 0 + else + su -l -c "cd $SITE_HOME && bundle exec thin --version &> /dev/null || exit 0" $USER +fi start_daemon() { echo -n "Starting $DESC: " diff --git a/config/test.yml b/config/test.yml index 599e1e81a..4a5de704f 100644 --- a/config/test.yml +++ b/config/test.yml @@ -27,7 +27,7 @@ BLOG_FEED: 'http://www.mysociety.org/category/projects/whatdotheyknow/feed/' TWITTER_USERNAME: 'alaveteli_foi' # Locales we wish to support in this app, space-delimited -AVAILABLE_LOCALES: 'en es en_GB' +AVAILABLE_LOCALES: 'en es fr en_GB' DEFAULT_LOCALE: 'en' # if 'true', respect the user's choice of language in the browser |