yao 0.2.9 → 0.2.10
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/README.md +2 -0
- data/lib/yao/auth.rb +1 -1
- data/lib/yao/client.rb +7 -1
- data/lib/yao/version.rb +1 -1
- data/test/yao/test_client.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d25559958db2dcc6ae00ff5ae913199c5be23ebb
|
4
|
+
data.tar.gz: 67054283721a10858ee0180aa9d3b43f34fe01ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 791b232c1e756573c4556cec85c043074f6b1df31f9dd1fb793731d0c18990d2e91d565892c7b49fff93e4813b01c235f525141d722408349cc834116062ada6
|
7
|
+
data.tar.gz: e56a63c2c6dd5b51387f37a9d94e51e24b7afa64b20b5b69b93de31dd11a822add46ac1a7bd5262aeed91003d702dfcf8379f1de7b577fdfdc76a52e7fe0e6f4
|
data/README.md
CHANGED
data/lib/yao/auth.rb
CHANGED
data/lib/yao/client.rb
CHANGED
@@ -46,7 +46,7 @@ module Yao
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def gen_client(endpoint, token: nil)
|
49
|
-
Faraday.new( endpoint ) do |f|
|
49
|
+
Faraday.new( endpoint, client_options ) do |f|
|
50
50
|
client_generator.call(f, token)
|
51
51
|
end
|
52
52
|
end
|
@@ -56,6 +56,12 @@ module Yao
|
|
56
56
|
set.register_endpoints("default" => {public_url: new_endpoint || Yao.config.endpoint})
|
57
57
|
self.default_client = set
|
58
58
|
end
|
59
|
+
|
60
|
+
def client_options
|
61
|
+
opt = {}
|
62
|
+
opt.merge!({ request: { timeout: Yao.config.timeout }}) if Yao.config.timeout
|
63
|
+
opt
|
64
|
+
end
|
59
65
|
end
|
60
66
|
|
61
67
|
Yao.config.param :auth_url, nil do |endpoint|
|
data/lib/yao/version.rb
CHANGED
data/test/yao/test_client.rb
CHANGED
@@ -49,4 +49,10 @@ class TestClient < Test::Unit::TestCase
|
|
49
49
|
]
|
50
50
|
assert { cli.builder.handlers == handlers }
|
51
51
|
end
|
52
|
+
|
53
|
+
def test_timeout
|
54
|
+
stub(Yao.config).timeout { 300 }
|
55
|
+
cli = Yao::Client.gen_client("http://cool-api.example.com:12345/v3.0")
|
56
|
+
assert { cli.options.timeout == 300 }
|
57
|
+
end
|
52
58
|
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.
|
4
|
+
version: 0.2.10
|
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-
|
11
|
+
date: 2016-01-28 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.
|
236
|
+
rubygems_version: 2.4.8
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: Yet Another OpenStack API Wrapper that rocks!!
|