countries 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c048e05e4efe0890e505d09de732844e10f3aaaa
4
- data.tar.gz: f1adc80bb8958ee8c0a1cfe8d8fa5d676ce6a2a2
3
+ metadata.gz: 68db55f4a800a6550927a8ff53be5b2aafe17c46
4
+ data.tar.gz: 76dae2ad449277ed7372b741e1f584bb3f23665b
5
5
  SHA512:
6
- metadata.gz: 03306490f4690264bfe9d71d0da5ba696c130a993632dd236a4c9c183f1a789c90d1c29f07a4e4a8c58a012b2fe19af410e7213fdf7856bb13fbc8bac672d265
7
- data.tar.gz: 49499ab717e7335fc9c3b1fc34ad0c351e037c386c650f1eb838e83876243248df6d02d1e6cad0db93726cd6f1848610193d16ae0e9e18252e5b4c1ae1ebc200
6
+ metadata.gz: 4e2185942067efbe4b726e79e6af655c253f0af86c33cebef5c7e5976cb7b7eb039e2b19d0f3971d53e6e545052addfeaff4ad0e73932e7dac795bfa19c03354
7
+ data.tar.gz: 7d6fa78fe31b17e5b0a6b7cf9e8c45da32f5cfec6fb20329fe1aee50afa90cf83f3e7771cca78fce347c4456e742901dc18038ffe11f3ada7b3a36a954f1c62e
@@ -2,6 +2,12 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
+ ## 1.1.0
6
+ - Adding compare operation to country @guilleart
7
+ - Content Updates @rposbone
8
+ - Correct NL to NO for un_locode @ohenrik
9
+ - Fix spelling of Sjælland @boatrite
10
+ - Add alternate spelling of Macao/Macau @nityaoberoi
5
11
 
6
12
  ## 1.0.0
7
13
  - Switch to Marshalling for cache storage @rposborne
@@ -65,6 +65,10 @@ class ISO3166::Country
65
65
  other == data
66
66
  end
67
67
 
68
+ def <=>(other)
69
+ self.to_s <=> other.to_s
70
+ end
71
+
68
72
  def currency
69
73
  ISO4217::Currency.from_code(@data['currency'])
70
74
  end
@@ -1,3 +1,3 @@
1
1
  module Countries
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -13,6 +13,7 @@ MO:
13
13
  name: Macao
14
14
  names:
15
15
  - Macao
16
+ - Macau
16
17
  - "マカオ"
17
18
  national_destination_code_lengths:
18
19
  - 2
@@ -32,7 +32,7 @@
32
32
  region: Europe
33
33
  subregion: Northern Europe
34
34
  world_region: EMEA
35
- un_locode: NL
35
+ un_locode: NO
36
36
  languages:
37
37
  - 'nb'
38
38
  - 'nn'
@@ -178,7 +178,7 @@
178
178
  '85':
179
179
  name: Zeeland
180
180
  names:
181
- - Sjælland
181
+ - Sjælland
182
182
  latitude: 55.4632518
183
183
  longitude: 11.7214979
184
184
  min_latitude: 54.962158
@@ -857,8 +857,8 @@
857
857
  max_latitude: 49.241504
858
858
  max_longitude: 2.5949791
859
859
  NC:
860
- name: Nouvelle-Calédonie (see also separate entry under NC)
861
- names: Nouvelle-Calédonie (see also separate entry under NC)
860
+ name: Nouvelle-Calédonie
861
+ names: Nouvelle-Calédonie
862
862
  latitude: 35.7595731
863
863
  longitude: -79.01929969999999
864
864
  min_latitude: 33.8409689
@@ -866,17 +866,17 @@ NC:
866
866
  max_latitude: 36.5881568
867
867
  max_longitude: -75.4599515
868
868
  PF:
869
- name: Polynésie française (see also separate entry under PF)
870
- names: Polynésie française (see also separate entry under PF)
869
+ name: Polynésie française
870
+ names: Polynésie française
871
871
  PM:
872
- name: Saint-Pierre-et-Miquelon (see also separate entry under PM)
873
- names: Saint-Pierre-et-Miquelon (see also separate entry under PM)
872
+ name: Saint-Pierre-et-Miquelon
873
+ names: Saint-Pierre-et-Miquelon
874
874
  TF:
875
- name: Terres Australes Françaises (see also separate entry under TF)
876
- names: Terres Australes Françaises (see also separate entry under TF)
875
+ name: Terres Australes Françaises
876
+ names: Terres Australes Françaises
877
877
  WF:
878
- name: Wallis et Futuna (see also separate entry under WF)
879
- names: Wallis et Futuna (see also separate entry under WF)
878
+ name: Wallis et Futuna
879
+ names: Wallis et Futuna
880
880
  YT:
881
- name: Mayotte (see also separate entry under YT)
882
- names: Mayotte (see also separate entry under YT)
881
+ name: Mayotte
882
+ names: Mayotte
@@ -177,8 +177,17 @@ describe ISO3166::Country do
177
177
  end
178
178
  end
179
179
 
180
+ describe 'compare' do
181
+ it 'should compare itself with other countries by its name' do
182
+ canada = ISO3166::Country.search('CA')
183
+ mexico = ISO3166::Country.search('MX')
184
+ expect(mexico <=> canada).to eq(1)
185
+ expect(canada <=> mexico).to eq(-1)
186
+ end
187
+ end
188
+
180
189
  describe 'all' do
181
- it 'should return an arry list of all countries' do
190
+ it 'should return an array list of all countries' do
182
191
  countries = ISO3166::Country.all
183
192
  expect(countries).to be_an(Array)
184
193
  expect(countries.first).to be_an(ISO3166::Country)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: countries
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Robinson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-25 00:00:00.000000000 Z
12
+ date: 2015-09-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n_data
@@ -580,7 +580,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
580
580
  version: '0'
581
581
  requirements: []
582
582
  rubyforge_project:
583
- rubygems_version: 2.4.7
583
+ rubygems_version: 2.4.5.1
584
584
  signing_key:
585
585
  specification_version: 4
586
586
  summary: Gives you a country object full of all sorts of useful information.