countries 2.0.1 → 2.0.2

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: b45238625c4fcc7219ab3fb3382e48dba1a49f7d
4
- data.tar.gz: 613283ffa00bac59f788b19d50f76d928e218eb6
3
+ metadata.gz: 65b46cd7e548cdd07c86baa8e881c197946bfd03
4
+ data.tar.gz: d9c0c572a56a059a27cef0ab8524acae7694ebe2
5
5
  SHA512:
6
- metadata.gz: 2d7dcb8f846277f2ff3f3c1e2365e843490d8a9cca38b8d78426a9f753e8436ec1bc9a066bad45ca92ea81eb0fabeed94d79df93030b855b6b743624a58ce774
7
- data.tar.gz: 4c2d46cfc9a984ffbdb32c3eb0a61adac45f441c8ba087adab03ea5963df7f82bd72c1f5fe668ea605299a8921418faf6eee90a055119d13003cf1f86b8c57ad
6
+ metadata.gz: 557bf6a89c2f0f64e782abc188f683916aeef7f767a563c9bf5ca152d1d2b9634d286ef6ea976de2a5c2bab54e2d69f6f2ca9e6a3c6873d850968f34964a3009
7
+ data.tar.gz: fc9411fed5b049ba10455303580d8729745c3464ecdeabb8e6a933b304e84316b6c6a604149511f85b2eb4cdec98a363351be657b807fc7bfd63d8c55e0c1472
@@ -2,6 +2,11 @@
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
+ ## 2.0.1
6
+ - Content updates
7
+ - Fix bounding boxes that were mismatched.
8
+ - Update bounding box update task to prevent any lookup from return anything other than a country.
9
+
5
10
  ## 2.0.0
6
11
  - Remove find_country_by_translations
7
12
 
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.license = 'MIT'
18
18
 
19
19
  gem.add_dependency('i18n_data', '~> 0.7.0')
20
- gem.add_dependency('money', '~> 6.0')
20
+ gem.add_dependency('money', '~> 6.7')
21
21
  gem.add_dependency('unicode_utils', '~> 1.4')
22
22
  gem.add_development_dependency('rspec', '>= 3')
23
23
  gem.add_development_dependency('activesupport', '>= 3')
@@ -32,7 +32,15 @@ module ISO3166
32
32
  alias names unofficial_names
33
33
 
34
34
  def ==(other)
35
- other == data
35
+ other.alpha2 == alpha2
36
+ end
37
+
38
+ def eql?(other)
39
+ self == other
40
+ end
41
+
42
+ def hash
43
+ [alpha2, alpha3].hash
36
44
  end
37
45
 
38
46
  def <=>(other)
@@ -1,3 +1,3 @@
1
1
  module Countries
2
- VERSION = '2.0.1'.freeze
2
+ VERSION = '2.0.2'.freeze
3
3
  end
@@ -15,6 +15,20 @@ describe ISO3166::Country do
15
15
  expect(country.data).not_to be_nil
16
16
  end
17
17
 
18
+ it 'allows countries to be compared' do
19
+ c1 = ISO3166::Country.new('US')
20
+ c2 = ISO3166::Country.new('US')
21
+ c3 = ISO3166::Country.new('AU')
22
+ expect(c1).to eq(c2)
23
+ expect(c1.hash).to eq(c2.hash)
24
+ expect(c3.hash).to_not eq(c2.hash)
25
+
26
+ hsh = {}
27
+ hsh[c1] = 1
28
+ hsh[c2] = 2
29
+ expect(hsh.keys.count).to eq 1
30
+ end
31
+
18
32
  it 'should return 3166 number' do
19
33
  expect(country.number).to eq('840')
20
34
  end
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: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Robinson
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-11-16 00:00:00.000000000 Z
13
+ date: 2016-11-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: i18n_data
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: '6.0'
35
+ version: '6.7'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '6.0'
42
+ version: '6.7'
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: unicode_utils
45
45
  requirement: !ruby/object:Gem::Requirement