scatter_deploy 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bab3406e28bb818ffeb59f27b97313773833b01
4
- data.tar.gz: 11cd3b6e94c18dc1e998cecc61c302e07f9a98dd
3
+ metadata.gz: 978f28b942b5b9d2d462f1424a46fe8ce5c009fa
4
+ data.tar.gz: 0fe00e177d9027bfbb27f434833349ab47ee59a2
5
5
  SHA512:
6
- metadata.gz: 9c1ca71a24eceb70a5e25ce26282350329244a0896f94199a48c1235e4a7d33688ef00240298bee4fdff41fa91696334911ca755f10f9023a0a7e7d3e777a6b8
7
- data.tar.gz: b65b6885d64853c74a23cd63d4dd50e4fc51be633c7c71eb51b01a57e3e2d4814a908c2dfe99866f0bbd8443dbaf3d29f3dede5ede471887a731f99df5b8a38c
6
+ metadata.gz: 36c6b2b33d9f043977e8029321347856b31a6af360ffa2f93eac7c41ca840a841d2abd3051cd986c71fe74c01c01b2607b8d27a2e8df975b9729e71657c0e322
7
+ data.tar.gz: ba1582dab80d9ef6bd882d644524da04ec2da29eb6fb4bb0afbf890c377c25dca227f6301f5c50a4dd8e521b7da5beac97b738f519b4ce3ad42bd000aa9d9590
data/README.md CHANGED
@@ -14,11 +14,13 @@ You interact with Scatter through the `scatter` command. You can see a basic ov
14
14
 
15
15
  ```
16
16
  Tasks:
17
- scatter cap COMMAND # Run arbitrary Capistrano commands.
18
- scatter deploy # Run a deploy routine. This is the default task.
19
- scatter exec COMMAND # Run arbitrary commands.
20
- scatter help [TASK] # Describe available tasks or one specific task
21
- scatter version # Show version.
17
+ scatter alias FROM, TO # Create an aliased Scatter command
18
+ scatter cap COMMAND # Run arbitrary Capistrano commands.
19
+ scatter config SETING, VALUE # Set a default config option
20
+ scatter deploy # Run a deploy routine. This is the default task.
21
+ scatter exec COMMAND # Run arbitrary commands.
22
+ scatter help [TASK] # Describe available tasks or one specific task
23
+ scatter version # Show version.
22
24
 
23
25
  Options:
24
26
  -d, [--directory=DIRECTORY] # Specify a deploys directory.
data/lib/scatter/cli.rb CHANGED
@@ -20,6 +20,11 @@ module Scatter
20
20
  :type => :string,
21
21
  :desc => "Use a deploy script in the __shared directory. The project path will automatically be passed as an argument"
22
22
 
23
+ class_option :dry_run,
24
+ :aliases => "--dr",
25
+ :type => :boolean,
26
+ :desc => "Print true if the command would have succeeded, otherwise an error message, without actually running the command."
27
+
23
28
  desc "deploy", "Run a deploy routine. This is the default task."
24
29
  def deploy
25
30
  run
@@ -65,6 +70,15 @@ module Scatter
65
70
  say Config.show
66
71
  end
67
72
 
73
+ desc "exists", "Determine whether or not a deploy routine can be found"
74
+ def exists
75
+ begin
76
+ generate_command ? say("true") : abort("false")
77
+ rescue
78
+ abort "false"
79
+ end
80
+ end
81
+
68
82
  no_tasks do
69
83
  # Process aliases
70
84
  def method_missing(method, *args)
@@ -72,7 +86,7 @@ module Scatter
72
86
  _method = method.to_s
73
87
 
74
88
  return super unless aliases.has_key?(_method) and aliases[_method].is_a?(String)
75
- system "scatter #{aliases[_method]}"
89
+ system "scatter #{aliases[_method]} #{args.join ' '}"
76
90
  end
77
91
 
78
92
  def git?
@@ -124,7 +138,11 @@ module Scatter
124
138
  abort "No deploy directory found" unless project_deploy_dir
125
139
  abort "No deploy command found" unless command ||= generate_command
126
140
 
127
- system "cd #{project_deploy_dir} && #{command}"
141
+ if options.dry_run
142
+ say "true"
143
+ else
144
+ system "cd #{project_deploy_dir} && #{command}"
145
+ end
128
146
  end
129
147
 
130
148
  end
data/lib/scatter.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'scatter/cli'
2
2
 
3
3
  module Scatter
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scatter_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Solomon