confirm_deploy 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ Release 1.1.0
2
+ -------------
3
+
4
+ * Ability to customize message and answer via optional variables
5
+ confirm_message & confirm_answer. See README for more information.
6
+
1
7
  Release 1.0.0
2
8
  -------------
3
9
 
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
@@ -1,11 +1,14 @@
1
- require "confirm_deploy/version"
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
- unless Capistrano::CLI.ui.ask(" Are you sure you want to deploy? (yes): ") == 'yes'
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
@@ -1,3 +1,3 @@
1
1
  module ConfirmDeploy
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  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.0.0
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-15 00:00:00.000000000 Z
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