aloha_analyzer 0.1.0 → 0.1.1

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: f8f802d64436c198914e3ba6fd936ee1b9b5603d
4
- data.tar.gz: 8f7ad7551702b7fc56ea34ecd01eda283a17af68
3
+ metadata.gz: f719ac055973430d7ee137a7068a06353a318a32
4
+ data.tar.gz: c8f4263db94e40629ddba48bf597abb97ff887a4
5
5
  SHA512:
6
- metadata.gz: 91e770d907422d48c9b08c60c7b01362fe087568e47930523130a5421e19c2c741e8ec6ea13fe3379d9935b041a570df03de34e0cd59875d7cddeb34b1fc9b40
7
- data.tar.gz: 5ca995c0dc5e84b71e93110c9a4f73eae0f4331d36b7ebfb8e707365d107317f48dfcef42815fe1f62b75ac0990cbf987d1e535eb0d5ce64fba987e84ed18400
6
+ metadata.gz: 6363b29bad4f448c625400e3fa144be1e6e82d0c704e7c6d403ebc23a29c0ce1e0f020d060feb16e57478cf24baeafa664351a2a2660dea044ac08af957c610d
7
+ data.tar.gz: 751ebf163910a7aafe599bff0e34496d2c386b1525532da3b4bc9d0d138f693267c5d5b572cc7d1ab88e07589131a756e1aedda01a6a540c5a59d692781c8bd1
@@ -13,6 +13,7 @@ module AlohaAnalyzer
13
13
 
14
14
  def analyze
15
15
  {
16
+ user_language: Language.find_by_abbreviation(@language),
16
17
  with_user_language: with_user_language,
17
18
  without_user_language: without_user_language
18
19
  }
@@ -1,3 +1,3 @@
1
1
  module AlohaAnalyzer
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -57,6 +57,12 @@ describe AlohaAnalyzer::User do
57
57
  subject[:without_user_language]['languages'].should eq({})
58
58
  subject[:without_user_language]['count'].should eq 0
59
59
  end
60
+
61
+ it 'includes the user lanugage' do
62
+ subject[:user_language].should eq(
63
+ "abbreviation"=>"en", "name"=>"English", "population"=>238000000, "countries"=>"USA, Canada, UK, Ireland, Australia"
64
+ )
65
+ end
60
66
  end
61
67
 
62
68
  context 'when users' do
@@ -74,6 +80,12 @@ describe AlohaAnalyzer::User do
74
80
  subject.should be_a Hash
75
81
  end
76
82
 
83
+ it 'includes the user lanugage' do
84
+ subject[:user_language].should eq(
85
+ "abbreviation"=>"en", "name"=>"English", "population"=>238000000, "countries"=>"USA, Canada, UK, Ireland, Australia"
86
+ )
87
+ end
88
+
77
89
  it 'returns results based on the user language' do
78
90
  subject[:with_user_language].should == {
79
91
  'count' => 4,
@@ -133,6 +145,12 @@ describe AlohaAnalyzer::User do
133
145
  subject.should be_a Hash
134
146
  end
135
147
 
148
+ it 'includes the user lanugage' do
149
+ subject[:user_language].should eq(
150
+ "abbreviation"=>"en", "name"=>"English", "population"=>238000000, "countries"=>"USA, Canada, UK, Ireland, Australia"
151
+ )
152
+ end
153
+
136
154
  it 'returns results based on the user language' do
137
155
  subject[:with_user_language].should == {
138
156
  'count' => 2,
@@ -165,6 +183,12 @@ describe AlohaAnalyzer::User do
165
183
  subject.should be_a Hash
166
184
  end
167
185
 
186
+ it 'includes the user lanugage' do
187
+ subject[:user_language].should eq(
188
+ "abbreviation"=>"en", "name"=>"English", "population"=>238000000, "countries"=>"USA, Canada, UK, Ireland, Australia"
189
+ )
190
+ end
191
+
168
192
  it 'returns results based on the user language' do
169
193
  subject[:with_user_language].should == {
170
194
  'count' => 2,
@@ -216,6 +240,12 @@ describe AlohaAnalyzer::User do
216
240
  ]
217
241
  }
218
242
 
243
+ it 'includes the user lanugage' do
244
+ subject[:user_language].should eq(
245
+ "abbreviation"=>"en", "name"=>"English", "population"=>238000000, "countries"=>"USA, Canada, UK, Ireland, Australia"
246
+ )
247
+ end
248
+
219
249
  it 'merges english and british' do
220
250
  subject[:with_user_language].should == {
221
251
  'count' => 3,
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Aussaguel