fog 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,8 +7,8 @@ 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.2'
11
- s.date = '2010-06-28'
10
+ s.version = '0.2.3'
11
+ s.date = '2010-06-29'
12
12
  s.rubyforge_project = 'fog'
13
13
 
14
14
  ## Make sure your summary is short. The description may be as long
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.2'
42
+ VERSION = '0.2.3'
43
43
  end
44
44
 
45
45
  module Mock
@@ -23,7 +23,9 @@ module Fog
23
23
 
24
24
  # Optimize later, no need to get_internet_services again
25
25
  def get(uri)
26
- if data = connection.get_internet_services(href).body[:InternetService].detect { |service| service[:Href] == uri }
26
+ internet_services = connection.get_internet_services(href).body[:InternetService]
27
+ internet_services = [ internet_services ] if internet_services.is_a?(Hash)
28
+ if data = internet_services.detect { |service| service[:Href] == uri }
27
29
  new(data)
28
30
  end
29
31
  rescue Fog::Errors::NotFound
@@ -16,7 +16,7 @@ module Fog
16
16
  builder.Enabled(service_data[:enabled])
17
17
  builder.Description(service_data[:description])
18
18
  builder.Timeout(service_data[:timeout])
19
- builder.RedirectUrl(service_data[:redirect_url])
19
+ builder.RedirectURL(service_data[:redirect_url])
20
20
  builder.PublicIpAddress {
21
21
  builder.Id(ip_address_data[:id])
22
22
  builder.Href(ip_address_data[:href].to_s)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-28 00:00:00 -05:00
17
+ date: 2010-06-29 00:00:00 -05:00
18
18
  default_executable: fog
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency