webbynode 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of webbynode might be problematic. Click here for more details.
- data/Rakefile +1 -1
- data/lib/webbynode/api_client.rb +2 -2
- data/lib/webbynode/commands/init.rb +3 -3
- data/lib/webbynode/commands/webbies.rb +4 -4
- data/lib/webbynode.rb +1 -1
- data/spec/fixtures/api/webbies +12 -12
- data/spec/webbynode/commands/init_spec.rb +30 -30
- data/webbynode.gemspec +2 -2
- metadata +4 -4
data/Rakefile
CHANGED
data/lib/webbynode/api_client.rb
CHANGED
@@ -62,7 +62,7 @@ module Webbynode
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def ip_for(hostname)
|
65
|
-
(webbies[hostname] || {})[
|
65
|
+
(webbies[hostname] || {})['ip']
|
66
66
|
end
|
67
67
|
|
68
68
|
def webbies
|
@@ -72,7 +72,7 @@ module Webbynode
|
|
72
72
|
@webbies = response
|
73
73
|
end
|
74
74
|
|
75
|
-
@webbies['webbies'].inject({}) { |h, webby| h[webby[
|
75
|
+
@webbies['webbies'].inject({}) { |h, webby| h[webby['name']] = webby; h }
|
76
76
|
end
|
77
77
|
|
78
78
|
def credentials
|
@@ -115,7 +115,7 @@ module Webbynode::Commands
|
|
115
115
|
api_webbies.keys.sort.each_with_index do |webby_key, i|
|
116
116
|
webby = api_webbies[webby_key]
|
117
117
|
choices << webby
|
118
|
-
io.log " #{i+1}. #{webby[
|
118
|
+
io.log " #{i+1}. #{webby['name']} (#{webby['ip']})"
|
119
119
|
end
|
120
120
|
|
121
121
|
io.log "", :simple
|
@@ -124,9 +124,9 @@ module Webbynode::Commands
|
|
124
124
|
end
|
125
125
|
|
126
126
|
io.log "", :simple
|
127
|
-
io.log "Set deployment Webby to #{webby[
|
127
|
+
io.log "Set deployment Webby to #{webby['name']}."
|
128
128
|
|
129
|
-
return webby[
|
129
|
+
return webby['ip']
|
130
130
|
end
|
131
131
|
|
132
132
|
io.log "Retrieving IP for Webby #{webby}..."
|
@@ -18,10 +18,10 @@ module Webbynode::Commands
|
|
18
18
|
api.webbies.each_pair do |name, webby|
|
19
19
|
str = " "
|
20
20
|
str << name.ljust(16)
|
21
|
-
str << webby[
|
22
|
-
str << webby[
|
23
|
-
str << webby[
|
24
|
-
str << webby[
|
21
|
+
str << webby['ip'].ljust(16)
|
22
|
+
str << webby['node'].ljust(10)
|
23
|
+
str << webby['plan'].ljust(16)
|
24
|
+
str << webby['status']
|
25
25
|
|
26
26
|
puts str
|
27
27
|
end
|
data/lib/webbynode.rb
CHANGED
data/spec/fixtures/api/webbies
CHANGED
@@ -12,15 +12,15 @@ Content-Length: 222
|
|
12
12
|
|
13
13
|
---
|
14
14
|
webbies:
|
15
|
-
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
15
|
+
- ip: 201.81.121.201
|
16
|
+
status: "on"
|
17
|
+
name: sandbox
|
18
|
+
notes:
|
19
|
+
plan: Webbybeta
|
20
|
+
node: miami-b15
|
21
|
+
- ip: 61.21.71.31
|
22
|
+
status: "on"
|
23
|
+
name: webby3067
|
24
|
+
notes:
|
25
|
+
plan: Webbybeta
|
26
|
+
node: miami-b02
|
@@ -27,12 +27,12 @@ describe Webbynode::Commands::Init do
|
|
27
27
|
Webbynode::Commands::Init.new.tap do |cmd|
|
28
28
|
webbies = {
|
29
29
|
'sandbox' => {
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
30
|
+
"ip" => "201.81.121.201",
|
31
|
+
"status" => "on",
|
32
|
+
"name" => "sandbox",
|
33
|
+
"notes" => "",
|
34
|
+
"plan" => "Webbybeta",
|
35
|
+
"node" => "miami-b15"
|
36
36
|
}
|
37
37
|
}
|
38
38
|
api.stub!(:webbies).and_return(webbies)
|
@@ -159,12 +159,12 @@ describe Webbynode::Commands::Init do
|
|
159
159
|
Webbynode::Commands::Init.new("--engine=php").tap do |cmd|
|
160
160
|
webbies = {
|
161
161
|
'sandbox' => {
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
162
|
+
"ip" => "201.81.121.201",
|
163
|
+
"status" => "on",
|
164
|
+
"name" => "sandbox",
|
165
|
+
"notes" => "",
|
166
|
+
"plan" => "Webbybeta",
|
167
|
+
"node" => "miami-b15"
|
168
168
|
}
|
169
169
|
}
|
170
170
|
api.stub!(:webbies).and_return(webbies)
|
@@ -238,28 +238,28 @@ describe Webbynode::Commands::Init do
|
|
238
238
|
it "complains if missing and user has > 1 webby" do
|
239
239
|
webbies = {
|
240
240
|
'webby3' => {
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
241
|
+
"ip" => "67.53.31.3",
|
242
|
+
"status" => "on",
|
243
|
+
"name" => "webby3",
|
244
|
+
"notes" => "",
|
245
|
+
"plan" => "Webbybeta",
|
246
|
+
"node" => "miami-b11"
|
247
247
|
},
|
248
248
|
'sandbox' => {
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
249
|
+
"ip" => "201.81.121.201",
|
250
|
+
"status" => "on",
|
251
|
+
"name" => "sandbox",
|
252
|
+
"notes" => "",
|
253
|
+
"plan" => "Webbybeta",
|
254
|
+
"node" => "miami-b15"
|
255
255
|
},
|
256
256
|
'webby2' => {
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
257
|
+
"ip" => "67.53.31.2",
|
258
|
+
"status" => "on",
|
259
|
+
"name" => "webby2",
|
260
|
+
"notes" => "",
|
261
|
+
"plan" => "Webbybeta",
|
262
|
+
"node" => "miami-b11"
|
263
263
|
}
|
264
264
|
}
|
265
265
|
api.should_receive(:webbies).and_return(webbies)
|
data/webbynode.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{webbynode}
|
5
|
-
s.version = "1.0.
|
5
|
+
s.version = "1.0.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Felipe Coury"]
|
9
|
-
s.date = %q{2010-08-
|
9
|
+
s.date = %q{2010-08-05}
|
10
10
|
s.description = %q{Webbynode Deployment Gem}
|
11
11
|
s.email = %q{felipe@webbynode.com}
|
12
12
|
s.executables = ["webbynode", "wn"]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webbynode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Felipe Coury
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-05 00:00:00 -03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|