fog-core 1.31.0 → 1.31.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3eb8ac3e692bc65def64e107150dfe6c28ab7ac
4
- data.tar.gz: 7c1ea69cfa269891d17cdb35a477ea9d89e695c0
3
+ metadata.gz: 6225f60258e8f99e143c4f5e7328c08880ef8c0f
4
+ data.tar.gz: 0baaf114b5b90e7be5a7f6fcad41208f52d09cd5
5
5
  SHA512:
6
- metadata.gz: 9bc9c9b3dd033caa97876a983e0071a7367f310109e5bbadd024d9a59fd6d5422f408203a2dc4d80a0974e1e1b2cb4cc5db7e7ec7e5491d15f3d163588a0ba44
7
- data.tar.gz: 6807600030a3dfa1cd4324d3307237f1ce7867acc982af713d19fc4d1900307d1cfc221186e5a97dd2d14a420bb55d576baa0e69edc3c6ad5fe942c630a49efe
6
+ metadata.gz: 91ac73c15d8a602aadaca938bcf9d68245e1b0164bf9f7fe1cb39d4c4696aa35f3954510ade65d05b4bb095a686721175b6730547bc1a6f535d60134a2ecda4a
7
+ data.tar.gz: b71ed95b9f7b69f933d35aaec4dc86a62766aa7b464d833210e8cfec54e4d2435a69d0be3b7a3705b6bf6e44ef965a64f32f91c9317d127f9cabdf7538b5e25a
data/CONTRIBUTORS.md CHANGED
@@ -1,21 +1,35 @@
1
+ * Aaron Patterson <aaron.patterson@gmail.com>
2
+ * Akira Matsuda <ronnie@dio.jp>
1
3
  * Anatol <anatol.pomozov@gmail.com>
2
4
  * Bryan Paxton <starbelly@pobox.com>
3
5
  * Chris Johnson <wchrisjohnson@gmail.com>
4
6
  * Chris Sinjakli <chris@sinjakli.co.uk>
5
7
  * Dominic Cleal <dcleal@redhat.com>
6
8
  * Evan Light <evan@tripledogdare.net>
9
+ * Frederick Cheung <frederick.cheung@gmail.com>
10
+ * Isaac Hollander McCreery <ihmccreery@google.com>
7
11
  * Jake Bell <jake@theunraveler.com>
8
12
  * Josh Kalderimis <josh.kalderimis@gmail.com>
13
+ * Josh Lane <me@joshualane.com>
14
+ * Kensuke Nagae <kyanny@gmail.com>
9
15
  * Kevin Menard <kevin@nirvdrum.com>
16
+ * Ladislav Smola <lsmola@redhat.com>
17
+ * Matheus Mina <mfbmina@gmail.com>
10
18
  * Matt Bostock <matt@mattbostock.com>
11
19
  * Matt Darby <darby@mittdarko.com>
12
20
  * Matt Darby <matt.darby@rackspace.com>
21
+ * Matt Eldridge <matt.eldridge@us.ibm.com>
13
22
  * Mike Hagedorn <mike@silverchairsolutions.com>
14
23
  * Naoto TAKAHASHI <tnaoto@gmail.com>
15
24
  * Paul Thornthwaite <paul@brightbox.co.uk>
16
25
  * Paul Thornthwaite <tokengeek@gmail.com>
17
26
  * Paulo Henrique Lopes Ribeiro <plribeiro3000@gmail.com>
27
+ * Peter Drake <peter.drake@acquia.com>
18
28
  * Wesley Beary <geemus+github@gmail.com>
19
29
  * Wesley Beary <geemus@gmail.com>
30
+ * cristhiano <cristhiano_figueira@yahoo.com.br>
20
31
  * geemus <geemus@gmail.com>
21
- * mountkin <moutkin@gmail.com>
32
+ * mountkin <moutkin@gmail.com>
33
+ * ozroc <ozrocpablo@gmail.com>
34
+ * schneems <richard.schneeman@gmail.com>
35
+ * starbelly <starbelly@pobox.com>
data/changelog.md CHANGED
@@ -1,3 +1,8 @@
1
+ 1.31.1 06/17/2015
2
+ ==========================================================
3
+
4
+ fixes around unknown providers/services
5
+
1
6
  1.31.0 06/17/2015
2
7
  ==========================================================
3
8
 
