iso639 1.3.1 → 1.3.2

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: e6c0d3ba3653783f434a993129179069a9682645
4
- data.tar.gz: 9011077aebff118c5fd15c5bd89764da4ad2ab47
3
+ metadata.gz: 79c6956cb1fc30e1fbe6f7e308d5e4dad6594d74
4
+ data.tar.gz: b4769d29896ebde606f19e1f476eba137b4dadc2
5
5
  SHA512:
6
- metadata.gz: a9d3a876bce34b1fc2ebe6c408833c5238c26289ebb80f193ea9dedcbb2e180abd5fa48645dfca922903afb3688ad731f8f525b2fe580899a2c2896d04f99e21
7
- data.tar.gz: 663e2a7bd7372739ad673c19c21f5622e2c7d9e5c2e09ef0eff67f52503c32fbbfd0a9e872a88fbfc4b909412a29a08a37aa24f97580b383a69572a8f0c8f4bc
6
+ metadata.gz: a22991fffc0e18664b4aa36bbaaa5759165d6e160bce89a6ad5c5ba872bfb567930cbc052230ab95dca593c3cae7c77d026b1e54b4a69422838713e6fe1226d2
7
+ data.tar.gz: 352ba2898d06e77ff7f16398e8a7fd937eae6ef48833fe82855c1412026e25cbdb69c4b84eccd4063b52c8a945ec6f35b6d1f24cf39b31eb6d5786c46117e4e6
@@ -2,7 +2,6 @@ language: ruby
2
2
  cache: bundler
3
3
  sudo: false
4
4
  rvm:
5
- - 2.1
6
- - 2.2
7
- - 2.3.0
8
- - jruby-19mode
5
+ - 2.2.6
6
+ - 2.3.3
7
+ - 2.4.0
@@ -37,7 +37,7 @@ module Iso639
37
37
 
38
38
  iso639_file = File.expand_path(File.join("..", "iso639", "ISO-639-2_utf-8.txt"), __FILE__)
39
39
  File.readlines(iso639_file, encoding: "utf-8").each do |line|
40
- lang = Language.new *line.split("|")
40
+ lang = Language.new(*line.split("|"))
41
41
  LanguagesByAlpha2[lang.alpha2] = lang if lang.alpha2
42
42
  LanguagesByAlpha3[lang.alpha3] = lang if lang.alpha3
43
43
  LanguagesByAlpha3Terminology[lang.alpha3_terminology] = lang if lang.alpha3_terminology
@@ -11,7 +11,7 @@ module Iso639
11
11
  private
12
12
 
13
13
  def normalize(key)
14
- key.to_s.downcase.strip.split("_").first
14
+ key.to_s.downcase.strip.split(/[-_]/).first
15
15
  end
16
16
  end
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module Iso639
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
@@ -30,5 +30,7 @@ describe Iso639::InsensitiveHash do
30
30
 
31
31
  assert_equal "english", hash["en_US"]
32
32
  assert_equal "french", hash["fr_FR"]
33
+ assert_equal "english", hash["en-US"]
34
+ assert_equal "french", hash["fr-FR"]
33
35
  end
34
36
  end
@@ -105,7 +105,7 @@ describe Iso639 do
105
105
  it "should ignore regional designations" do
106
106
  assert_equal "en", Iso639["en_US"].alpha2
107
107
  assert_equal "en", Iso639["en_GB"].alpha2
108
- assert_equal "fr", Iso639["fr_CA"].alpha2
109
- assert_equal "fr", Iso639["fr_FR"].alpha2
108
+ assert_equal "fr", Iso639["fr-CA"].alpha2
109
+ assert_equal "fr", Iso639["fr-FR"].alpha2
110
110
  end
111
111
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iso639
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan McGeary
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-22 00:00:00.000000000 Z
11
+ date: 2017-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  version: '0'
84
84
  requirements: []
85
85
  rubyforge_project:
86
- rubygems_version: 2.5.2
86
+ rubygems_version: 2.6.8
87
87
  signing_key:
88
88
  specification_version: 4
89
89
  summary: ISO 639-1 and ISO 639-2 lookups by name, alpha-2 code, or alpha-3 code