aloha_analyzer 0.0.2 → 0.0.3

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: d9058d948aec70dc9c7f7f4433fa68eb1202d49b
4
- data.tar.gz: dc2275ac3d2d33d74cfb5bbf8b60d761dd4619d4
3
+ metadata.gz: d08ceafab57844e91f6ca11c53fc5795fe7df569
4
+ data.tar.gz: 1a848fb6ef23ea71805e4e614f6be79c2e07b67c
5
5
  SHA512:
6
- metadata.gz: 4860eb86b9ed7dda478ee0ce6711515b6ab3f9dafbf1732464a0e4210061fcfa1ccfa9fe82e0acfda78fd747b5cf1f441dc52c49a1bcd10190fb679aa78fdb0c
7
- data.tar.gz: 2e6bd34a132f41ef7484cd8535b4ef4319364242054b326d730b3444589e00e83c1f3fd61d9c85aba32202c4504c1c8c132ce3bf29577a49ae1cc4fee366856e
6
+ metadata.gz: d1ef328bcdc4aef0c5f554a7c4746f5c98f16ef12a404896ac43299cb39514f45c96e1db2e0415a0caf4e225379dacf0914672414e51a5b49f4d712f8414eb6b
7
+ data.tar.gz: 29d5e75a0c55224a2e1e8370b85c3906764d01606fac23c80cc33322adaaef467ff4908dceda78ffaf78245d0a5007516ee7747eec1da2d95f21e55355d652c4
data/README.md CHANGED
@@ -20,7 +20,7 @@ Or install it yourself as:
20
20
 
21
21
  ```ruby
22
22
  aloha = AlohaAnalyser::Follower.new(username, { credentials: credentials })
23
- alohas.calculate!
23
+ aloha.analyze!
24
24
  ```
25
25
 
26
26
  ## Contributing
@@ -17,7 +17,7 @@ module AlohaAnalyzer
17
17
  counter
18
18
  end
19
19
 
20
- def calculate!
20
+ def analyze!
21
21
  response = client.followers(@screen_name, request_options).to_h
22
22
  response[:users].each do |follower|
23
23
  increment follower[:lang]
@@ -41,7 +41,7 @@ module AlohaAnalyzer
41
41
  consumer_secret: @credentials[:consumer_secret],
42
42
  access_token: @credentials[:access_token],
43
43
  access_token_secret: @credentials[:access_token_secret]
44
- )
44
+ )
45
45
  end
46
46
 
47
47
  def increment(language)
@@ -1,3 +1,3 @@
1
1
  module AlohaAnalyzer
2
- VERSION = "0.0.2"
2
+ VERSION = '0.0.3'
3
3
  end
@@ -71,7 +71,7 @@ describe AlohaAnalyzer::Follower do
71
71
  end
72
72
  end
73
73
 
74
- describe '#calculate!' do
74
+ describe '#analyze!' do
75
75
  let(:followers) do
76
76
  {
77
77
  "users" => [
@@ -103,13 +103,13 @@ describe AlohaAnalyzer::Follower do
103
103
 
104
104
  context 'when first call' do
105
105
  it 'sets the next cursor' do
106
- subject.calculate!
106
+ subject.analyze!
107
107
 
108
108
  subject.cursor.should eq next_cursor
109
109
  end
110
110
 
111
111
  it 'calculates the langauges stats' do
112
- subject.calculate!
112
+ subject.analyze!
113
113
 
114
114
  subject.languages.should eq(
115
115
  'en' => 2,
@@ -119,7 +119,7 @@ describe AlohaAnalyzer::Follower do
119
119
  end
120
120
 
121
121
  it 'updates the count value' do
122
- subject.calculate!
122
+ subject.analyze!
123
123
 
124
124
  subject.count.should eq 4
125
125
  end
@@ -127,7 +127,7 @@ describe AlohaAnalyzer::Follower do
127
127
  it 'creates a new twitter client' do
128
128
  Twitter::REST::Client.should_receive(:new).and_call_original
129
129
 
130
- subject.calculate!
130
+ subject.analyze!
131
131
  end
132
132
  end
133
133
 
@@ -156,7 +156,7 @@ describe AlohaAnalyzer::Follower do
156
156
  let(:new_body) { new_followers.to_json }
157
157
 
158
158
  before do
159
- subject.calculate!
159
+ subject.analyze!
160
160
 
161
161
  stub_get('/1.1/followers/list.json')
162
162
  .with(query: new_query_args)
@@ -165,13 +165,13 @@ describe AlohaAnalyzer::Follower do
165
165
  end
166
166
 
167
167
  it 'sets the next cursor' do
168
- subject.calculate!
168
+ subject.analyze!
169
169
 
170
170
  subject.cursor.should eq new_next_cursor
171
171
  end
172
172
 
173
173
  it 'calculates the langauges stats' do
174
- subject.calculate!
174
+ subject.analyze!
175
175
 
176
176
  subject.languages.should eq(
177
177
  'en' => 2,
@@ -182,7 +182,7 @@ describe AlohaAnalyzer::Follower do
182
182
  end
183
183
 
184
184
  it 'updates the count value' do
185
- subject.calculate!
185
+ subject.analyze!
186
186
 
187
187
  subject.count.should eq 8
188
188
  end
@@ -190,7 +190,7 @@ describe AlohaAnalyzer::Follower do
190
190
  it 'does not create another twitter client' do
191
191
  Twitter::REST::Client.should_not_receive(:new)
192
192
 
193
- subject.calculate!
193
+ subject.analyze!
194
194
  end
195
195
  end
196
196
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aloha_analyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Aussaguel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-05 00:00:00.000000000 Z
11
+ date: 2014-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -96,7 +96,6 @@ files:
96
96
  - Rakefile
97
97
  - aloha_analyzer.gemspec
98
98
  - lib/aloha_analyzer.rb
99
- - lib/aloha_analyzer/analyzer.rb
100
99
  - lib/aloha_analyzer/follower.rb
101
100
  - lib/aloha_analyzer/version.rb
102
101
  - spec/aloha_analyzer/follower_spec.rb
File without changes