fog-ecloud 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fog/bin/ecloud.rb +33 -0
- data/lib/fog/ecloud/version.rb +1 -1
- data/tests/helper.rb +6 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ecb53ec77476de2ae11bca42cd621d2181aef8c
|
4
|
+
data.tar.gz: 0956e35728fcf98253e49e7a10fe7e9fe98df445
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/fog/ecloud/version.rb
CHANGED
data/tests/helper.rb
CHANGED
@@ -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.
|
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
|