deltacloud-client 0.0.9.6 → 0.0.9.7
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/Rakefile +14 -2
- data/lib/deltacloud.rb +11 -2
- metadata +6 -6
data/Rakefile
CHANGED
@@ -25,8 +25,15 @@ task 'documentation' do
|
|
25
25
|
load 'lib/documentation.rb'
|
26
26
|
end
|
27
27
|
|
28
|
-
|
29
|
-
|
28
|
+
@specs = ['ruby', 'java'].inject({}) do |hash, spec_platform|
|
29
|
+
$platform = spec_platform
|
30
|
+
hash.update(spec_platform => Gem::Specification.load('deltacloud-client.gemspec'))
|
31
|
+
end
|
32
|
+
|
33
|
+
@specs.values.each do |spec|
|
34
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
35
|
+
pkg.need_tar = true
|
36
|
+
end
|
30
37
|
end
|
31
38
|
|
32
39
|
if Gem.available?('rspec')
|
@@ -47,3 +54,8 @@ desc "Clean Fixtures"
|
|
47
54
|
task 'fixtures:clean' do
|
48
55
|
FileUtils.rm_rf( File.dirname( __FILE__ ) + '/specs/data' )
|
49
56
|
end
|
57
|
+
|
58
|
+
begin
|
59
|
+
require 'ci/reporter/rake/test_unit'
|
60
|
+
rescue LoadError
|
61
|
+
end
|
data/lib/deltacloud.rb
CHANGED
@@ -194,7 +194,12 @@ module DeltaCloud
|
|
194
194
|
actions << [link['rel'], link[:href]]
|
195
195
|
define_method :"#{link['rel'].sanitize}!" do
|
196
196
|
client.request(:"#{link['method']}", link['href'], {}, {})
|
197
|
-
client.send(:"#{item.name}", item['id'])
|
197
|
+
@current_state = client.send(:"#{item.name}", item['id']).state
|
198
|
+
obj.instance_eval do |o|
|
199
|
+
def state
|
200
|
+
@current_state
|
201
|
+
end
|
202
|
+
end
|
198
203
|
end
|
199
204
|
end
|
200
205
|
define_method :actions do
|
@@ -403,8 +408,12 @@ module DeltaCloud
|
|
403
408
|
private
|
404
409
|
|
405
410
|
def default_headers
|
411
|
+
# The linebreaks inserted every 60 characters in the Base64
|
412
|
+
# encoded header cause problems under JRuby
|
413
|
+
auth_header = "Basic "+Base64.encode64("#{@username}:#{@password}")
|
414
|
+
auth_header.gsub!("\n", "")
|
406
415
|
{
|
407
|
-
:authorization =>
|
416
|
+
:authorization => auth_header,
|
408
417
|
:accept => "application/xml"
|
409
418
|
}
|
410
419
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deltacloud-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 101
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
9
|
- 9
|
10
|
-
-
|
11
|
-
version: 0.0.9.
|
10
|
+
- 7
|
11
|
+
version: 0.0.9.7
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Red Hat, Inc.
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-09-
|
19
|
+
date: 2010-09-30 00:00:00 +02:00
|
20
20
|
default_executable: deltacloudc
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -84,7 +84,6 @@ files:
|
|
84
84
|
- bin/deltacloudc
|
85
85
|
- COPYING
|
86
86
|
- specs/instance_states_spec.rb
|
87
|
-
- specs/instances_spec.rb
|
88
87
|
- specs/images_spec.rb
|
89
88
|
- specs/initialization_spec.rb
|
90
89
|
- specs/storage_snapshot_spec.rb
|
@@ -105,6 +104,7 @@ files:
|
|
105
104
|
- specs/fixtures/instances/inst0.yml
|
106
105
|
- specs/hardware_profiles_spec.rb
|
107
106
|
- specs/shared/resources.rb
|
107
|
+
- specs/instances_spec.rb
|
108
108
|
- specs/data/storage_volumes/vol1.yml
|
109
109
|
- specs/data/storage_volumes/vol3.yml
|
110
110
|
- specs/data/storage_volumes/vol2.yml
|
@@ -153,7 +153,6 @@ specification_version: 3
|
|
153
153
|
summary: Deltacloud REST Client
|
154
154
|
test_files:
|
155
155
|
- specs/instance_states_spec.rb
|
156
|
-
- specs/instances_spec.rb
|
157
156
|
- specs/images_spec.rb
|
158
157
|
- specs/initialization_spec.rb
|
159
158
|
- specs/storage_snapshot_spec.rb
|
@@ -174,6 +173,7 @@ test_files:
|
|
174
173
|
- specs/fixtures/instances/inst0.yml
|
175
174
|
- specs/hardware_profiles_spec.rb
|
176
175
|
- specs/shared/resources.rb
|
176
|
+
- specs/instances_spec.rb
|
177
177
|
- specs/data/storage_volumes/vol1.yml
|
178
178
|
- specs/data/storage_volumes/vol3.yml
|
179
179
|
- specs/data/storage_volumes/vol2.yml
|