fog-ecloud 0.0.1 → 0.0.2

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: d3909bfbe8c90865bed3f73165de546ec8685210
4
- data.tar.gz: b5bbdf7dab23a381966831202edc7689b2dc1e8a
3
+ metadata.gz: 4ecb53ec77476de2ae11bca42cd621d2181aef8c
4
+ data.tar.gz: 0956e35728fcf98253e49e7a10fe7e9fe98df445
5
5
  SHA512:
6
- metadata.gz: 2c7162aa9c4ce48363255222e9e02c186c1ee36caa103db316399cd699d911cd28853dfcd5310b5907f571ad2c2a16224b49fd57dd79dcbd0c2119959b65f6e4
7
- data.tar.gz: 3aea05578e98f796b374f7300b5036d919c39a6b4ddbd03fadb3dbafa1c43abb2cfeb19f0ba33b36601a839a3a131ec60c0d4edf79d000cb25ebb057d74af44f
6
+ metadata.gz: e26aa4b832d36e988f677fc6547b3017071abe5c34d56ac2a365c09dfb497e70782dafff44e7bfae1dce49afd3820f4f5e1e46e981260ce6f05cee08d27a92d3
7
+ data.tar.gz: 735e16b3978c5d16633982f81e8cea6b33199a2db7a11e05f31f0b9bdaa3c026ddefb292c9f87bda9fb45b78b99ce846b08767ae31567b1d5d8063d2bec0ec25
@@ -0,0 +1,33 @@
1
+ class Ecloud < Fog::Bin
2
+ class << self
3
+ def available?
4
+ Fog::Ecloud::ECLOUD_OPTIONS.all? {|requirement| Fog.credentials.include?(requirement)}
5
+ end
6
+
7
+ def class_for(key)
8
+ case key
9
+ when :compute
10
+ Fog::Compute::Ecloud
11
+ else
12
+ raise ArgumentError, "Unrecognized service: #{key}"
13
+ end
14
+ end
15
+
16
+ def [](service)
17
+ @@connections ||= Hash.new do |hash, key|
18
+ hash[key] = case key
19
+ when :compute
20
+ Fog::Logger.warning("Ecloud[:compute] is not recommended, use Compute[:ecloud] for portability")
21
+ Fog::Compute.new(:provider => 'Ecloud')
22
+ else
23
+ raise ArgumentError, "Unrecognized service: #{key.inspect}"
24
+ end
25
+ end
26
+ @@connections[service]
27
+ end
28
+
29
+ def services
30
+ Fog::Ecloud.services
31
+ end
32
+ end
33
+ end
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Ecloud
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -2,6 +2,8 @@ if ENV['COVERAGE']
2
2
  require 'coveralls'
3
3
  require 'simplecov'
4
4
 
5
+ SimpleCov.command_name 'Unit Tests'
6
+
5
7
  SimpleCov.start do
6
8
  add_filter '/spec/'
7
9
  add_filter '/test/'
@@ -10,6 +12,10 @@ end
10
12
 
11
13
  require 'fog/ecloud'
12
14
 
15
+ if ENV['COVERAGE']
16
+ Coveralls.wear!
17
+ end
18
+
13
19
  Excon.defaults.merge!(:debug_request => true, :debug_response => true)
14
20
 
15
21
  require File.expand_path(File.join(File.dirname(__FILE__), 'helpers', 'mock_helper'))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-ecloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Henrique Lopes Ribeiro
@@ -159,6 +159,7 @@ files:
159
159
  - fog-ecloud.gemspec
160
160
  - gemfiles/Gemfile.1.9.2-
161
161
  - gemfiles/Gemfile.1.9.3+
162
+ - lib/fog/bin/ecloud.rb
162
163
  - lib/fog/ecloud.rb
163
164
  - lib/fog/ecloud/collection.rb
164
165
  - lib/fog/ecloud/compute.rb