judo 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/bin/judo +10 -6
- metadata +10 -6
data/Rakefile
CHANGED
@@ -10,8 +10,8 @@ Jeweler::Tasks.new do |s|
|
|
10
10
|
s.rubyforge_project = "judo"
|
11
11
|
s.files = FileList["[A-Z]*", "{bin,lib,spec}/**/*"]
|
12
12
|
s.executables = %w(judo)
|
13
|
-
s.add_dependency "aws"
|
14
|
-
s.add_dependency "thor"
|
13
|
+
s.add_dependency "aws", [">= 2.3.1"]
|
14
|
+
s.add_dependency "thor", [">= 0.13.4"]
|
15
15
|
s.add_dependency "json"
|
16
16
|
end
|
17
17
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
data/bin/judo
CHANGED
@@ -35,11 +35,11 @@ class CLI < Thor
|
|
35
35
|
|
36
36
|
desc "create NAME", "create a persistent server"
|
37
37
|
def create(name, start = false)
|
38
|
-
group =
|
38
|
+
group = get_current
|
39
39
|
if name =~ /^[+](\d*)/
|
40
40
|
n = $1.to_i
|
41
|
-
|
42
|
-
|
41
|
+
abort "woah nelly - that's too many - 5 or less pls" if n > 5
|
42
|
+
abort "woah nelly - that's not enough" if n < 1
|
43
43
|
top_counter = group.servers.map { |s| (s.name =~ /^#{s.group}.(\d*)$/); $1.to_i }.sort.last.to_i
|
44
44
|
n.times do |i|
|
45
45
|
top_counter += 1
|
@@ -167,15 +167,15 @@ class CLI < Thor
|
|
167
167
|
|
168
168
|
desc "commit", "push configs and files to couchdb"
|
169
169
|
def commit
|
170
|
-
|
170
|
+
get_current.compile
|
171
171
|
end
|
172
172
|
|
173
173
|
no_tasks do
|
174
174
|
def servers(*names, &block)
|
175
|
-
group =
|
175
|
+
group = get_current
|
176
176
|
good_servers = group.servers.select { |s| names.empty? or names.include?(s.name) }
|
177
177
|
bad_names = (names - good_servers.map(&:name))
|
178
|
-
|
178
|
+
abort "bad server name: #{bad_names.join(', ')}" unless bad_names.empty?
|
179
179
|
good_servers.each do |server|
|
180
180
|
begin
|
181
181
|
block.call(server)
|
@@ -196,6 +196,10 @@ class CLI < Thor
|
|
196
196
|
result
|
197
197
|
end
|
198
198
|
|
199
|
+
def get_current
|
200
|
+
Judo::Group.current || abort("This command must be run on a group - change into a group folder directory (such as 'default')")
|
201
|
+
end
|
202
|
+
|
199
203
|
def volume_id_to_judo(volume)
|
200
204
|
Judo::Server.all.detect { |s| s.volumes.invert[volume] }
|
201
205
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 9
|
9
|
+
version: 0.0.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Orion Henry
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-03-
|
17
|
+
date: 2010-03-23 00:00:00 -07:00
|
18
18
|
default_executable: judo
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -25,8 +25,10 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
segments:
|
28
|
-
-
|
29
|
-
|
28
|
+
- 2
|
29
|
+
- 3
|
30
|
+
- 1
|
31
|
+
version: 2.3.1
|
30
32
|
type: :runtime
|
31
33
|
version_requirements: *id001
|
32
34
|
- !ruby/object:Gem::Dependency
|
@@ -38,7 +40,9 @@ dependencies:
|
|
38
40
|
- !ruby/object:Gem::Version
|
39
41
|
segments:
|
40
42
|
- 0
|
41
|
-
|
43
|
+
- 13
|
44
|
+
- 4
|
45
|
+
version: 0.13.4
|
42
46
|
type: :runtime
|
43
47
|
version_requirements: *id002
|
44
48
|
- !ruby/object:Gem::Dependency
|