iso-639 0.3.1 → 0.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 +4 -4
- data/iso-639.gemspec +3 -3
- data/lib/iso-639.rb +9 -6
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e9e0a16487494797744a4726d9c4e69f0f993784f13d0d1074dd9c660159cfea
|
|
4
|
+
data.tar.gz: 5e5a653d777776d31e7f2ee3c4e9dd0875485ff8b4707eb0cdb1e2e4de3c22a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 218e941e0928c292c1590ec0c2734e7bf98204c25215877ac06b1d4e8f83a06d7d5adfd5c5fc6192cc1bdb0a06a1afd0568acabac5b57492de264fcbb31d61a8
|
|
7
|
+
data.tar.gz: 5628d6e2f5a66972bdc9a5a804d2e84edb4c7ed711fa6b6f2eef50802ccfb1e3a4978360d4436c43451b515b64fecd7fae93d555ae5f5a65edcef06070ae2b26
|
data/iso-639.gemspec
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = 'iso-639'
|
|
5
|
-
s.version = '0.3.
|
|
5
|
+
s.version = '0.3.2'
|
|
6
6
|
s.licenses = ['MIT']
|
|
7
|
-
s.summary = 'ISO 639-1 and ISO 639-2 language code entries and convenience methods'
|
|
8
|
-
s.description = 'ISO 639-1 and ISO 639-2 language code entries and convenience methods'
|
|
7
|
+
s.summary = 'ISO 639-1 and ISO 639-2 language code entries and convenience methods.'
|
|
8
|
+
s.description = 'ISO 639-1 and ISO 639-2 language code entries and convenience methods.'
|
|
9
9
|
s.authors = ['William Melody']
|
|
10
10
|
s.email = 'hi@williammelody.com'
|
|
11
11
|
s.date = '2020-03-02'
|
data/lib/iso-639.rb
CHANGED
|
@@ -16,13 +16,16 @@ class ISO_639 < Array
|
|
|
16
16
|
# https://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt
|
|
17
17
|
ISO_639_2 = lambda do
|
|
18
18
|
dataset = []
|
|
19
|
-
|
|
19
|
+
File.open(
|
|
20
20
|
File.join(File.dirname(__FILE__), 'data', 'ISO-639-2_utf-8.txt'),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
'r:bom|utf-8'
|
|
22
|
+
) do |file|
|
|
23
|
+
CSV.new(file, **{
|
|
24
|
+
col_sep: '|',
|
|
25
|
+
converters: ->(v) { v || '' }
|
|
26
|
+
}).each do |row|
|
|
27
|
+
dataset << self[*row].freeze
|
|
28
|
+
end
|
|
26
29
|
end
|
|
27
30
|
return dataset
|
|
28
31
|
end.call.freeze
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iso-639
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- William Melody
|
|
@@ -110,7 +110,7 @@ dependencies:
|
|
|
110
110
|
- - ">="
|
|
111
111
|
- !ruby/object:Gem::Version
|
|
112
112
|
version: '0'
|
|
113
|
-
description: ISO 639-1 and ISO 639-2 language code entries and convenience methods
|
|
113
|
+
description: ISO 639-1 and ISO 639-2 language code entries and convenience methods.
|
|
114
114
|
email: hi@williammelody.com
|
|
115
115
|
executables: []
|
|
116
116
|
extensions: []
|
|
@@ -151,5 +151,5 @@ requirements: []
|
|
|
151
151
|
rubygems_version: 3.1.2
|
|
152
152
|
signing_key:
|
|
153
153
|
specification_version: 4
|
|
154
|
-
summary: ISO 639-1 and ISO 639-2 language code entries and convenience methods
|
|
154
|
+
summary: ISO 639-1 and ISO 639-2 language code entries and convenience methods.
|
|
155
155
|
test_files: []
|