cloudstack_client 1.5.2 → 1.5.3

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: f86c6d03af35e79f76c416d01b439afbc095cbec
4
- data.tar.gz: a191ca6a63ffe1c245afcb7ee65f1825f3e52378
3
+ metadata.gz: ca7dd8678b511427f1950751a259588daeb7a263
4
+ data.tar.gz: 53c764c09eabe61c0040972239a738a53f33588a
5
5
  SHA512:
6
- metadata.gz: 6ca5bc325542b3ffcd3e9cbe7ce2e71d32cea2fa8eec523b2dd774b72591c6055f9d7c18b0497209a6354d07995bf2ca7d1dc4ce9b99164cc30e6effaf5b34ae
7
- data.tar.gz: 6ac2ccef4b0147617a65ee3e2d4db827bb1fef047843751733907e4e13dae18fa333bbf502d61e6ba465e83f10835a87aac361d0693e00f386fbf6ab93aa4876
6
+ metadata.gz: e86e7a8cddbaf5d500492f6ae7090be785b6acc6613a1158abcb0dec13d36622bc7003592ae93ff13cdb42433c9eea637b6b52505f240aca5b9719b4f6e41767
7
+ data.tar.gz: b567501df925e430cc10eb8976bf934b57258fa80b7872bd26b109864ab34e50b774422d51e7e30efe7002c1bfc155fa025a000a9f71dda9b9282ef105885c55
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cloudstack_client (1.5.2)
4
+ cloudstack_client (1.5.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -20,7 +20,7 @@ module CloudstackClient
20
20
  raise ConfigurationError, message
21
21
  end
22
22
 
23
- if env ||= config[:default]
23
+ if env = configuration[:env] || config[:default]
24
24
  unless config = config[env]
25
25
  raise ConfigurationError, "Can't find environment #{env}."
26
26
  end
@@ -1,3 +1,3 @@
1
1
  module CloudstackClient
2
- VERSION = "1.5.2"
2
+ VERSION = "1.5.3"
3
3
  end
@@ -3,26 +3,31 @@ require "cloudstack_client/configuration"
3
3
 
4
4
  describe CloudstackClient::Configuration do
5
5
 
6
- before do
7
- @config1 = CloudstackClient::Configuration.load({
8
- config_file: "#{File.expand_path File.dirname(__FILE__)}/data/cloudstack-1.yml",
9
- debug: true
10
- })
11
- @config2 = CloudstackClient::Configuration.load({
12
- config_file: "#{File.expand_path File.dirname(__FILE__)}/data/cloudstack-2.yml",
13
- debug: true
14
- })
15
- end
16
-
17
6
  describe "when the configuration is loaded without env" do
18
7
  it "must use the default env'" do
19
- @config1[:environment].must_equal "test1"
8
+ CloudstackClient::Configuration.load({
9
+ config_file: "#{File.expand_path File.dirname(__FILE__)}/data/cloudstack-1.yml",
10
+ debug: true
11
+ })[:environment].must_equal "test1"
12
+ end
13
+ end
14
+
15
+ describe "when an alternative env is in the options" do
16
+ it "must use the alternative env'" do
17
+ CloudstackClient::Configuration.load({
18
+ config_file: "#{File.expand_path File.dirname(__FILE__)}/data/cloudstack-1.yml",
19
+ env: "test2",
20
+ debug: true
21
+ })[:environment].must_equal "test2"
20
22
  end
21
23
  end
22
24
 
23
25
  describe "when only one env is present" do
24
26
  it "must use the one existing configuration'" do
25
- @config2[:api_key].must_equal "test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test"
27
+ CloudstackClient::Configuration.load({
28
+ config_file: "#{File.expand_path File.dirname(__FILE__)}/data/cloudstack-2.yml",
29
+ debug: true
30
+ })[:api_key].must_equal "test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test-test"
26
31
  end
27
32
  end
28
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudstack_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nik Wolfgramm