aloha_analyzer 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19bcb240f0ee29c4f9f5f032068ba3ff9710b823
4
- data.tar.gz: 3f5987f278c69bf7d92453c2fa319b1aa5bdfa60
3
+ metadata.gz: 8f4ece6786a905d39f9b89ce4847fc12ae144621
4
+ data.tar.gz: da54c55b6df68bf274167f77dc7c65183ea5526b
5
5
  SHA512:
6
- metadata.gz: d7daaa3a619a0aa542ec8090fb9e12b5c4311224ad7dec47583eb9285e7323f4705d1c7e1a7f6c2e5b40b38674c508509d9b3793214b847d5385a9dd1e227efc
7
- data.tar.gz: 2877ab35ed1f3c6b7a67279e38a3d3e2c5fd1a7857c984e4e2d95b94df42a72ab7b4efb1b4d548855f48d059445d6520e7e3180dab7f888d3684882c4502b936
6
+ metadata.gz: e793bae0bc06626ed0dcb2329aacfbf9f023e00c7be5056cb48518f69a5e4ee02bbb128644fe5e480c4e2267190ef37fb07f08cfd5f6d1f7186dfdc6956e072c
7
+ data.tar.gz: a01bbfc97cb06366d37f1b1bfbac9728dac2977827634a16eda8c6edd7f0f7aaebb3027ea0906d7ab7f0523ed0c3ac8aa11d43e02a27e00b73c258cc3cb956da
@@ -21,7 +21,7 @@ module AlohaAnalyzer
21
21
  else
22
22
  if analysys[:foreign_languages][abbreviation]
23
23
  analysys[:foreign_languages][abbreviation][:count] += 1
24
- analysys[:foreign_languages][abbreviation]['users'].push user
24
+ analysys[:foreign_languages][abbreviation][:users].push user
25
25
  else
26
26
  analysys[:foreign_languages][abbreviation] = {
27
27
  :count => 1,
@@ -1,3 +1,3 @@
1
1
  module AlohaAnalyzer
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
@@ -143,7 +143,8 @@ describe AlohaAnalyzer::User do
143
143
  let(:users) {
144
144
  [
145
145
  {'id' => '1', 'lang' => 'de'},
146
- {'id' => '2', 'lang' => 'fr'}
146
+ {'id' => '2', 'lang' => 'fr'},
147
+ {'id' => '3', 'lang' => 'fr'}
147
148
  ]
148
149
  }
149
150
 
@@ -160,15 +161,15 @@ describe AlohaAnalyzer::User do
160
161
  end
161
162
 
162
163
  it 'includes the correct foreign_languages_count' do
163
- subject[:foreign_languages_count].should eq 2
164
+ subject[:foreign_languages_count].should eq 3
164
165
  end
165
166
 
166
167
  it 'returns results results based on the non user language' do
167
168
  subject[:foreign_languages].should eq(
168
169
  'fr' => {
169
- :count => 1,
170
+ :count => 2,
170
171
  :language => { 'abbreviation'=>'fr', 'name'=>'French', 'population'=>14000000, 'countries' => 'France, Canada, Belgium, Switzerland' },
171
- :users => [{'id' => '2', 'lang' => 'fr'}]
172
+ :users => [{'id' => '2', 'lang' => 'fr'}, {'id' => '3', 'lang' => 'fr'}]
172
173
  },
173
174
  'de' => {
174
175
  :count => 1,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aloha_analyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Aussaguel