patient_zero 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/patient_zero/analytics/twitter.rb +1 -1
- data/lib/patient_zero/source.rb +5 -5
- data/lib/patient_zero/version.rb +1 -1
- data/spec/patient_zero/source_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d17b44ae67ad5b2e363276699a2a8fe992656f1c
|
4
|
+
data.tar.gz: 64251331a17c0ce70a3892310d4827fbcc4a0680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0c50246531082bd81fa56d78d6df50f5121a28042e83a34b059a93022e0790ea3cdbf52c0187b9f158148625d1dfed2c217c25d4c54f9f64b88385f804fb830
|
7
|
+
data.tar.gz: 102564843acccaaab44324fcd0e1d4bfdd8187596870ce4c12f72b73ead9fed8f7d1cb038b94def060d2882c2c029486427e3bfb9af56617f20c7d1fc8bae8a7
|
data/lib/patient_zero/source.rb
CHANGED
@@ -2,28 +2,28 @@ module PatientZero
|
|
2
2
|
class Source
|
3
3
|
include Client
|
4
4
|
|
5
|
-
attr_accessor :id, :name, :platform, :token, :delete_id
|
5
|
+
attr_accessor :id, :name, :platform, :token, :delete_id, :token
|
6
6
|
|
7
|
-
def initialize attributes
|
7
|
+
def initialize attributes
|
8
8
|
@id = attributes.fetch 'id'
|
9
9
|
@name = attributes.fetch 'name'
|
10
10
|
@invalid = attributes.fetch 'is_invalid'
|
11
11
|
@tracked = attributes.fetch 'is_tracked'
|
12
12
|
@platform = attributes.fetch 'platform'
|
13
13
|
@delete_id = attributes.fetch 'delete_id'
|
14
|
-
@token = token
|
14
|
+
@token = attributes.fetch 'token'
|
15
15
|
end
|
16
16
|
|
17
17
|
def self.all token=Authorization.token
|
18
18
|
response = get '/mobile/api/v1/sources/', client_token: token
|
19
19
|
response['sources'].map do |source_attributes|
|
20
|
-
new source_attributes
|
20
|
+
new source_attributes.merge('token' => token)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.find source_id, token
|
25
25
|
response = get '/mobile/api/v1/sources/show/', id: source_id, client_token: token
|
26
|
-
new response['source']
|
26
|
+
new response['source'].merge('token' => token)
|
27
27
|
rescue Error => e
|
28
28
|
raise NotFoundError, e
|
29
29
|
end
|
data/lib/patient_zero/version.rb
CHANGED
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.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Zaninovich
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.
|
184
|
+
rubygems_version: 2.2.2
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: A gem to use the Viral Heat API
|