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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d49fd07bcd3e866faa256583f312e87355d168bd
4
- data.tar.gz: 250cae91773b9306b66b2f5ed7a78ab91d3f6c97
3
+ metadata.gz: d17b44ae67ad5b2e363276699a2a8fe992656f1c
4
+ data.tar.gz: 64251331a17c0ce70a3892310d4827fbcc4a0680
5
5
  SHA512:
6
- metadata.gz: 1ae97e94c882a4de4e9e8496804e6dfc2e142a8a3b080cf73c7257ee1c36adae843e03fcaa8a6344d3a4e8db4d8c5f82220f1cf4fb8d5c064cd2dcd4543bbc13
7
- data.tar.gz: aeab5f6d030dfa727dfccbd8242c758fd5b435511d1cf8c6c2c2501c13f80672bfde8640f31a02beeef9520a95595a446fe88e6de060b05b0e07a5f19a808243
6
+ metadata.gz: b0c50246531082bd81fa56d78d6df50f5121a28042e83a34b059a93022e0790ea3cdbf52c0187b9f158148625d1dfed2c217c25d4c54f9f64b88385f804fb830
7
+ data.tar.gz: 102564843acccaaab44324fcd0e1d4bfdd8187596870ce4c12f72b73ead9fed8f7d1cb038b94def060d2882c2c029486427e3bfb9af56617f20c7d1fc8bae8a7
@@ -10,7 +10,7 @@ module PatientZero
10
10
  end
11
11
 
12
12
  def reach
13
- @reach ||= (0.12 * analytical_data['followers']).round
13
+ @reach ||= (0.12 * analytical_data['followers'].to_i).round
14
14
  end
15
15
  end
16
16
  end
@@ -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, token
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, token
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'], token
26
+ new response['source'].merge('token' => token)
27
27
  rescue Error => e
28
28
  raise NotFoundError, e
29
29
  end
@@ -1,3 +1,3 @@
1
1
  module PatientZero
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
@@ -15,7 +15,7 @@ module PatientZero
15
15
  'platform' => 'facebook',
16
16
  'delete_id' => delete_id }
17
17
  end
18
- let(:source) { Source.new source_response_data, token }
18
+ let(:source) { Source.new source_response_data.merge('token' => token) }
19
19
 
20
20
  describe '.all' do
21
21
  before do
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.1
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.4.5
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