From d111b0396251d8ec380cb77fe2435bc81c23568d Mon Sep 17 00:00:00 2001 From: Ross Jourdain Date: Fri, 13 Nov 2015 12:19:43 +1300 Subject: [PATCH 1/3] Tweak maintenance settings --- lib/easy/generators/templates/maintenance.rb.tt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/easy/generators/templates/maintenance.rb.tt b/lib/easy/generators/templates/maintenance.rb.tt index 970b61d..a385038 100644 --- a/lib/easy/generators/templates/maintenance.rb.tt +++ b/lib/easy/generators/templates/maintenance.rb.tt @@ -4,14 +4,14 @@ # See: https://github.com/biola/turnout#configuration for details on customization # This is the rails root location, given this file is located at in Rails.root/config/maintenance.rb -rails_root = File.expand_path(File.join(File.dirname(__FILE__), '..')) +rails_root = File.expand_path(File.join(File.dirname(__FILE__), '../..')) Turnout.configure do |config| config.app_root = rails_root - config.named_maintenance_file_paths = {default: config.app_root.join('tmp', 'maintenance.yml').to_s} + config.named_maintenance_file_paths = {default: config.app_root.join('tmp', 'maintenance.yml').to_s, app: config.app_root.join('public', 'maintenance.html') } config.default_maintenance_page = Turnout::MaintenancePage::HTML - config.default_reason = "The site is temporarily down for maintenance.\nPlease check back soon." + config.default_reason = "This site is temporarily down for maintenance." config.default_allowed_paths = ['/admin','/assets'] config.default_response_code = 503 config.default_retry_after = 3600 From 432f8e4e05e024fc2dba45ac7478c81064482eb7 Mon Sep 17 00:00:00 2001 From: Joseph Leniston Date: Fri, 13 Nov 2015 13:46:58 +1300 Subject: [PATCH 2/3] Fix readme typos --- CHANGELOG.md | 6 ++++++ README.md | 6 +++--- lib/easy-deployment/version.rb | 2 +- lib/easy/generators/maintenance_generator.rb | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdc6ffb..94314ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog for easy-deployment +## 0.6.3 (2015-11-13) + +Bugfixes: + +* Fix maintenance page location and typos in `README.md` + ## 0.6.2 (2015-11-10) Enhancements: diff --git a/README.md b/README.md index f49e8f1..9159a94 100644 --- a/README.md +++ b/README.md @@ -101,15 +101,15 @@ All these settings are configurable, to read more see the documentation for the ### Maintenance -This includes a generator to create a maintenance mode configuration (generator is run by itself as `rails generate easy:maintenace`) +This includes a generator to create a maintenance mode configuration (generator is run by itself as `rails generate easy:maintenance`) This will generate: - config/initializers/maintenace.rb + config/initializers/maintenance.rb public/maintenance.html public/maintenance.json -Customise the site configuration within `config/initializers/maintenace.rb` to change the maintenance message, response status etc. +Customise the site configuration within `config/initializers/maintenance.rb` to change the maintenance message, response status etc. Customise the maintenance page within `public/maintenance.html` All these settings are configurable, to read more see the documentation for the turnout gem https://github.com/biola/turnout and setup your configuration to suit yourself. diff --git a/lib/easy-deployment/version.rb b/lib/easy-deployment/version.rb index 043e386..0e1fdb5 100644 --- a/lib/easy-deployment/version.rb +++ b/lib/easy-deployment/version.rb @@ -1,5 +1,5 @@ module Easy module Deployment - VERSION = "0.6.2" + VERSION = "0.6.3" end end diff --git a/lib/easy/generators/maintenance_generator.rb b/lib/easy/generators/maintenance_generator.rb index 110c5a7..3cd0c33 100644 --- a/lib/easy/generators/maintenance_generator.rb +++ b/lib/easy/generators/maintenance_generator.rb @@ -16,7 +16,7 @@ def create_maintenance_files run("bundle install") say("Maintenance configuration generated", :green) - say(" - TODO: edit config/maintenance.rb setting default_maintenance_page, default_reason and other configuration options", :green) + say(" - TODO: edit config/initializers/maintenance.rb setting default_maintenance_page, default_reason and other configuration options", :green) say(" - TODO: edit public/maintenance.html to match site styles", :green) true From e39b8cff7670f26d011cacd234ee18d2bceaecf8 Mon Sep 17 00:00:00 2001 From: Ross Jourdain Date: Fri, 13 Nov 2015 14:32:17 +1300 Subject: [PATCH 3/3] Tweak the maintenance.rb again --- lib/easy/generators/templates/maintenance.rb.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/easy/generators/templates/maintenance.rb.tt b/lib/easy/generators/templates/maintenance.rb.tt index a385038..aee2110 100644 --- a/lib/easy/generators/templates/maintenance.rb.tt +++ b/lib/easy/generators/templates/maintenance.rb.tt @@ -9,7 +9,7 @@ rails_root = File.expand_path(File.join(File.dirname(__FILE__), '../..')) Turnout.configure do |config| config.app_root = rails_root - config.named_maintenance_file_paths = {default: config.app_root.join('tmp', 'maintenance.yml').to_s, app: config.app_root.join('public', 'maintenance.html') } + config.named_maintenance_file_paths = { default: config.app_root.join('tmp', 'maintenance.yml').to_s } config.default_maintenance_page = Turnout::MaintenancePage::HTML config.default_reason = "This site is temporarily down for maintenance." config.default_allowed_paths = ['/admin','/assets']