data/lib/fog/account.rb CHANGED
@@ -12,14 +12,18 @@ module Fog
12
12
  require "fog/account/storm_on_demand"
13
13
  Fog::Account::StormOnDemand.new(attributes)
14
14
  elsif providers.include?(provider)
15
- require "fog/#{provider}/account"
16
15
  begin
17
- Fog::Account.const_get(Fog.providers[provider])
16
+ require "fog/#{provider}/account"
17
+ begin
18
+ Fog::Account.const_get(Fog.providers[provider])
19
+ rescue
20
+ Fog.const_get(Fog.providers[provider])::Account
21
+ end.new(attributes)
18
22
  rescue
19
- Fog.const_get(Fog.providers[provider])::Account
20
- end.new(attributes)
23
+ raise ArgumentError, "#{provider} has no account service"
24
+ end
21
25
  else
22
- raise ArgumentError, "#{provider} has no account service"
26
+ raise ArgumentError, "#{provider} is not a recognized provider"
23
27
  end
24
28
  end
25
29
 
data/lib/fog/baremetal.rb CHANGED
@@ -8,14 +8,18 @@ module Fog
8
8
  attributes = attributes.dup # Prevent delete from having side effects
9
9
  provider = attributes.delete(:provider).to_s.downcase.to_sym
10
10
  if providers.include?(provider)
11
- require "fog/#{provider}/baremetal"
12
11
  begin
13
- Fog::Baremetal.const_get(Fog.providers[provider])
12
+ require "fog/#{provider}/baremetal"
13
+ begin
14
+ Fog::Baremetal.const_get(Fog.providers[provider])
15
+ rescue
16
+ Fog.const_get(Fog.providers[provider])::Baremetal
17
+ end.new(attributes)
14
18
  rescue
15
- Fog.const_get(Fog.providers[provider])::Baremetal
16
- end.new(attributes)
19
+ raise ArgumentError, "#{provider} has no baremetal service"
20
+ end
17
21
  else
18
- raise ArgumentError, "#{provider} has no baremetal service"
22
+ raise ArgumentError, "#{provider} is not a recognized provider"
19
23
  end
20
24
  end
21
25
 
data/lib/fog/billing.rb CHANGED
@@ -11,14 +11,18 @@ module Fog
11
11
  require "fog/billing/storm_on_demand"
12
12
  Fog::Billing::StormOnDemand.new(attributes)
13
13
  elsif providers.include?(provider)
14
- require "fog/#{provider}/billing"
15
14
  begin
16
- Fog::Account.const_get(Fog.providers[provider])
15
+ require "fog/#{provider}/billing"
16
+ begin
17
+ Fog::Account.const_get(Fog.providers[provider])
18
+ rescue
19
+ Fog.const_get(Fog.providers[provider])::Account
20
+ end.new(attributes)
17
21
  rescue
18
- Fog.const_get(Fog.providers[provider])::Account
19
- end.new(attributes)
22
+ raise ArgumentError, "#{provider} has no billing service"
23
+ end
20
24
  else
21
- raise ArgumentError, "#{provider} has no billing service"
25
+ raise ArgumentError, "#{provider} is not a recognized provider"
22
26
  end
23
27
  end
24
28
 
data/lib/fog/cdn.rb CHANGED
@@ -8,14 +8,18 @@ module Fog
8
8
  attributes = attributes.dup # prevent delete from having side effects
9
9
  provider = attributes.delete(:provider).to_s.downcase.to_sym
10
10
  if providers.include?(provider)
11
- require "fog/#{provider}/cdn"
12
11
  begin
13
- Fog::CDN.const_get(Fog.providers[provider])
12
+ require "fog/#{provider}/cdn"
13
+ begin
14
+ Fog::CDN.const_get(Fog.providers[provider])
15
+ rescue
16
+ Fog.const_get(Fog.providers[provider])::CDN
17
+ end.new(attributes)
14
18
  rescue
15
- Fog.const_get(Fog.providers[provider])::CDN
16
- end.new(attributes)
19
+ raise ArgumentError, "#{provider} has no cdn service"
20
+ end
17
21
  else
18
- raise ArgumentError, "#{provider} has no cdn service"
22
+ raise ArgumentError, "#{provider} is not a recognized provider"
19
23
  end
20
24
  end
