From c9cdc7253702e1e217bbf7212492633f69802020 Mon Sep 17 00:00:00 2001 From: Julian Herrero Date: Fri, 15 Mar 2019 09:28:28 +0100 Subject: [PATCH] Use double quotes in config/ --- config.ru | 2 +- config/application.rb | 23 ++-- config/boot.rb | 4 +- config/deploy.rb | 30 ++--- config/deploy/preproduction.rb | 2 +- config/deploy/staging.rb | 2 +- config/environment.rb | 2 +- config/environments/development.rb | 4 +- config/environments/preproduction.rb | 20 ++-- config/environments/production.rb | 18 +-- config/environments/staging.rb | 18 +-- config/environments/test.rb | 10 +- config/i18n-tasks.yml | 172 +++++++++++++-------------- config/maintenance.yml.example | 4 +- config/schedule.rb | 4 +- config/sitemap.rb | 2 +- 16 files changed, 158 insertions(+), 159 deletions(-) diff --git a/config.ru b/config.ru index bd83b2541..193e5fed8 100644 --- a/config.ru +++ b/config.ru @@ -1,4 +1,4 @@ # This file is used by Rack-based servers to start the application. -require ::File.expand_path('../config/environment', __FILE__) +require ::File.expand_path("../config/environment", __FILE__) run Rails.application diff --git a/config/application.rb b/config/application.rb index 54afdcb4a..22eceee59 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,7 +1,6 @@ +require File.expand_path("../boot", __FILE__) -require File.expand_path('../boot', __FILE__) - -require 'rails/all' +require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. @@ -44,13 +43,13 @@ module Consul "zh-TW"] config.i18n.available_locales = available_locales config.i18n.fallbacks = { - 'fr' => 'es', - 'gl' => 'es', - 'it' => 'es', - 'pt-BR' => 'es' + "fr" => "es", + "gl" => "es", + "it" => "es", + "pt-BR" => "es" } - config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')] - config.i18n.load_path += Dir[Rails.root.join('config', 'locales', 'custom', '**', '*.{rb,yml}')] + config.i18n.load_path += Dir[Rails.root.join("config", "locales", "**", "*.{rb,yml}")] + config.i18n.load_path += Dir[Rails.root.join("config", "locales", "custom", "**", "*.{rb,yml}")] config.after_initialize { Globalize.set_fallbacks_to_all_available_locales } @@ -60,8 +59,8 @@ module Consul config.active_record.raise_in_transactional_callbacks = true # Add lib to the autoload path - config.autoload_paths << Rails.root.join('lib') - config.time_zone = 'Madrid' + config.autoload_paths << Rails.root.join("lib") + config.time_zone = "Madrid" config.active_job.queue_adapter = :delayed_job # CONSUL specific custom overrides @@ -71,7 +70,7 @@ module Consul # config.autoload_paths << "#{Rails.root}/app/controllers/custom" config.autoload_paths << "#{Rails.root}/app/models/custom" - config.paths['app/views'].unshift(Rails.root.join('app', 'views', 'custom')) + config.paths["app/views"].unshift(Rails.root.join("app", "views", "custom")) end end diff --git a/config/boot.rb b/config/boot.rb index 6b750f00b..fb24cf2ed 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,3 +1,3 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__) -require 'bundler/setup' # Set up gems listed in the Gemfile. +require "bundler/setup" # Set up gems listed in the Gemfile. diff --git a/config/deploy.rb b/config/deploy.rb index c89869333..6f4572901 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -1,19 +1,19 @@ # config valid only for current version of Capistrano -lock '~> 3.10.1' +lock "~> 3.10.1" def deploysecret(key) - @deploy_secrets_yml ||= YAML.load_file('config/deploy-secrets.yml')[fetch(:stage).to_s] - @deploy_secrets_yml.fetch(key.to_s, 'undefined') + @deploy_secrets_yml ||= YAML.load_file("config/deploy-secrets.yml")[fetch(:stage).to_s] + @deploy_secrets_yml.fetch(key.to_s, "undefined") end set :rails_env, fetch(:stage) -set :rvm1_ruby_version, '2.3.2' +set :rvm1_ruby_version, "2.3.2" -set :application, 'consul' +set :application, "consul" set :full_app_name, deploysecret(:full_app_name) set :server_name, deploysecret(:server_name) -set :repo_url, 'https://github.com/consul/consul.git' +set :repo_url, "https://github.com/consul/consul.git" set :revision, `git rev-parse --short #{fetch(:branch)}`.strip @@ -26,7 +26,7 @@ set :linked_dirs, %w{log tmp public/system public/assets} set :keep_releases, 5 -set :local_user, ENV['USER'] +set :local_user, ENV["USER"] set :delayed_job_workers, 2 set :delayed_job_roles, :background @@ -41,15 +41,15 @@ set(:config_files, %w( set :whenever_roles, -> { :app } namespace :deploy do - #before :starting, 'rvm1:install:rvm' # install/update RVM - #before :starting, 'rvm1:install:ruby' # install Ruby and create gemset - #before :starting, 'install_bundler_gem' # install bundler gem + #before :starting, "rvm1:install:rvm" # install/update RVM + #before :starting, "rvm1:install:ruby" # install Ruby and create gemset + #before :starting, "install_bundler_gem" # install bundler gem - after :publishing, 'deploy:restart' - after :published, 'delayed_job:restart' - after :published, 'refresh_sitemap' + after :publishing, "deploy:restart" + after :published, "delayed_job:restart" + after :published, "refresh_sitemap" - after :finishing, 'deploy:cleanup' + after :finishing, "deploy:cleanup" end task :install_bundler_gem do @@ -62,7 +62,7 @@ task :refresh_sitemap do on roles(:app) do within release_path do with rails_env: fetch(:rails_env) do - execute :rake, 'sitemap:refresh:no_ping' + execute :rake, "sitemap:refresh:no_ping" end end end diff --git a/config/deploy/preproduction.rb b/config/deploy/preproduction.rb index 74c96871e..27fdf021d 100644 --- a/config/deploy/preproduction.rb +++ b/config/deploy/preproduction.rb @@ -1,7 +1,7 @@ set :deploy_to, deploysecret(:deploy_to) set :server_name, deploysecret(:server_name) set :db_server, deploysecret(:db_server) -set :branch, ENV['branch'] || :master +set :branch, ENV["branch"] || :master set :ssh_options, port: deploysecret(:ssh_port) set :stage, :preproduction set :rails_env, :preproduction diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb index c97bb9a7f..c9093c13a 100644 --- a/config/deploy/staging.rb +++ b/config/deploy/staging.rb @@ -1,7 +1,7 @@ set :deploy_to, deploysecret(:deploy_to) set :server_name, deploysecret(:server_name) set :db_server, deploysecret(:db_server) -set :branch, ENV['branch'] || :master +set :branch, ENV["branch"] || :master set :ssh_options, port: deploysecret(:ssh_port) set :stage, :staging set :rails_env, :staging diff --git a/config/environment.rb b/config/environment.rb index ee8d90dc6..171198560 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ # Load the Rails application. -require File.expand_path('../application', __FILE__) +require File.expand_path("../application", __FILE__) # Initialize the Rails application. Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 1b401544a..49c9ab830 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -15,7 +15,7 @@ Rails.application.configure do # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false - config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } + config.action_mailer.default_url_options = { host: "localhost", port: 3000 } config.action_mailer.asset_host = "http://localhost:3000" # Deliver emails to a development mailbox at /letter_opener @@ -49,7 +49,7 @@ Rails.application.configure do config.after_initialize do Bullet.enable = true Bullet.bullet_logger = true - if ENV['BULLET'] + if ENV["BULLET"] Bullet.rails_logger = true Bullet.add_footer = true end diff --git a/config/environments/preproduction.rb b/config/environments/preproduction.rb index 06f210c82..7eb169ce1 100644 --- a/config/environments/preproduction.rb +++ b/config/environments/preproduction.rb @@ -22,7 +22,7 @@ Rails.application.configure do # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. - config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? + config.serve_static_files = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier @@ -38,8 +38,8 @@ Rails.application.configure do # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = true @@ -58,7 +58,7 @@ Rails.application.configure do config.cache_store = :dalli_store, { value_max_bytes: 2000000 } # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' + # config.action_controller.asset_host = "http://assets.example.com" # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. @@ -70,12 +70,12 @@ Rails.application.configure do # Uncomment the following block of code and add your SMTP service credentials # config.action_mailer.delivery_method = :smtp # config.action_mailer.smtp_settings = { - # address: 'smtp.example.com', + # address: "smtp.example.com", # port: 587, - # domain: 'example.com', - # user_name: '', - # password: '', - # authentication: 'plain', + # domain: "example.com", + # user_name: "", + # password: "", + # authentication: "plain", # enable_starttls_auto: true } # Enable locale fallbacks for I18n (makes lookups for any locale fall back to @@ -90,4 +90,4 @@ Rails.application.configure do # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false -end \ No newline at end of file +end diff --git a/config/environments/production.rb b/config/environments/production.rb index e7ddfd86a..ff3d9d2ad 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -22,7 +22,7 @@ Rails.application.configure do # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. - config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? + config.serve_static_files = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier @@ -38,8 +38,8 @@ Rails.application.configure do # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = true @@ -58,7 +58,7 @@ Rails.application.configure do config.cache_store = :dalli_store, { value_max_bytes: 2000000 } # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' + # config.action_controller.asset_host = "http://assets.example.com" # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. @@ -70,12 +70,12 @@ Rails.application.configure do # Uncomment the following block of code and add your SMTP service credentials # config.action_mailer.delivery_method = :smtp # config.action_mailer.smtp_settings = { - # address: 'smtp.example.com', + # address: "smtp.example.com", # port: 587, - # domain: 'example.com', - # user_name: '', - # password: '', - # authentication: 'plain', + # domain: "example.com", + # user_name: "", + # password: "", + # authentication: "plain", # enable_starttls_auto: true } # Enable locale fallbacks for I18n (makes lookups for any locale fall back to diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 162b574fb..de8f707c7 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -22,7 +22,7 @@ Rails.application.configure do # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. - config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? + config.serve_static_files = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier @@ -38,8 +38,8 @@ Rails.application.configure do # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = true @@ -58,7 +58,7 @@ Rails.application.configure do config.cache_store = :dalli_store # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' + # config.action_controller.asset_host = "http://assets.example.com" # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. @@ -70,12 +70,12 @@ Rails.application.configure do # Uncomment the following block of code and add your SMTP service credentials # config.action_mailer.delivery_method = :smtp # config.action_mailer.smtp_settings = { - # address: 'smtp.example.com', + # address: "smtp.example.com", # port: 587, - # domain: 'example.com', - # user_name: '', - # password: '', - # authentication: 'plain', + # domain: "example.com", + # user_name: "", + # password: "", + # authentication: "plain", # enable_starttls_auto: true } # Enable locale fallbacks for I18n (makes lookups for any locale fall back to diff --git a/config/environments/test.rb b/config/environments/test.rb index 30e282fec..a237b95de 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -19,7 +19,7 @@ Rails.application.configure do # Configure static file server for tests with Cache-Control for performance. config.serve_static_files = true - config.static_cache_control = 'public, max-age=3600' + config.static_cache_control = "public, max-age=3600" # Show full error reports and disable caching. config.consider_all_requests_local = true @@ -36,9 +36,9 @@ Rails.application.configure do # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test config.action_mailer.default_url_options = { - host: 'test' + host: "test" } - config.action_mailer.asset_host = 'http://consul.test' + config.action_mailer.asset_host = "http://consul.test" # Randomize the order test cases are executed. config.active_support.test_order = :random @@ -54,9 +54,9 @@ Rails.application.configure do config.after_initialize do Bullet.enable = true Bullet.bullet_logger = true - if ENV['BULLET'] + if ENV["BULLET"] Bullet.raise = true # raise an error if n+1 query occurs end end -end \ No newline at end of file +end diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml index 8377deb4f..61702232b 100644 --- a/config/i18n-tasks.yml +++ b/config/i18n-tasks.yml @@ -108,95 +108,95 @@ search: # - 'errors.messages.{accepted,blank,invalid,too_short,too_long}' # - '{devise,simple_form}.*' ignore_missing: - - 'unauthorized.*' - - 'activerecord.models.proposal' - - 'activerecord.models.spending_proposal' - - 'activerecord.errors.models.proposal_notification.*' - - 'activerecord.errors.models.direct_message.*' - - 'errors.messages.blank' - - 'errors.messages.taken' - - 'devise.failure.invalid' - - 'devise.registrations.destroyed' - - 'devise.password_expired.*' + - "unauthorized.*" + - "activerecord.models.proposal" + - "activerecord.models.spending_proposal" + - "activerecord.errors.models.proposal_notification.*" + - "activerecord.errors.models.direct_message.*" + - "errors.messages.blank" + - "errors.messages.taken" + - "devise.failure.invalid" + - "devise.registrations.destroyed" + - "devise.password_expired.*" ## Consider these keys used: ignore_unused: - - 'budgets.phase.*' - - 'budgets.investments.index.orders.*' - - 'budgets.index.section_header.*' - - 'activerecord.*' - - 'activemodel.*' - - 'date.order' - - 'unauthorized.*' - - 'admin.officials.level_*' - - 'admin.comments.index.filter*' - - 'admin.banners.index.filters.*' - - 'admin.debates.index.filter*' - - 'admin.hidden_proposals.index.filter*' - - 'admin.proposal_notifications.index.filter*' - - 'admin.budgets.index.filter*' - - 'admin.budget_investments.index.filter*' - - 'admin.spending_proposals.index.filter*' - - 'admin.organizations.index.filter*' - - 'admin.hidden_users.index.filter*' - - 'admin.hidden_budget_investments.index.filter*' - - 'admin.activity.show.filter*' - - 'admin.legislation.processes.index.filter*' - - 'admin.legislation.processes.*.submit_button' - - 'admin.legislation.processes.proposals.orders.*' - - 'admin.legislation.processes.proposals.select_order' - - 'admin.legislation.draft_versions.*.submit_button' - - 'admin.legislation.questions.*.submit_button' - - 'admin.comments.index.hidden_*' - - 'admin.settings.index.features.*' - - 'admin.polls.*.submit_button' - - 'admin.booths.*.submit_button' - - 'admin.admin_notifications.*.submit_button' - - 'admin.homepage.*' - - 'moderation.comments.index.filter*' - - 'moderation.comments.index.order*' - - 'moderation.debates.index.filter*' - - 'moderation.proposals.index.filter*' - - 'moderation.proposals.index.order*' - - 'moderation.debates.index.filter*' - - 'moderation.debates.index.order*' - - 'moderation.budget_investments.index.filter*' - - 'moderation.budget_investments.index.order*' - - 'moderation.proposal_notifications.index.filter*' - - 'moderation.proposal_notifications.index.order*' - - 'valuation.spending_proposals.index.filter*' - - 'valuation.budgets.index.filter*' - - 'valuation.budget_investments.index.filter*' - - 'users.show.filters.*' - - 'polls.index.filters.*' - - 'polls.index.section_header.*' - - 'polls.index.orders.*' - - 'debates.index.select_order' - - 'debates.index.orders.*' - - 'debates.index.section_header.*' - - 'proposals.index.select_order' - - 'proposals.index.orders.*' - - 'proposals.index.section_header.*' - - 'spending_proposals.index.search_form.*' - - '*.index.search_form.*' - - 'notifications.notification.action.*' - - 'legislation.processes.index.filter*' - - 'legislation.processes.index.section_header.*' - - 'legislation.processes.proposals.filters.*' - - 'helpers.page_entries_info.*' # kaminari - - 'views.pagination.*' # kaminari - - 'shared.suggest.*' - - 'invisible_captcha.*' - - 'admin.site_customization.pages.page.status_*' - - 'admin.legislation.processes.process.*' - - 'legislation.processes.index.*' - - 'votes.budget_investments.different_heading_assigned*' - - '*.form.map_skip_checkbox' -# - '{devise,kaminari,will_paginate}.*' -# - 'simple_form.{yes,no}' -# - 'simple_form.{placeholders,hints,labels}.*' -# - 'simple_form.{error_notification,required}.:' -## Exclude these keys from the `i18n-tasks eq-base' report: + - "budgets.phase.*" + - "budgets.investments.index.orders.*" + - "budgets.index.section_header.*" + - "activerecord.*" + - "activemodel.*" + - "date.order" + - "unauthorized.*" + - "admin.officials.level_*" + - "admin.comments.index.filter*" + - "admin.banners.index.filters.*" + - "admin.debates.index.filter*" + - "admin.hidden_proposals.index.filter*" + - "admin.proposal_notifications.index.filter*" + - "admin.budgets.index.filter*" + - "admin.budget_investments.index.filter*" + - "admin.spending_proposals.index.filter*" + - "admin.organizations.index.filter*" + - "admin.hidden_users.index.filter*" + - "admin.hidden_budget_investments.index.filter*" + - "admin.activity.show.filter*" + - "admin.legislation.processes.index.filter*" + - "admin.legislation.processes.*.submit_button" + - "admin.legislation.processes.proposals.orders.*" + - "admin.legislation.processes.proposals.select_order" + - "admin.legislation.draft_versions.*.submit_button" + - "admin.legislation.questions.*.submit_button" + - "admin.comments.index.hidden_*" + - "admin.settings.index.features.*" + - "admin.polls.*.submit_button" + - "admin.booths.*.submit_button" + - "admin.admin_notifications.*.submit_button" + - "admin.homepage.*" + - "moderation.comments.index.filter*" + - "moderation.comments.index.order*" + - "moderation.debates.index.filter*" + - "moderation.proposals.index.filter*" + - "moderation.proposals.index.order*" + - "moderation.debates.index.filter*" + - "moderation.debates.index.order*" + - "moderation.budget_investments.index.filter*" + - "moderation.budget_investments.index.order*" + - "moderation.proposal_notifications.index.filter*" + - "moderation.proposal_notifications.index.order*" + - "valuation.spending_proposals.index.filter*" + - "valuation.budgets.index.filter*" + - "valuation.budget_investments.index.filter*" + - "users.show.filters.*" + - "polls.index.filters.*" + - "polls.index.section_header.*" + - "polls.index.orders.*" + - "debates.index.select_order" + - "debates.index.orders.*" + - "debates.index.section_header.*" + - "proposals.index.select_order" + - "proposals.index.orders.*" + - "proposals.index.section_header.*" + - "spending_proposals.index.search_form.*" + - "*.index.search_form.*" + - "notifications.notification.action.*" + - "legislation.processes.index.filter*" + - "legislation.processes.index.section_header.*" + - "legislation.processes.proposals.filters.*" + - "helpers.page_entries_info.*" # kaminari + - "views.pagination.*" # kaminari + - "shared.suggest.*" + - "invisible_captcha.*" + - "admin.site_customization.pages.page.status_*" + - "admin.legislation.processes.process.*" + - "legislation.processes.index.*" + - "votes.budget_investments.different_heading_assigned*" + - "*.form.map_skip_checkbox" +# - "{devise,kaminari,will_paginate}.*" +# - "simple_form.{yes,no}" +# - "simple_form.{placeholders,hints,labels}.*" +# - "simple_form.{error_notification,required}.:" +## Exclude these keys from the `i18n-tasks eq-base" report: # ignore_eq_base: # all: # - common.ok diff --git a/config/maintenance.yml.example b/config/maintenance.yml.example index 540bc8bb7..b1bca6a7a 100644 --- a/config/maintenance.yml.example +++ b/config/maintenance.yml.example @@ -1,5 +1,5 @@ --- -app_root: '.' +app_root: "." allowed_ips: - 127.0.0.1 - x.x.x.x @@ -7,6 +7,6 @@ allowed_ips: allowed_paths: - your/custom/route -reason: 'Website down for maintenance' +reason: "Website down for maintenance" response_code: 503 retry_after: 3600 diff --git a/config/schedule.rb b/config/schedule.rb index c3dafe8eb..6f0e1eb30 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -23,10 +23,10 @@ every 1.minute do command "date > ~/cron-test.txt" end -every 1.day, at: '5:00 am' do +every 1.day, at: "5:00 am" do rake "-s sitemap:refresh" end -every 1.day, at: '3:00 am', roles: [:cron] do +every 1.day, at: "3:00 am", roles: [:cron] do rake "votes:reset_hot_score" end diff --git a/config/sitemap.rb b/config/sitemap.rb index 85aeee2a2..7a840a1ed 100644 --- a/config/sitemap.rb +++ b/config/sitemap.rb @@ -2,7 +2,7 @@ class SitemapGenerator::FileAdapter def gzip(stream, data); stream.write(data); stream.close end end -SitemapGenerator::Sitemap.namer = SitemapGenerator::SimpleNamer.new(:sitemap, extension: '.xml') +SitemapGenerator::Sitemap.namer = SitemapGenerator::SimpleNamer.new(:sitemap, extension: ".xml") # default host SitemapGenerator::Sitemap.verbose = false if Rails.env.test?