aloha_analyzer 0.4.19 → 0.5.0

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: 4e45bc39b201b4256ab68f4966342ea2d03f7383
4
- data.tar.gz: 2d83661f13c323f13672b2e39640d3b0ab14fea0
3
+ metadata.gz: f4c74a63037fce24ea889b4185030c1cd3ece280
4
+ data.tar.gz: 4db0d4547339a4898399303322c7980b10baeed3
5
5
  SHA512:
6
- metadata.gz: 5303789fd316c2916df633b0e3e2d1a01442bc74e95520b6087f068961b701ed5dd910976e1b3dc9a7ed0fddd39c00aa2f125cad3f41084428c4bc41e71da9c7
7
- data.tar.gz: 1b55ec2b4a5cfa42f89f2ab5349b6668435930d18627bf1703f7470d996e498d6a47051cb75dd27a40a05b06cf46dfc665e8370a13aa0ea6379643c8f4fd6754
6
+ metadata.gz: 30650c84010fa4b79027ae6e4535dbea4395761163f1df4b2e3d57745c0197540046b177fc9a89698d441d6e144dd9e8cd8dfa8e53808ff0116126b308b7e927
7
+ data.tar.gz: 2a9eeb5487597f6e49a48e9e25e79eb878c127d77b488295f388ad040d37953b6dd8d4ec709b38fe6a4bfc024377a67ab6302d3fe07f1d73b5cd90a03210602d
@@ -18,7 +18,7 @@ module AlohaAnalyzer
18
18
  if LANGUAGES['languages'][abbreviation]
19
19
  LANGUAGES['languages'][abbreviation]
20
20
  else
21
- raise "Could not find language abbreviation '#{abbreviation}'"
21
+ LANGUAGES['languages']['other']
22
22
  end
23
23
  end
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module AlohaAnalyzer
2
- VERSION = '0.4.19'
2
+ VERSION = '0.5.0'
3
3
  end
@@ -245,3 +245,9 @@ languages:
245
245
  population: 50_000
246
246
  countries: 'Macedonia, Albania, Romania, Serbia'
247
247
  greeting: 'Здраво!'
248
+ 'other':
249
+ abbreviation: 'other'
250
+ name: 'Other'
251
+ population: 0
252
+ countries: ''
253
+ greeting: ''
@@ -32,7 +32,7 @@ describe AlohaAnalyzer::Language do
32
32
  subject['abbreviation'].should eq 'fr'
33
33
  end
34
34
 
35
- it 'includes the languages coutnries' do
35
+ it 'includes the languages countries' do
36
36
  subject['countries'].should eq 'France, Canada, Belgium, Switzerland'
37
37
  end
38
38
  end
@@ -40,8 +40,25 @@ describe AlohaAnalyzer::Language do
40
40
  context 'when it does not exist' do
41
41
  let(:abbreviation) { 'esperanto' }
42
42
 
43
- it 'raises an exception' do
44
- expect { subject }.to raise_error
43
+ it 'returns a hash' do
44
+ subject.should be_a Hash
45
+ end
46
+
47
+ it 'has no population' do
48
+ subject['population'].should be_a Fixnum
49
+ subject['population'].should eq 0
50
+ end
51
+
52
+ it 'other as a name' do
53
+ subject['name'].should eq 'Other'
54
+ end
55
+
56
+ it 'includes the other abbreviation' do
57
+ subject['abbreviation'].should eq 'other'
58
+ end
59
+
60
+ it 'includes no countries' do
61
+ subject['countries'].should eq ''
45
62
  end
46
63
  end
47
64
  end
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.4.19
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Aussaguel