21
25
 
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Core
3
- VERSION = "1.31.0"
3
+ VERSION = "1.31.1"
4
4
  end
5
5
  end
data/lib/fog/image.rb CHANGED
@@ -8,14 +8,18 @@ module Fog
8
8
  attributes = attributes.dup # Prevent delete from having side effects
9
9
  provider = attributes.delete(:provider).to_s.downcase.to_sym
10
10
  if providers.include?(provider)
11
- require "fog/#{provider}/image"
12
11
  begin
13
- Fog::Image.const_get(Fog.providers[provider])
12
+ require "fog/#{provider}/image"
13
+ begin
14
+ Fog::Image.const_get(Fog.providers[provider])
15
+ rescue
16
+ Fog.const_get(Fog.providers[provider])::Image
17
+ end.new(attributes)
14
18
  rescue
15
- Fog.const_get(Fog.providers[provider])::Image
16
- end.new(attributes)
19
+ raise ArgumentError, "#{provider} has no image service"
20
+ end
17
21
  else
18
- raise ArgumentError, "#{provider} has no image service"
22
+ raise ArgumentError, "#{provider} is not a recognized provider"
19
23
  end
20
24
  end
21
25
 
data/lib/fog/metering.rb CHANGED
@@ -8,14 +8,18 @@ module Fog
8
8
  attributes = attributes.dup # Prevent delete from having side effects
9
9
  provider = attributes.delete(:provider).to_s.downcase.to_sym
10
10
  if providers.include?(provider)
11
- require "fog/#{provider}/metering"
12
11
  begin
13
- Fog::Metering.const_get(Fog.providers[provider])
12
+ require "fog/#{provider}/metering"
13
+ begin
14
+ Fog::Metering.const_get(Fog.providers[provider])
15
+ rescue
16
+ Fog.const_get(Fog.providers[provider])::Metering
17
+ end.new(attributes)
14
18
  rescue
15
- Fog.const_get(Fog.providers[provider])::Metering
16
- end.new(attributes)
19
+ raise ArgumentError, "#{provider} has no metering service"
20
+ end
17
21
  else
18
- raise ArgumentError, "#{provider} has no metering service"
22
+ raise ArgumentError, "#{provider} is not a recognized provider"
19
23
  end
20
24
  end
21
25
 
@@ -11,14 +11,18 @@ module Fog
11
11
  require "fog/monitoring/storm_on_demand"
12
12
  Fog::Monitoring::StormOnDemand.new(attributes)
13
13
  elsif providers.include?(provider)
14
- require "fog/#{provider}/monitoring"
15
14
  begin
16
- Fog::Monitoring.const_get(Fog.providers[provider])
15
+ require "fog/#{provider}/monitoring"
16
+ begin
17
+ Fog::Monitoring.const_get(Fog.providers[provider])
18
+ rescue
19
+ Fog.const_get(Fog.providers[provider])::Monitoring
20
+ end.new(attributes)
17
21
  rescue
18
- Fog.const_get(Fog.providers[provider])::Monitoring
19
- end.new(attributes)
22
+ raise ArgumentError, "#{provider} has no monitoring service"
23
+ end
20
24
  else
21
- raise ArgumentError, "#{provider} has no monitoring service"
25
+ raise ArgumentError, "#{provider} is not a recognized provider"
22
26
  end
23
27
  end
24
28
 
data/lib/fog/network.rb CHANGED
@@ -12,14 +12,18 @@ module Fog
12
12
  require "fog/network/storm_on_demand"
13
13
  return Fog::Network::StormOnDemand.new(attributes)
14
14
  elsif providers.include?(provider)
15
- require "fog/#{provider}/network"
16
15
  begin
17
- Fog::Network.const_get(Fog.providers[provider])
16
+ require "fog/#{provider}/network"
17
+ begin
18
+ Fog::Network.const_get(Fog.providers[provider])
19
+ rescue
20
+ Fog.const_get(Fog.providers[provider])::Network
21
+ end.new(attributes)
18
22
  rescue
19
- Fog.const_get(Fog.providers[provider])::Network
20
- end.new(attributes)
23
+ raise ArgumentError, "#{provider} has no network service"
24
+ end
21
25
  else
22
- raise ArgumentError, "#{provider} has no network service"
26
+ raise ArgumentError, "#{provider} is not a recognized provider"
23
27
  end
24
28
  end
