deltacloud-client 0.0.9.7 → 0.0.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/deltacloud.rb +8 -2
  3. metadata +4 -4
data/Rakefile CHANGED
@@ -56,6 +56,6 @@ task 'fixtures:clean' do
56
56
  end
57
57
 
58
58
  begin
59
- require 'ci/reporter/rake/test_unit'
59
+ require 'ci/reporter/rake/rspec'
60
60
  rescue LoadError
61
61
  end
data/lib/deltacloud.rb CHANGED
@@ -149,6 +149,8 @@ module DeltaCloud
149
149
  c.instance_eval do
150
150
  attr_accessor :id
151
151
  attr_accessor :uri
152
+
153
+
152
154
  end
153
155
  obj = xml_to_class(c, item)
154
156
  end
@@ -162,6 +164,10 @@ module DeltaCloud
162
164
  obj.id = item['id']
163
165
  api = self
164
166
  c.instance_eval do
167
+ define_method :method_missing do |method|
168
+ warn "[WARNING] Method '#{method}' is not available for this resource (#{c.name})."
169
+ return nil
170
+ end
165
171
  define_method :client do
166
172
  api
167
173
  end
@@ -261,7 +267,7 @@ module DeltaCloud
261
267
  end
262
268
  declare_entry_points_methods(@entry_points)
263
269
  end
264
-
270
+
265
271
  def create_key(opts={}, &block)
266
272
  params = { :name => opts[:name] }
267
273
  key = nil
@@ -293,7 +299,7 @@ module DeltaCloud
293
299
  ( params[:realm_id] = realm_id ) if realm_id
294
300
  ( params[:name] = name ) if name
295
301
  ( params[:user_data] = user_data ) if user_data
296
- ( params[:keyname] = user_data ) if key_name
302
+ ( params[:keyname] = key_name ) if key_name
297
303
 
298
304
  if opts[:hardware_profile].is_a?(String)
299
305
  params[:hwp_id] = opts[:hardware_profile]
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: 101
4
+ hash: 123
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
9
  - 9
10
- - 7
11
- version: 0.0.9.7
10
+ - 8
11
+ version: 0.0.9.8
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-30 00:00:00 +02:00
19
+ date: 2010-10-06 00:00:00 +02:00
20
20
  default_executable: deltacloudc
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency