rest_connection 0.0.11 → 0.0.12
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.
- data/VERSION +1 -1
- data/lib/rest_connection/rightscale/server.rb +10 -4
- data/rest_connection.gemspec +11 -11
- metadata +12 -12
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.12
|
@@ -40,12 +40,18 @@ class Server
|
|
40
40
|
new_params_hash
|
41
41
|
end
|
42
42
|
|
43
|
-
#
|
44
|
-
|
43
|
+
# Since RightScale hands back the parameters with a "name" and "value" tags we should
|
44
|
+
# transform them into the proper hash. This it the same for setting and getting.
|
45
|
+
def parameters
|
45
46
|
# if the parameters are an array of hashes, that means we need to transform.
|
46
47
|
if @params['parameters'].is_a?(Array)
|
47
48
|
@params['parameters'] = transform_parameters(@params['parameters'])
|
48
49
|
end
|
50
|
+
@params['parameters']
|
51
|
+
end
|
52
|
+
|
53
|
+
# This is overriding the default save with one that can massage the parameters
|
54
|
+
def save
|
49
55
|
uri = URI.parse(self.href)
|
50
56
|
connection.put(uri.path, resource_singular_name.to_sym => @params)
|
51
57
|
end
|
@@ -57,8 +63,8 @@ class Server
|
|
57
63
|
reload
|
58
64
|
connection.logger("#{nickname} is #{self.state}")
|
59
65
|
while(timeout > 0)
|
60
|
-
return true if state
|
61
|
-
raise "FATAL error, this server is stranded and needs to be #{st}: #{nickname}, see audit: #{self.audit_link}" if state.include?('stranded')
|
66
|
+
return true if state =~ /#{st}/
|
67
|
+
raise "FATAL error, this server is stranded and needs to be #{st}: #{nickname}, see audit: #{self.audit_link}" if state.include?('stranded') && !st.include?('stranded')
|
62
68
|
sleep 30
|
63
69
|
timeout -= 30
|
64
70
|
connection.logger("waiting for server #{nickname} to go #{st}, state is #{state}")
|
data/rest_connection.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rest_connection}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jeremy Deininger"]
|
12
|
-
s.date = %q{2010-10-
|
12
|
+
s.date = %q{2010-10-20}
|
13
13
|
s.description = %q{provides rest_connection}
|
14
14
|
s.email = %q{jeremy@rubyonlinux.org}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -73,21 +73,21 @@ Gem::Specification.new do |s|
|
|
73
73
|
s.rubygems_version = %q{1.3.7}
|
74
74
|
s.summary = %q{lib for restful connections to the rightscale api}
|
75
75
|
s.test_files = [
|
76
|
-
"spec/
|
77
|
-
"spec/ec2_ssh_key_internal_spec.rb",
|
78
|
-
"spec/image_jockey.rb",
|
76
|
+
"spec/server_internal_spec.rb",
|
79
77
|
"spec/method_missing_spec.rb",
|
80
|
-
"spec/rs_internal_spec.rb",
|
81
|
-
"spec/server_internal_spec.rb",
|
82
78
|
"spec/server_spec.rb",
|
79
|
+
"spec/ec2_ssh_key_internal_spec.rb",
|
80
|
+
"spec/rs_internal_spec.rb",
|
83
81
|
"spec/tag_spec.rb",
|
84
|
-
"
|
82
|
+
"spec/ec2_server_array_spec.rb",
|
83
|
+
"spec/image_jockey.rb",
|
84
|
+
"examples/relaunch_deployment.rb",
|
85
|
+
"examples/cucumber/step_definitions/spot_check_steps.rb",
|
85
86
|
"examples/cucumber/step_definitions/deployment_steps.rb",
|
86
87
|
"examples/cucumber/step_definitions/mysql_steps.rb",
|
87
88
|
"examples/cucumber/step_definitions/recipe_steps.rb",
|
88
|
-
"examples/
|
89
|
-
"examples/
|
90
|
-
"examples/right_scale_ec2_instances_api_test.rb"
|
89
|
+
"examples/right_scale_ec2_instances_api_test.rb",
|
90
|
+
"examples/console.rb"
|
91
91
|
]
|
92
92
|
|
93
93
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest_connection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 12
|
10
|
+
version: 0.0.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jeremy Deininger
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-20 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -154,18 +154,18 @@ signing_key:
|
|
154
154
|
specification_version: 3
|
155
155
|
summary: lib for restful connections to the rightscale api
|
156
156
|
test_files:
|
157
|
-
- spec/ec2_server_array_spec.rb
|
158
|
-
- spec/ec2_ssh_key_internal_spec.rb
|
159
|
-
- spec/image_jockey.rb
|
160
|
-
- spec/method_missing_spec.rb
|
161
|
-
- spec/rs_internal_spec.rb
|
162
157
|
- spec/server_internal_spec.rb
|
158
|
+
- spec/method_missing_spec.rb
|
163
159
|
- spec/server_spec.rb
|
160
|
+
- spec/ec2_ssh_key_internal_spec.rb
|
161
|
+
- spec/rs_internal_spec.rb
|
164
162
|
- spec/tag_spec.rb
|
165
|
-
-
|
163
|
+
- spec/ec2_server_array_spec.rb
|
164
|
+
- spec/image_jockey.rb
|
165
|
+
- examples/relaunch_deployment.rb
|
166
|
+
- examples/cucumber/step_definitions/spot_check_steps.rb
|
166
167
|
- examples/cucumber/step_definitions/deployment_steps.rb
|
167
168
|
- examples/cucumber/step_definitions/mysql_steps.rb
|
168
169
|
- examples/cucumber/step_definitions/recipe_steps.rb
|
169
|
-
- examples/cucumber/step_definitions/spot_check_steps.rb
|
170
|
-
- examples/relaunch_deployment.rb
|
171
170
|
- examples/right_scale_ec2_instances_api_test.rb
|
171
|
+
- examples/console.rb
|