contextio 1.8.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +3 -0
- data/contextio.gemspec +2 -1
- data/lib/contextio/api.rb +1 -0
- data/lib/contextio/version.rb +1 -1
- data/spec/unit/contextio/api_spec.rb +16 -0
- metadata +6 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d0ce8711ddb4e1035573a3223cd684671ff749f
|
4
|
+
data.tar.gz: f2e4bc5f665e16e849cfffd680d7b894556f3e5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1ab1dfa9cfdbf0ca8ee05d08ed8d405faacffdf47eb119337d4c034340e5b5044cc35abb6d520de9107aa2ba877d1f68de9a7363374e9fcc131537dd4113312
|
7
|
+
data.tar.gz: fe3dc409d8363b5a75dd5301dede9fbabebf5317944b0cd55b309e881df54044a21390ab2c642418b91d945aa1cc7dbad7cb09f49328e96221dc7e8048605e1d
|
data/CHANGES.md
CHANGED
data/contextio.gemspec
CHANGED
@@ -17,7 +17,8 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ['lib']
|
19
19
|
|
20
|
-
gem.add_dependency 'faraday',
|
20
|
+
gem.add_dependency 'faraday', '~> 0.9.1'
|
21
|
+
|
21
22
|
gem.add_dependency 'faraday_middleware', '~> 0.9.0'
|
22
23
|
gem.add_dependency 'simple_oauth', '~> 0.2.0'
|
23
24
|
|
data/lib/contextio/api.rb
CHANGED
data/lib/contextio/version.rb
CHANGED
@@ -119,6 +119,22 @@ describe ContextIO::API do
|
|
119
119
|
describe "#request" do
|
120
120
|
subject { ContextIO::API.new(nil, nil).request(:get, 'test') }
|
121
121
|
|
122
|
+
context "with a timeout response" do
|
123
|
+
before do
|
124
|
+
WebMock.stub_request(
|
125
|
+
:get,
|
126
|
+
'https://api.context.io/2.0/test'
|
127
|
+
).to_timeout.then.to_return(
|
128
|
+
status: 200,
|
129
|
+
body: JSON.dump('yep' => 'noap'),
|
130
|
+
)
|
131
|
+
end
|
132
|
+
|
133
|
+
it "parses the JSON response" do
|
134
|
+
expect { ContextIO::API.new(nil, nil).request(:get, 'test') }.to raise_error(Faraday::Error::TimeoutError)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
122
138
|
context "with a good response" do
|
123
139
|
before do
|
124
140
|
WebMock.stub_request(
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contextio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bernstein
|
@@ -9,28 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: 0.8.0
|
21
|
-
- - "<"
|
18
|
+
- - "~>"
|
22
19
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.
|
20
|
+
version: 0.9.1
|
24
21
|
type: :runtime
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
27
24
|
requirements:
|
28
|
-
- - "
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: 0.8.0
|
31
|
-
- - "<"
|
25
|
+
- - "~>"
|
32
26
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
27
|
+
version: 0.9.1
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: faraday_middleware
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|