25
29
 
@@ -8,14 +8,18 @@ module Fog
8
8
  attributes = attributes.dup # Prevent delete from having side effects
9
9
  provider = attributes.delete(:provider).to_s.downcase.to_sym
10
10
  if providers.include?(provider)
11
- require "fog/#{provider}/orchestration"
12
11
  begin
13
- Fog::Orchestration.const_get(Fog.providers[provider])
12
+ require "fog/#{provider}/orchestration"
13
+ begin
14
+ Fog::Orchestration.const_get(Fog.providers[provider])
15
+ rescue
16
+ Fog.const_get(Fog.providers[provider])::Orchestration
17
+ end.new(attributes)
14
18
  rescue
15
- Fog.const_get(Fog.providers[provider])::Orchestration
16
- end.new(attributes)
19
+ raise ArgumentError, "#{provider} has no orchestration service"
20
+ end
17
21
  else
18
- raise ArgumentError, "#{provider} has no orchestration service"
22
+ raise ArgumentError, "#{provider} is not a recognized provider"
19
23
  end
20
24
  end
21
25
 
data/lib/fog/support.rb CHANGED
@@ -12,14 +12,18 @@ module Fog
12
12
  require "fog/support/storm_on_demand"
13
13
  Fog::Support::StormOnDemand.new(attributes)
14
14
  elsif providers.include?(provider)
15
- require "fog/#{provider}/support"
16
15
  begin
17
- Fog::Support.const_get(Fog.providers[provider])
16
+ require "fog/#{provider}/support"
17
+ begin
18
+ Fog::Support.const_get(Fog.providers[provider])
19
+ rescue
20
+ Fog.const_get(Fog.providers[provider])::Support
21
+ end.new(attributes)
18
22
  rescue
19
- Fog.const_get(Fog.providers[provider])::Support
20
- end.new(attributes)
23
+ raise ArgumentError, "#{provider} has no support service"
24
+ end
21
25
  else
22
- raise ArgumentError, "#{provider} has no support service"
26
+ raise ArgumentError, "#{provider} is not a recognized provider"
23
27
  end
24
28
  end
25
29
 
data/lib/fog/volume.rb CHANGED
@@ -8,14 +8,18 @@ module Fog
8
8
  attributes = attributes.dup # Prevent delete from having side effects
9
9
  provider = attributes.delete(:provider).to_s.downcase.to_sym
10
10
  if providers.include?(provider)
11
- require "fog/#{provider}/volume"
12
11
  begin
13
- Fog::Volume.const_get(Fog.providers[provider])
12
+ require "fog/#{provider}/volume"
13
+ begin
14
+ Fog::Volume.const_get(Fog.providers[provider])
15
+ rescue
16
+ Fog.const_get(Fog.providers[provider])::Volume
17
+ end.new(attributes)
14
18
  rescue
15
- Fog.const_get(Fog.providers[provider])::Volume
16
- end.new(attributes)
19
+ raise ArgumentError, "#{provider} has no volume service"
20
+ end
17
21
  else
18
- raise ArgumentError, "#{provider} has no volume service"
22
+ raise ArgumentError, "#{provider} is not a recognized provider"
19
23
  end
20
24
  end
21
25
 
data/lib/fog/vpn.rb CHANGED
@@ -12,14 +12,18 @@ module Fog
12
12
  require "fog/vpn/storm_on_demand"
13
13
  Fog::VPN::StormOnDemand.new(attributes)
14
14
  elsif providers.include?(provider)
15
- require "fog/#{provider}/vpn"
16
15
  begin
17
- Fog::VPN.const_get(Fog.providers[provider])
16
+ require "fog/#{provider}/vpn"
17
+ begin
18
+ Fog::VPN.const_get(Fog.providers[provider])
19
+ rescue
20
+ Fog.const_get(Fog.providers[provider])::VPN
21
+ end.new(attributes)
18
22
  rescue
19
- Fog.const_get(Fog.providers[provider])::VPN
20
- end.new(attributes)
23
+ raise ArgumentError, "#{provider} has no vpn service"
24
+ end
21
25
  else
22
- raise ArgumentError, "#{provider} has no vpn service"
26
+ raise ArgumentError, "#{provider} is not a recognized provider"
23
27
  end
24
28
  end
25
29
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.31.0
4
+ version: 1.31.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Light