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 +4 -4
- data/lib/aloha_analyzer/user.rb +1 -1
- data/lib/aloha_analyzer/version.rb +1 -1
- data/spec/aloha_analyzer/user_spec.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f4ece6786a905d39f9b89ce4847fc12ae144621
|
4
|
+
data.tar.gz: da54c55b6df68bf274167f77dc7c65183ea5526b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e793bae0bc06626ed0dcb2329aacfbf9f023e00c7be5056cb48518f69a5e4ee02bbb128644fe5e480c4e2267190ef37fb07f08cfd5f6d1f7186dfdc6956e072c
|
7
|
+
data.tar.gz: a01bbfc97cb06366d37f1b1bfbac9728dac2977827634a16eda8c6edd7f0f7aaebb3027ea0906d7ab7f0523ed0c3ac8aa11d43e02a27e00b73c258cc3cb956da
|
data/lib/aloha_analyzer/user.rb
CHANGED
@@ -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][
|
24
|
+
analysys[:foreign_languages][abbreviation][:users].push user
|
25
25
|
else
|
26
26
|
analysys[:foreign_languages][abbreviation] = {
|
27
27
|
:count => 1,
|
@@ -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
|
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 =>
|
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,
|