countries 0.11.1 → 0.11.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: 45878b513dae23f9323aacc0f5d944318f651d7a
4
- data.tar.gz: 751199c83193c88f423f3ad9d84f3c4eea0bf823
3
+ metadata.gz: dad0e80a88969b36a318dc47f2f6fba60c8ef754
4
+ data.tar.gz: 584a899bd8d68ee524c16339ffda79728f5dbe74
5
5
  SHA512:
6
- metadata.gz: 3b60badd35233bfda47eaa6140d4d80b907f2d5cbee3e83dae463f2efe804bfdcd36b3791b46ce6e4296a28853869fe5108907d9ce1da19585719eb18d668d04
7
- data.tar.gz: 15d1ac5854243ddf7bcebb0f38b56ea66d752b6705686edf004b258ca2c80a6b693633ac79e997182359999bc48d1539472d048601f3ce7b1db5f3533c1b85f8
6
+ metadata.gz: 91cbd91bbb769c7bcdf50bc6f16b087cf977d75cecc81ae1ed08a2f57210c809f1755e38bf5b5ecf2c648fd0b9c89a5ef9b153c6262dc2e254ffa5258aba7808
7
+ data.tar.gz: 6401225c1f0d3b10b6a0a1493bcd37bb7ed66e3368d280d1cd3bcb4fb4d11861e85af8b05fe8a47a93b8f15cfc7ee11e0062ec77665d96cc505ad6731205ac69
data/CHANGELOG.md CHANGED
@@ -2,9 +2,14 @@
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
- ## Unreleased
6
- - added bounding box coordinates for VI, CW, PR, AS, and GU : @marinom
5
+ ## 0.11.2
6
+ - silence ruby warnings @franckverrot
7
+ - add find_country_by_translated_name @rposborne NOTE: this is garbage for the
8
+ time being, some translations have duplicates in them and causes false results
7
9
 
10
+ ## 0.11.1
11
+ - added bounding box coordinates for VI, CW, PR, AS, and GU : @marinom
12
+ - revert Lookup country by translated name via find_by_name @rposborne
8
13
 
9
14
  ## [0.11.0] - 2015-03-03
10
15
  ### Changed
data/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'rspec/core/rake_task'
6
6
 
7
7
  desc 'Run all examples'
8
8
  RSpec::Core::RakeTask.new(:spec) do |t|
9
- t.rspec_opts = %w(--color)
9
+ t.rspec_opts = %w(--color --warnings)
10
10
  end
11
11
 
12
12
  task default: [:spec]
@@ -14,7 +14,6 @@ class ISO3166::Country
14
14
  :number,
15
15
  :alpha2,
16
16
  :alpha3,
17
- :currency,
18
17
  :name,
19
18
  :names,
20
19
  :latitude,
@@ -30,12 +29,12 @@ class ISO3166::Country
30
29
  :national_prefix,
31
30
  :address_format,
32
31
  :translations,
32
+ :translated_names,
33
33
  :ioc,
34
34
  :gec,
35
35
  :un_locode,
36
36
  :languages,
37
37
  :nationality,
38
- :address_format,
39
38
  :dissolved_on,
40
39
  :eu_member,
41
40
  :alt_currency,
@@ -114,7 +113,7 @@ class ISO3166::Country
114
113
 
115
114
  def all(&blk)
116
115
  blk ||= proc { |country, data| [data['name'], country] }
117
- Data.map &blk
116
+ Data.map(&blk)
118
117
  end
119
118
 
120
119
  alias_method :countries, :all
@@ -157,7 +156,7 @@ class ISO3166::Country
157
156
  protected
158
157
 
159
158
  def parse_attributes(attribute, val)
160
- fail "Invalid attribute name '#{attribute}'" unless AttrReaders.include?(attribute.to_sym)
159
+ fail "Invalid attribute name '#{attribute}'" unless instance_methods.include?(attribute.to_sym)
161
160
 
162
161
  attributes = Array(attribute.to_s)
163
162
  if attributes == ['name']
@@ -1,3 +1,3 @@
1
1
  module Countries
2
- VERSION = '0.11.1'
2
+ VERSION = '0.11.2'
3
3
  end
data/spec/country_spec.rb CHANGED
@@ -429,7 +429,7 @@ describe ISO3166::Country do
429
429
  end
430
430
 
431
431
  context 'when search translation found' do
432
- let(:uk) { ISO3166::Country.find_country_by_name('Velika Britanija') }
432
+ let(:uk) { ISO3166::Country.find_country_by_translated_names('Velika Britanija') }
433
433
 
434
434
  it 'should be a country instance' do
435
435
  expect(uk).to be_a(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: 0.11.1
4
+ version: 0.11.2
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-03-16 00:00:00.000000000 Z
12
+ date: 2015-03-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n_data
@@ -560,7 +560,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
560
560
  version: '0'
561
561
  requirements: []
562
562
  rubyforge_project:
563
- rubygems_version: 2.4.6
563
+ rubygems_version: 2.4.5
564
564
  signing_key:
565
565
  specification_version: 4
566
566
  summary: Gives you a country object full of all sorts of useful information.
@@ -568,3 +568,4 @@ test_files:
568
568
  - spec/country_spec.rb
569
569
  - spec/mongoid_spec.rb
570
570
  - spec/spec_helper.rb
571
+ has_rdoc: