confirm_deploy 1.0.0 → 1.1.0
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.
- data/CHANGELOG +6 -0
- data/README.md +7 -0
- data/TODO +12 -0
- data/lib/confirm_deploy.rb +5 -2
- data/lib/confirm_deploy/version.rb +1 -1
- metadata +3 -2
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -22,6 +22,13 @@ Add to your capistrano deploy.rb
|
|
22
22
|
|
23
23
|
require 'confirm_deploy'
|
24
24
|
|
25
|
+
## Customize
|
26
|
+
|
27
|
+
You can set the optional variables `confirm_message` and `confirm_answer` if you want:
|
28
|
+
|
29
|
+
set :confirm_message, "You know what you're doing?"
|
30
|
+
set :confirm_answer, "yepp"
|
31
|
+
|
25
32
|
## Examples
|
26
33
|
|
27
34
|
Confirmed deploy:
|
data/TODO
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
TODO
|
2
|
+
|
3
|
+
* --no_confirm flag to skip confirmation
|
4
|
+
|
5
|
+
* Show optional STAGE being deployed
|
6
|
+
|
7
|
+
* Show optional BRANCH being deployed
|
8
|
+
|
9
|
+
* Show to what servers code is being deployed
|
10
|
+
What roles? web, app, db? Affected roles.
|
11
|
+
|
12
|
+
* Option to set what tasks needs confirmation
|
data/lib/confirm_deploy.rb
CHANGED
@@ -1,11 +1,14 @@
|
|
1
|
-
require
|
1
|
+
require 'confirm_deploy/version'
|
2
2
|
require 'capistrano/configuration'
|
3
3
|
|
4
4
|
Capistrano::Configuration.instance(:must_exist).load do
|
5
5
|
namespace :deploy do
|
6
6
|
desc "Prompts user to confirm deploy"
|
7
7
|
task :confirm do
|
8
|
-
|
8
|
+
message = fetch(:confirm_message, "Are you sure you want to deploy?")
|
9
|
+
answer = fetch(:confirm_answer, "yes")
|
10
|
+
|
11
|
+
unless Capistrano::CLI.ui.ask(" #{message} (#{answer}): ") == answer
|
9
12
|
logger.important "Deploy cancelled!"
|
10
13
|
abort
|
11
14
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: confirm_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -40,6 +40,7 @@ files:
|
|
40
40
|
- LICENSE.txt
|
41
41
|
- README.md
|
42
42
|
- Rakefile
|
43
|
+
- TODO
|
43
44
|
- confirm_deploy.gemspec
|
44
45
|
- lib/confirm_deploy.rb
|
45
46
|
- lib/confirm_deploy/version.rb
|