yao 0.2.10 → 0.2.11

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: d25559958db2dcc6ae00ff5ae913199c5be23ebb
4
- data.tar.gz: 67054283721a10858ee0180aa9d3b43f34fe01ac
3
+ metadata.gz: 661703f10f4674a5a29c12e9834ef95cc30ce2d5
4
+ data.tar.gz: 179bf1287b23cfb2da9c63645a1d262b254aa9bf
5
5
  SHA512:
6
- metadata.gz: 791b232c1e756573c4556cec85c043074f6b1df31f9dd1fb793731d0c18990d2e91d565892c7b49fff93e4813b01c235f525141d722408349cc834116062ada6
7
- data.tar.gz: e56a63c2c6dd5b51387f37a9d94e51e24b7afa64b20b5b69b93de31dd11a822add46ac1a7bd5262aeed91003d702dfcf8379f1de7b577fdfdc76a52e7fe0e6f4
6
+ metadata.gz: 0d548d149e633239cf0d6fd7e534f90bb51680924c47399e10fd87b6d639c7bf7ec5c4d69f75ffe546e6c8b622f72194622bfeda0094225ea770028acf17a101
7
+ data.tar.gz: 9471beb9e8a2d98c36ca85d5d8d08906e9d44cd62fc5b832c1dc9069a8cfaa5efbaa341ab1e1ebfc1fa731c04e79505553859dfe8931dcb557a148777086eaa1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.2.11
2
+
3
+ * Some fixes by @hanazuki
4
+
1
5
  ## v0.2.9
2
6
 
3
7
  * Fix a syntax error in sample.rb vy @hsbt
data/lib/yao/client.rb CHANGED
@@ -27,13 +27,14 @@ module Yao
27
27
  # XXX: neutron just have v2.0 API and endpoint may not have version prefix
28
28
  if type == "network"
29
29
  urls = urls.map {|public_or_admin, url|
30
- url = URI.parse(url).path == "/" ? File.join(url, "v2.0") : url
30
+ path = URI.parse(url).path
31
+ url = (path == '' || path == '/') ? File.join(url, "v2.0") : url
31
32
  [public_or_admin, url]
32
33
  }.to_h
33
34
  end
34
35
 
35
- self.pool[type] = Yao::Client.gen_client(urls[:public_url], token: token)
36
- self.admin_pool[type] = Yao::Client.gen_client(urls[:admin_url], token: token)
36
+ self.pool[type] = Yao::Client.gen_client(urls[:public_url], token: token) if urls[:public_url]
37
+ self.admin_pool[type] = Yao::Client.gen_client(urls[:admin_url], token: token) if urls[:admin_url]
37
38
  end
38
39
  end
39
40
  end
@@ -51,7 +51,7 @@ module Yao::Resources
51
51
  Yao.default_client.admin_pool[service]
52
52
  else
53
53
  Yao.default_client.pool[service]
54
- end
54
+ end or raise "You do not have #{@admin ? 'admin' : 'public'} access to the #{service} service"
55
55
  end
56
56
 
57
57
  def as_member(&blk)
data/lib/yao/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yao
2
- VERSION = "0.2.10"
2
+ VERSION = "0.2.11"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yao
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uchio, KONDO
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-28 00:00:00.000000000 Z
11
+ date: 2016-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  version: '0'
234
234
  requirements: []
235
235
  rubyforge_project:
236
- rubygems_version: 2.4.8
236
+ rubygems_version: 2.4.5.1
237
237
  signing_key:
238
238
  specification_version: 4
239
239
  summary: Yet Another OpenStack API Wrapper that rocks!!