fog 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  ## If your rubyforge_project name is different, then edit it and comment out
8
8
  ## the sub! line in the Rakefile
9
9
  s.name = 'fog'
10
- s.version = '0.2.7'
10
+ s.version = '0.2.8'
11
11
  s.date = '2010-06-30'
12
12
  s.rubyforge_project = 'fog'
13
13
 
data/lib/fog.rb CHANGED
@@ -39,7 +39,7 @@ require 'fog/vcloud'
39
39
  module Fog
40
40
 
41
41
  unless const_defined?(:VERSION)
42
- VERSION = '0.2.7'
42
+ VERSION = '0.2.8'
43
43
  end
44
44
 
45
45
  module Mock
@@ -64,9 +64,13 @@ module Fog
64
64
  validate_internet_service_data(service_data)
65
65
 
66
66
  internet_services_uri = ensure_unparsed(internet_services_uri)
67
-
67
+
68
68
  if ip = ip_from_uri(internet_services_uri)
69
- new_service = service_data.merge!( { :href => Fog::Vcloud::Terremark::Ecloud::Mock.internet_service_href( { :id => rand(1000) } ), :timeout => 2 } )
69
+ id = rand(1000)
70
+ new_service = service_data.merge!( { :href => Fog::Vcloud::Terremark::Ecloud::Mock.internet_service_href( { :id => id } ),
71
+ :id => id.to_s,
72
+ :timeout => 2,
73
+ :nodes => [] } )
70
74
  ip[:services] << new_service
71
75
  xml = generate_internet_service_response( service_data, ip )
72
76
 
@@ -48,6 +48,14 @@ if Fog.mocking?
48
48
  specify { public_ip[:Name].should == @public_ip.name }
49
49
  specify { public_ip[:Id].should == @public_ip.id }
50
50
 
51
+ it "should update the mock object properly" do
52
+ subject
53
+ ip, service = @vcloud.mock_ip_and_service_from_service_url(body[:Href])
54
+ service[:href].should == body[:Href]
55
+ service[:id].should == body[:Id]
56
+ service[:nodes].should == []
57
+ end
58
+
51
59
  end
52
60
 
53
61
  context "with a public_ips_uri that doesn't exist" do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 7
9
- version: 0.2.7
8
+ - 8
9
+ version: 0.2.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)