aloha_analyzer 0.4.5 → 0.4.6
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7284fb3de4248b56029daca8a962b79680a83180
|
|
4
|
+
data.tar.gz: d740c5af7cb4068e1a7b54b296b06a3ced6f9efe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ccf239fed0914842e47b04415801a462d698a6d5e78162856face1baf8709f706c3d514fd2aa7f6ed3e2669b4f562c1a59f334ac5000eefd24bd6bb690ed0b3b
|
|
7
|
+
data.tar.gz: 41295028b6c46949cb121beb3a4951de7d1433d8191b5036446b81e7c6581486c0e9949c51adfb4646c2c8d4c92bf304fe33d78cbaa442d26343fbcd8db4e721
|
|
@@ -5,16 +5,11 @@ module AlohaAnalyzer
|
|
|
5
5
|
|
|
6
6
|
LANGUAGES = YAML::load_file(File.join(File.dirname(__FILE__), 'yaml/languages.yml'))
|
|
7
7
|
ALIASES = YAML::load_file(File.join(File.dirname(__FILE__), 'yaml/aliases.yml'))
|
|
8
|
-
TOTAL_POPULATION = 790000000
|
|
9
8
|
|
|
10
9
|
def self.all
|
|
11
10
|
LANGUAGES['languages']
|
|
12
11
|
end
|
|
13
12
|
|
|
14
|
-
def self.total
|
|
15
|
-
TOTAL_POPULATION
|
|
16
|
-
end
|
|
17
|
-
|
|
18
13
|
def self.aliases
|
|
19
14
|
ALIASES['aliases']
|
|
20
15
|
end
|
|
@@ -164,19 +164,19 @@ languages:
|
|
|
164
164
|
'th':
|
|
165
165
|
abbreviation: 'th'
|
|
166
166
|
name: Thai
|
|
167
|
-
population:
|
|
167
|
+
population: 7_000_000
|
|
168
168
|
countries: 'Thailand'
|
|
169
169
|
greeting: 'วัสดี!'
|
|
170
170
|
'uk':
|
|
171
171
|
abbreviation: 'uk'
|
|
172
172
|
name: Ukranian
|
|
173
|
-
population:
|
|
173
|
+
population: 1_000_000
|
|
174
174
|
countries: 'Ukraine'
|
|
175
175
|
greeting: 'вітаю!'
|
|
176
176
|
'el':
|
|
177
177
|
abbreviation: 'el'
|
|
178
178
|
name: Greek
|
|
179
|
-
population:
|
|
179
|
+
population: 1_000_000
|
|
180
180
|
countries: 'Greece, Cyprus'
|
|
181
181
|
greeting: 'γειά!'
|
|
182
182
|
'cs':
|
|
@@ -188,7 +188,7 @@ languages:
|
|
|
188
188
|
'ro':
|
|
189
189
|
abbreviation: 'ro'
|
|
190
190
|
name: Romanian
|
|
191
|
-
population:
|
|
191
|
+
population: 1_000_000
|
|
192
192
|
countries: 'Romania, Serbia, Moldova'
|
|
193
193
|
greeting: 'salut!'
|
|
194
194
|
'km':
|
|
@@ -197,3 +197,9 @@ languages:
|
|
|
197
197
|
population: 100_000
|
|
198
198
|
countries: 'Cambodia'
|
|
199
199
|
greeting: 'chomreabsuor!'
|
|
200
|
+
'is':
|
|
201
|
+
abbreviation: 'is'
|
|
202
|
+
name: Icelandic
|
|
203
|
+
population: 50_000
|
|
204
|
+
countries: 'Iceland'
|
|
205
|
+
greeting: 'halló!'
|
|
@@ -11,16 +11,6 @@ describe AlohaAnalyzer::Language do
|
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
describe '.total' do
|
|
15
|
-
it 'returns the total number of language users' do
|
|
16
|
-
total = 0
|
|
17
|
-
described_class.all.each do |abbreviation, language|
|
|
18
|
-
total += language['population']
|
|
19
|
-
end
|
|
20
|
-
total.should eq described_class.total
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
14
|
describe '.find_by_abbreviation' do
|
|
25
15
|
subject(:language) { described_class.find_by_abbreviation(abbreviation) }
|
|
26
16
|
context 'when it exits' do
|