scatter_deploy 0.2.0 → 0.2.1
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 +4 -4
- data/README.md +7 -5
- data/lib/scatter/cli.rb +20 -2
- data/lib/scatter.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 978f28b942b5b9d2d462f1424a46fe8ce5c009fa
|
4
|
+
data.tar.gz: 0fe00e177d9027bfbb27f434833349ab47ee59a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
18
|
-
scatter
|
19
|
-
scatter
|
20
|
-
scatter
|
21
|
-
scatter
|
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
|
-
|
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