fizzy-api 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a07dd155550446cb1c0c0e83a0b40fbe5781553
4
- data.tar.gz: 0c677160447452b4682d5aecf8296b5cceb55ef3
3
+ metadata.gz: 3b9eb953770054f0f0ccc77d603ff95985e6a0af
4
+ data.tar.gz: 791457281a34cc573853f305edf2e2d28afe4b61
5
5
  SHA512:
6
- metadata.gz: f7ca443c0b0c0b641c7aa14da7c9dc5c826501a17a786ac5fdd8d08168be56a09368f805ad0a04f5dcce4fad4337c1d80d94babab67aff1e06beb3aa58da9aec
7
- data.tar.gz: af5cd0a61c468847880e65a3f265b7c2172ec0f22b857aa94008ad08dfb991097f252572c382c2bc490d8b861db303ebbd74f6450bef3f2ea59a2187297365b8
6
+ metadata.gz: b5bb861db377d71b498264c8c0a900d2b63afecd9c611cc7f145b737bb6c520f3e1ad3b28809002036b04ebaacd6482527cd24a5d2eb64a511a779e4cb66a379
7
+ data.tar.gz: a189522b84778314a972c183ab0bc74645d92c6f6f0d49d67b264de3b9aed5af938796252632ce42d07acf4a04f436bb431e4f84f14550f5691d5b1e551195c9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fizzy-api (0.1.1)
4
+ fizzy-api (0.1.2)
5
5
  active_interaction (~> 2.0)
6
6
  httparty (~> 0.12)
7
7
  virtus (~> 1.0)
@@ -18,6 +18,9 @@ module Fizzy
18
18
 
19
19
  def invalid_response(response)
20
20
  case response.code
21
+ when 202
22
+ raise Errors::OutcomeNotAvailableError, select_measurement_text(response,
23
+ 'The results have not yet been calculated.')
21
24
  when 204
22
25
  raise Errors::TooFewMeasurementsError, select_measurement_text(response,
23
26
  'Not enough measurements available.')
@@ -1,5 +1,5 @@
1
1
  module Fizzy
2
2
  module Api
3
- VERSION = '0.1.1'.freeze
3
+ VERSION = '0.1.2'.freeze
4
4
  end
5
5
  end
@@ -30,6 +30,21 @@ module Fizzy
30
30
  end
31
31
 
32
32
  describe 'error handling' do
33
+ it 'should notice a 202' do
34
+ allow(response).to receive(:code).and_return 202
35
+ expect(session).to receive(:get)
36
+ .with("/dossier/#{dossier_id}/protocol_subscriptions/#{protocol_subscription_id}/render_sync/#{path}",
37
+ options)
38
+ .and_return(response)
39
+ outcome = lambda do
40
+ described_class.run! dossier_id: dossier_id,
41
+ protocol_subscription_id: protocol_subscription_id,
42
+ path: path,
43
+ options: options
44
+ end
45
+ expect { outcome.call }.to raise_error(Errors::OutcomeNotAvailableError)
46
+ end
47
+
33
48
  it 'should notice a 204' do
34
49
  allow(response).to receive(:code).and_return 204
35
50
  expect(session).to receive(:get)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fizzy-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Blaauw
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-10 00:00:00.000000000 Z
12
+ date: 2016-06-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
@@ -174,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  version: '0'
175
175
  requirements: []
176
176
  rubyforge_project:
177
- rubygems_version: 2.4.8
177
+ rubygems_version: 2.6.3
178
178
  signing_key:
179
179
  specification_version: 4
180
180
  summary: API wrapper gem around Fizzy's Graph API