capistrano-maintenance 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/Gemfile +6 -0
- data/README.md +27 -4
- data/lib/capistrano/maintenance.rb +1 -1
- data/lib/capistrano/maintenance/version.rb +1 -1
- metadata +10 -13
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1a51b5180a4cd308b6e52df9e0ac26394757f45c
|
4
|
+
data.tar.gz: 68f9ef18a277466632b508c19ee274b9a71ccb6a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6decbba0f3ca4bc85b55edfd917e6a0cd9417cdf48b568156dbd7e35c0e5e67861f7373236178f657553636ae4ef6bf95e5913616222bc636e07ab427b9e40b0
|
7
|
+
data.tar.gz: 1cd36c78fce821e39cdeb33e1114a5731f4f39ad65b2abc76728a22acd965668db2ba8ad3029b0cd1054f65f4da5f2dc75b63b742dbebad73cb55f516e401099
|
data/.gitignore
CHANGED
data/Gemfile
ADDED
data/README.md
CHANGED
@@ -14,7 +14,23 @@ And put this line into your deploy.rb file:
|
|
14
14
|
|
15
15
|
require 'capistrano/maintenance'
|
16
16
|
|
17
|
-
|
17
|
+
Now, you can disable the web:
|
18
|
+
|
19
|
+
cap deploy:web:disable
|
20
|
+
|
21
|
+
You can also specify a string to specify reason and how long it is until:
|
22
|
+
|
23
|
+
cap deploy:web:disable REASON="For server upgrades" UNTIL="3AM EST"
|
24
|
+
|
25
|
+
|
26
|
+
When maintenance is done, you can enable the web:
|
27
|
+
|
28
|
+
cap deploy:web:enable
|
29
|
+
|
30
|
+
If you are using [multistage capistrano](https://github.com/capistrano/capistrano/wiki/2.x-Multistage-Extension), you'll also need to include the stage before `deploy:web:disable` and `deploy:web:enable`:
|
31
|
+
|
32
|
+
cap production deploy:web:disable
|
33
|
+
cap production deploy:web:enable
|
18
34
|
|
19
35
|
Configuration
|
20
36
|
-------------
|
@@ -28,7 +44,14 @@ Everything should work out of the box general, but there are some additional adj
|
|
28
44
|
set :maintenance_dirname, "#{shared_path}/public/system"
|
29
45
|
|
30
46
|
# use local template instead of included one with capistrano-maintenance
|
31
|
-
set :maintenance_template_path, 'app/views/maintenance.html'
|
47
|
+
set :maintenance_template_path, 'app/views/maintenance.html.erb'
|
48
|
+
|
49
|
+
# disable the warning on how to configure your server
|
50
|
+
set :maintenance_config_warning, false
|
51
|
+
|
52
|
+
For your custom maintenance template, you have access to the following variables, if they're defined:
|
53
|
+
|
54
|
+
* reason
|
55
|
+
* deadline
|
32
56
|
|
33
|
-
|
34
|
-
set :maintenance_config_warning, false
|
57
|
+
These are the environment variables passed in via REASON="something" and UNTIL="later"
|
@@ -35,7 +35,7 @@ module Capistrano::Maintenance
|
|
35
35
|
DESC
|
36
36
|
task :disable, :roles => :web, :except => { :no_release => true } do
|
37
37
|
require 'erb'
|
38
|
-
on_rollback { run "rm -f #{
|
38
|
+
on_rollback { run "rm -f #{maintenance_dirname}/#{maintenance_basename}.html" }
|
39
39
|
|
40
40
|
if fetch(:maintenance_config_warning, true)
|
41
41
|
warn <<-EOHTACCESS
|
metadata
CHANGED
@@ -1,30 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-maintenance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.4
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Thomas von Deyen
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-07-31 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: capistrano
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 2.0.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 2.0.0
|
30
27
|
description: The deploy:web tasks where removed from Capistrano core. This extension
|
@@ -35,6 +32,7 @@ extensions: []
|
|
35
32
|
extra_rdoc_files: []
|
36
33
|
files:
|
37
34
|
- .gitignore
|
35
|
+
- Gemfile
|
38
36
|
- README.md
|
39
37
|
- Rakefile
|
40
38
|
- capistrano-maintenance.gemspec
|
@@ -44,27 +42,26 @@ files:
|
|
44
42
|
homepage: https://github.com/tvdeyen/capistrano-maintenance
|
45
43
|
licenses:
|
46
44
|
- MIT
|
45
|
+
metadata: {}
|
47
46
|
post_install_message:
|
48
47
|
rdoc_options: []
|
49
48
|
require_paths:
|
50
49
|
- lib
|
51
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
51
|
requirements:
|
54
|
-
- -
|
52
|
+
- - '>='
|
55
53
|
- !ruby/object:Gem::Version
|
56
54
|
version: '0'
|
57
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
56
|
requirements:
|
60
|
-
- -
|
57
|
+
- - '>='
|
61
58
|
- !ruby/object:Gem::Version
|
62
59
|
version: '0'
|
63
60
|
requirements: []
|
64
61
|
rubyforge_project:
|
65
|
-
rubygems_version:
|
62
|
+
rubygems_version: 2.0.6
|
66
63
|
signing_key:
|
67
|
-
specification_version:
|
64
|
+
specification_version: 4
|
68
65
|
summary: Offers deploy:web:disable and deploy:web:enable tasks for Capistrano.
|
69
66
|
test_files: []
|
70
67
|
has_rdoc:
|