patient_zero 0.2.0 → 0.2.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: b70009e4968e63500d72f6764132b925d4e1b242
4
- data.tar.gz: fcfa41d4ae1bccc8993bb99a7eed66d375c681ef
3
+ metadata.gz: 77ad97aacf438a7b62edef293658bf31d20ad5fe
4
+ data.tar.gz: 925675627f483aad448716cabdc8336c027e8e70
5
5
  SHA512:
6
- metadata.gz: 9c4e93faa37fccf1fa215f12cb72e60bf0418ab8d9c01e497dc6208356747e8476a94fae9203e81adf89f03c95c640dc0fba331c1981595b9f97e56f5ba4ed32
7
- data.tar.gz: 21b59f18e6a67fc44d854c646b223ba2e4b56737ad1bcffa01f9ea0f9f379dd68c0f429f8844e53fea1af53f1ebb0ab0d0e1e66e438a6d0ed430aa78ae5cd740
6
+ metadata.gz: a36b50cd9f6e444702fec738e1997f45d97a895629a184c7376aaa7665dd4336d2731b741ce1aea2096c2b1af3799926d9e8f88daa7ca5c9d569b9cc8700c67c
7
+ data.tar.gz: d27490bf2b18d59649f6cf83f52fc8f682a574c8f7e1b87d2dc2ce87c9f79e8b3df1634620ea53e20a23cbbd15bdc0e4ecfa674a80033b338e61154a1c59d5e5
@@ -18,7 +18,7 @@ module PatientZero
18
18
  end
19
19
  end
20
20
 
21
- def self.find source_id, token=Authorization.token
21
+ def self.find source_id, token
22
22
  response = get '/mobile/api/v1/sources/show/', id: source_id, client_token: token
23
23
  new response['source'], token
24
24
  rescue Error => e
@@ -1,3 +1,3 @@
1
1
  module PatientZero
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -48,21 +48,17 @@ module PatientZero
48
48
  end
49
49
  it 'calls the sources show api' do
50
50
  expect(Client.connection).to receive(:get).with('/mobile/api/v1/sources/show/', anything)
51
- Source.find id
52
- end
53
- it 'calls Authorization.token if no token is passed in' do
54
- expect(Authorization).to receive(:token)
55
- Source.find id
51
+ Source.find id, token
56
52
  end
57
53
  context 'when the source exists' do
58
54
  it 'returns a source' do
59
- expect(Source.find(id).id).to eq source.id
55
+ expect(Source.find(id, token).id).to eq source.id
60
56
  end
61
57
  end
62
58
  context 'when no source exists' do
63
59
  it 'throws an PatientZero::Error' do
64
60
  allow(Client).to receive(:get).and_raise Error, 'The source could not be found. Please check your inputs.'
65
- expect{ Source.find id }.to raise_error PatientZero::NotFoundError
61
+ expect{ Source.find id, token }.to raise_error PatientZero::NotFoundError
66
62
  end
67
63
  end
68
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patient_zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Zaninovich
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  requirements: []
166
166
  rubyforge_project:
167
- rubygems_version: 2.2.2
167
+ rubygems_version: 2.4.5
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: A gem to use the Viral Heat API
@@ -184,4 +184,3 @@ test_files:
184
184
  - spec/patient_zero/profile_spec.rb
185
185
  - spec/patient_zero/source_spec.rb
186
186
  - spec/spec_helper.rb
187
- has_rdoc: