fog 0.2.12 → 0.2.13

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.12'
11
- s.date = '2010-07-09'
10
+ s.version = '0.2.13'
11
+ s.date = '2010-07-12'
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
@@ -40,7 +40,7 @@ require 'fog/vcloud'
40
40
  module Fog
41
41
 
42
42
  unless const_defined?(:VERSION)
43
- VERSION = '0.2.12'
43
+ VERSION = '0.2.13'
44
44
  end
45
45
 
46
46
  module Mock
@@ -195,13 +195,18 @@ module Fog
195
195
  # If we don't support any versions the service does, then raise an error.
196
196
  # If the @version that super selected isn't in our supported list, then select one that is.
197
197
  def check_versions
198
- super
199
- unless (supported_version_numbers & Fog::Vcloud::Terremark::Ecloud.supported_versions).length > 0
200
- raise UnsupportedVersion.new("\nService @ #{@versions_uri} supports: #{supported_version_numbers.join(', ')}\n" +
201
- "Fog::Vcloud::Terremark::Ecloud supports: #{Fog::Vcloud::Terremark::Ecloud.supported_versions.join(', ')}")
202
- end
203
- unless supported_version_numbers.include?(@version)
204
- @version = (supported_version_numbers & Fog::Vcloud::Terremark::Ecloud.supported_versions).sort.first
198
+ if @version
199
+ unless supported_version_numbers.include?(@version.to_s)
200
+ raise UnsupportedVersion.new("#{@version} is not supported by the server.")
201
+ end
202
+ unless Fog::Vcloud::Terremark::Ecloud.supported_versions.include?(@version.to_s)
203
+ raise UnsupportedVersion.new("#{@version} is not supported by Fog::Vcloud::Terremark::Ecloud")
204
+ end
205
+ else
206
+ unless @version = (supported_version_numbers & Fog::Vcloud::Terremark::Ecloud.supported_versions).sort.first
207
+ raise UnsupportedVersion.new("\nService @ #{@versions_uri} supports: #{supported_version_numbers.join(', ')}\n" +
208
+ "Fog::Vcloud::Terremark::Ecloud supports: #{Fog::Vcloud::Terremark::Ecloud.supported_versions.join(', ')}")
209
+ end
205
210
  end
206
211
  end
207
212
  end
@@ -30,12 +30,12 @@ module Fog
30
30
  end
31
31
 
32
32
  def validate_internet_service_data(service_data, configure=false)
33
- valid_opts = [:name, :protocol, :port, :description, :enabled, :redirect_url]
33
+ required_opts = [:name, :protocol, :port, :description, :enabled]
34
34
  if configure
35
- valid_opts + [ :id, :href, :timeout ]
35
+ required_opts + [ :id, :href, :timeout ]
36
36
  end
37
- unless valid_opts.all? { |opt| service_data.keys.include?(opt) }
38
- raise ArgumentError.new("Required Internet Service data missing: #{(valid_opts - service_data.keys).map(&:inspect).join(", ")}")
37
+ unless required_opts.all? { |opt| service_data.keys.include?(opt) }
38
+ raise ArgumentError.new("Required Internet Service data missing: #{(required_opts - service_data.keys).map(&:inspect).join(", ")}")
39
39
  end
40
40
  end
41
41
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 12
9
- version: 0.2.12
8
+ - 13
9
+ version: 0.2.13
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-07-09 00:00:00 -07:00
17
+ date: 2010-07-12 00:00:00 -07:00
18
18
  default_executable: fog
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency