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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b9eb953770054f0f0ccc77d603ff95985e6a0af
|
4
|
+
data.tar.gz: 791457281a34cc573853f305edf2e2d28afe4b61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5bb861db377d71b498264c8c0a900d2b63afecd9c611cc7f145b737bb6c520f3e1ad3b28809002036b04ebaacd6482527cd24a5d2eb64a511a779e4cb66a379
|
7
|
+
data.tar.gz: a189522b84778314a972c183ab0bc74645d92c6f6f0d49d67b264de3b9aed5af938796252632ce42d07acf4a04f436bb431e4f84f14550f5691d5b1e551195c9
|
data/Gemfile.lock
CHANGED
@@ -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.')
|
data/lib/fizzy/api/version.rb
CHANGED
@@ -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.
|
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-
|
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.
|
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
|