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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37c30e28810f599493d55be7f383ece9d6f666e4
4
- data.tar.gz: b2208ec252cecb66164e6f061cf41cb7c49eec28
3
+ metadata.gz: 1d0ce8711ddb4e1035573a3223cd684671ff749f
4
+ data.tar.gz: f2e4bc5f665e16e849cfffd680d7b894556f3e5f
5
5
  SHA512:
6
- metadata.gz: eb03ba558b0ec866bf5e18cee3be050ec68b6dd3383ba8db07893de208c101a8d239e6c9fbe778e40865af35ecd37785be755ca55a581ae69e91a2d5c70067ae
7
- data.tar.gz: 83ef597a1addfe49dae4d513f2bb6cfc71cb538bf4ba3d5256d4e4f0cd5d0263ca53973373caf44fe3b51e68d3164d80fcacea8f1bd4a3d119f9ffc66731c3dc
6
+ metadata.gz: b1ab1dfa9cfdbf0ca8ee05d08ed8d405faacffdf47eb119337d4c034340e5b5044cc35abb6d520de9107aa2ba877d1f68de9a7363374e9fcc131537dd4113312
7
+ data.tar.gz: fe3dc409d8363b5a75dd5301dede9fbabebf5317944b0cd55b309e881df54044a21390ab2c642418b91d945aa1cc7dbad7cb09f49328e96221dc7e8048605e1d
data/CHANGES.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changes
2
2
 
3
+ ##2.0.0
4
+ *Limit Faraday to no retries on requests, update version of faraday -Bonnie Mattson
5
+
3
6
  ## 1.8.0
4
7
 
5
8
  * loosened faraday dependency - Michael Bernstein
@@ -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', ['>= 0.8.0', '< 0.10.0']
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
 
@@ -170,6 +170,7 @@ class ContextIO
170
170
 
171
171
  faraday.request :oauth, consumer_key: key, consumer_secret: secret
172
172
  faraday.request :url_encoded
173
+ faraday.request :retry, max: 0
173
174
 
174
175
  faraday.adapter Faraday.default_adapter
175
176
  end
@@ -1,6 +1,6 @@
1
1
  class ContextIO
2
2
  # @private
3
- VERSION = "1.8.1"
3
+ VERSION = "2.0.0"
4
4
 
5
5
  # The gem version.
6
6
  #
@@ -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: 1.8.1
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-03-30 00:00:00.000000000 Z
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.10.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.10.0
27
+ version: 0.9.1
34
28
  - !ruby/object:Gem::Dependency
35
29
  name: faraday_middleware
36
30
  requirement: !ruby/object:Gem::Requirement