openstack_bridge 0.0.5 → 1.0.0

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: 8340fe7ceef6b34a8c70e429e9bd6a91bc220ffe
4
- data.tar.gz: 9c5c3d52a3024a8f709c73b39ac1ea7316303908
3
+ metadata.gz: c86f749e675a7b18c585b5e82ff801a789c9cd6f
4
+ data.tar.gz: b31fb519ef5edf9ca3f7ab1617c8894060de4085
5
5
  SHA512:
6
- metadata.gz: cb7dc884ff7d924a579eab9c64008594839fdf06a347bcdc3a3ed7c5b2292f1603293e2fa5d33d270333c7629a03a409eca2f2521388de05ac6099a7f8233550
7
- data.tar.gz: 2a909e13b44d143bbffbbcf1fdfe39acae4d981b9449310aaf7336191296821b302816a68e09749268728b2685c4f0089416591e033add7c98dc2907963fdb65
6
+ metadata.gz: 93410cde2f4c68b4561688697719ba8f474abcf2080dee1751b4022dd4a1027dea58b25c609be04e24c69ff228a65cfd29170603ea11eb114d3de91b57cdabb1
7
+ data.tar.gz: 2c7beaf6b5ff17d3f979f0ba9fe17f61869e1fb80cb72cbb6e8d5ae5cb616b144e1dddc8e365e710d83e4de26ae436f046d6f9c534c01e6fb68dfd38a93cd7fe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openstack_bridge (0.0.4)
4
+ openstack_bridge (1.0.0)
5
5
  curb
6
6
  httpi
7
7
  json
@@ -12,12 +12,13 @@ GEM
12
12
  addressable (2.3.6)
13
13
  crack (0.4.2)
14
14
  safe_yaml (~> 1.0.0)
15
- curb (0.8.5)
15
+ curb (0.9.3)
16
16
  diff-lcs (1.2.5)
17
- httpi (2.2.4)
17
+ httpi (2.4.2)
18
18
  rack
19
- json (1.8.1)
20
- rack (1.5.2)
19
+ socksify
20
+ json (2.1.0)
21
+ rack (2.0.3)
21
22
  rake (10.3.2)
22
23
  rspec (3.0.0)
23
24
  rspec-core (~> 3.0.0)
@@ -32,6 +33,7 @@ GEM
32
33
  rspec-support (~> 3.0.0)
33
34
  rspec-support (3.0.1)
34
35
  safe_yaml (1.0.3)
36
+ socksify (1.7.1)
35
37
  vcr (2.9.2)
36
38
  webmock (1.17.4)
37
39
  addressable (>= 2.2.7)
@@ -47,3 +49,6 @@ DEPENDENCIES
47
49
  rspec
48
50
  vcr
49
51
  webmock
52
+
53
+ BUNDLED WITH
54
+ 1.13.7
@@ -1,5 +1,5 @@
1
1
  module OpenstackBridge
2
- class Swift < Struct.new(:host, :user, :password, :tenant)
2
+ class Swift < Struct.new(:host, :user, :password, :tenant, :region)
3
3
  attr_accessor :authentication
4
4
 
5
5
  def initialize(*)
@@ -8,8 +8,12 @@ module OpenstackBridge
8
8
  raise "Wrong authentication response" if !self.authentication.response || !self.authentication.response['access']
9
9
  end
10
10
 
11
+ def end_points
12
+ self.authentication.response['access']['serviceCatalog'].detect {|s| s['name'] == 'swift'}['endpoints']
13
+ end
14
+
11
15
  def end_point
12
- self.authentication.response['access']['serviceCatalog'].detect {|s| s['name'] == 'swift'}['endpoints'].first['publicURL']
16
+ (region ? end_points.detect { |end_point| end_point['region'] == region } : end_points.first)['publicURL']
13
17
  end
14
18
 
15
19
  def containers
@@ -1,3 +1,3 @@
1
1
  module OpenstackBridge
2
- VERSION = "0.0.5"
2
+ VERSION = '1.0.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstack_bridge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - lis2
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-25 00:00:00.000000000 Z
12
+ date: 2017-06-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  requirements: []
177
177
  rubyforge_project:
178
- rubygems_version: 2.4.6
178
+ rubygems_version: 2.5.2
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: Ruby integration with openstack, especially swift