fizzy-api 0.1.0 → 0.1.1

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: 7fc3193e43fa75dbb7385d9a42288b292028eb12
4
- data.tar.gz: e1ef0ba2c2829a753fa69b8ee9ee5c9e612c9d71
3
+ metadata.gz: 4a07dd155550446cb1c0c0e83a0b40fbe5781553
4
+ data.tar.gz: 0c677160447452b4682d5aecf8296b5cceb55ef3
5
5
  SHA512:
6
- metadata.gz: 375e483780dfbc2574db63c3a66f4112cd3f10256514450c591f02696ae27c89305804b520fb6a721691165c9c318cb4cb70976b02e168910216382eb20f66a2
7
- data.tar.gz: 06d7b0af3f48be07aab2b4203c25a4c274feba63d442c60006be9af97fe57b04662baf522275dcf070dcdf79436825c4a9ea6b53a6bea205616222d6246164be
6
+ metadata.gz: f7ca443c0b0c0b641c7aa14da7c9dc5c826501a17a786ac5fdd8d08168be56a09368f805ad0a04f5dcce4fad4337c1d80d94babab67aff1e06beb3aa58da9aec
7
+ data.tar.gz: af5cd0a61c468847880e65a3f265b7c2172ec0f22b857aa94008ad08dfb991097f252572c382c2bc490d8b861db303ebbd74f6450bef3f2ea59a2187297365b8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fizzy-api (0.1.0)
4
+ fizzy-api (0.1.1)
5
5
  active_interaction (~> 2.0)
6
6
  httparty (~> 0.12)
7
7
  virtus (~> 1.0)
@@ -18,9 +18,9 @@ module Fizzy
18
18
  case response.code
19
19
  when 202
20
20
  raise(Errors::OutcomeNotAvailableError,
21
- select_measurement_text(response.body, 'The results are currently being calculated.'))
21
+ select_measurement_text(response, 'The results are currently being calculated.'))
22
22
  when 404
23
- raise Errors::GraphNotFoundError, select_measurement_text(response.body,
23
+ raise Errors::GraphNotFoundError, select_measurement_text(response,
24
24
  'Participant not found, or graph not supported.')
25
25
  else
26
26
  raise Errors::UnexpectedStatusError, "Status code #{response.code} not expected."
@@ -1,5 +1,5 @@
1
1
  module Fizzy
2
2
  module Api
3
- VERSION = '0.1.0'.freeze
3
+ VERSION = '0.1.1'.freeze
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ module Fizzy
6
6
  describe CalculateOutcome do
7
7
  let(:dossier_id) { '123' }
8
8
  let(:protocol_subscription_id) { 'abc' }
9
- let(:response) { httparty_response('') }
9
+ let(:response) { httparty_response('body') }
10
10
  let(:session) { FactoryGirl.build :basic_auth_session }
11
11
 
12
12
  it_behaves_like 'an endpoint'
@@ -25,7 +25,7 @@ module Fizzy
25
25
  protocol_subscription_id: protocol_subscription_id,
26
26
  path: path,
27
27
  options: options
28
- expect(outcome).to eq '<svg>'
28
+ expect(outcome).to eq response
29
29
  end
30
30
 
31
31
  describe 'error handling' do
@@ -26,7 +26,7 @@ module Fizzy
26
26
  protocol_subscription_id: protocol_subscription_id,
27
27
  path: path,
28
28
  options: options
29
- expect(outcome).to eq '<svg>'
29
+ expect(outcome).to eq response
30
30
  end
31
31
 
32
32
  describe 'error handling' do
@@ -21,7 +21,7 @@ module Fizzy
21
21
  .and_return(response)
22
22
  outcome = described_class.run! dossier_id: dossier_id,
23
23
  protocol_subscription_id: protocol_subscription_id
24
- expect(outcome).to eq '{}'
24
+ expect(outcome).to eq response
25
25
  end
26
26
 
27
27
  describe 'error handling' do
@@ -1,6 +1,7 @@
1
1
  def httparty_response(response_data)
2
- allow(response_data).to receive(:body).and_return response_data
3
- allow(response_data).to receive(:code).and_return 200
4
- allow(response_data).to receive(:parsed_response).and_return response_data
5
- response_data
2
+ response = double('reponse')
3
+ allow(response).to receive(:body).and_return response_data
4
+ allow(response).to receive(:code).and_return 200
5
+ allow(response).to receive(:parsed_response).and_return response_data
6
+ response
6
7
  end
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Blaauw