iso639 1.3.1 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/FUNDING.yml +9 -0
- data/.github/no-response.yml +13 -0
- data/.github/workflows/ci.yml +21 -0
- data/LICENSE.txt +1 -1
- data/README.md +6 -20
- data/iso639.gemspec +23 -15
- data/lib/iso639/insensitive_hash.rb +1 -1
- data/lib/iso639/version.rb +1 -1
- data/lib/iso639.rb +1 -1
- data/test/insensitive_hash_test.rb +2 -0
- data/test/iso639_test.rb +3 -2
- metadata +16 -11
- data/.travis.yml +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e488ef76243b248bc5c4899adafd8569e4dcd4fa315262cfb1341aa63e19b031
|
4
|
+
data.tar.gz: ebba0a06b0a0bd4ecc288a09d85a9c10a46c91aff3fa8fff3a3ce632de119ca7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93100582c3cec24a578237af39966f2de599e0ef05a1caf4e9b3227789d174a396cd3fd60d2444356078fb1c2079aae32064e164a621c4701413768b7aa3e61e
|
7
|
+
data.tar.gz: 181ad31c6eb663aec563966d57ce9cef94f39f05aa18666420c5fa6fc4e31e9d363e676490cf377c7c268c4397793bea2a336b431bbd312a2de03b004bc097f0
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# These are supported funding model platforms
|
2
|
+
|
3
|
+
github: [rmm5t]
|
4
|
+
# patreon: # Replace with a single Patreon username
|
5
|
+
# open_collective: # Replace with a single Open Collective username
|
6
|
+
# ko_fi: # Replace with a single Ko-fi username
|
7
|
+
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
8
|
+
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9
|
+
custom: "https://www.paypal.me/rmm5t/5"
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Configuration for probot-no-response - https://github.com/probot/no-response
|
2
|
+
|
3
|
+
# Number of days of inactivity before an Issue is closed for lack of response
|
4
|
+
daysUntilClose: 7
|
5
|
+
# Label requiring a response
|
6
|
+
responseRequiredLabel: more-information-needed
|
7
|
+
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
|
8
|
+
closeComment: >
|
9
|
+
This issue has been automatically closed because there has been no response
|
10
|
+
to our request for more information from the original author. With only the
|
11
|
+
information that is currently in the issue, we don't have enough information
|
12
|
+
to take action. Please reach out if you have or find the answers we need so
|
13
|
+
that we can investigate further.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push, pull_request]
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
test:
|
6
|
+
runs-on: ubuntu-latest
|
7
|
+
strategy:
|
8
|
+
matrix:
|
9
|
+
ruby: ["2.4", "2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3"]
|
10
|
+
|
11
|
+
steps:
|
12
|
+
# https://github.com/marketplace/actions/checkout
|
13
|
+
- uses: actions/checkout@v4
|
14
|
+
# https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
15
|
+
- name: Set up Ruby
|
16
|
+
uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: ${{ matrix.ruby }}
|
19
|
+
bundler-cache: true # runs `bundle install` and caches gems automatically
|
20
|
+
- name: Run tests
|
21
|
+
run: bundle exec rake
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# iso639
|
2
2
|
|
3
3
|
[![Gem Version](http://img.shields.io/gem/v/iso639.svg)](http://badge.fury.io/rb/iso639)
|
4
|
-
[![Build Status](https://
|
5
|
-
[![
|
4
|
+
[![Build Status](https://github.com/rmm5t/iso639/workflows/CI/badge.svg)](https://github.com/rmm5t/iso639/actions?query=workflow%3ACI)
|
5
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/33044338aa8c859fbadc/maintainability)](https://codeclimate.com/github/rmm5t/iso639/maintainability)
|
6
6
|
[![Gem Downloads](https://img.shields.io/gem/dt/iso639.svg)](https://rubygems.org/gems/iso639)
|
7
7
|
|
8
8
|
The iso639 gem provides convenience methods for looking up ISO-639-1 or
|
@@ -11,24 +11,6 @@ ISO-639-2 language codes by their english name, 2-char, or 3-char counterpart
|
|
11
11
|
All data was generated from the Library of Congress's list of UTF-8
|
12
12
|
[**Codes for the Representation of Names of Languages**](http://www.loc.gov/standards/iso639-2/ascii_8bits.html).
|
13
13
|
|
14
|
-
---
|
15
|
-
|
16
|
-
**How You Can Help**
|
17
|
-
|
18
|
-
[![Square Cash](http://img.shields.io/badge/square%20cash-$rmm5t-brightgreen.svg)][square]
|
19
|
-
[![PayPal](http://img.shields.io/badge/paypal-rmm5t-blue.svg)][paypal]
|
20
|
-
[![Book a Codementor session](http://img.shields.io/badge/codementor-book%20a%20session-orange.svg)][codementor]
|
21
|
-
|
22
|
-
If you like this project, [buy me a coffee][paypal], or [book a session with me][codementor], or donate bitcoin: `1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m`
|
23
|
-
|
24
|
-
[square]: https://cash.me/$rmm5t/5 "Donate to rmm5t for open source!"
|
25
|
-
[paypal]: https://www.paypal.me/rmm5t/5 "Donate to rmm5t for open source!"
|
26
|
-
[bitcoin]: bitcoin:1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m?amount=0.01&label=Coffee%20to%20rmm5t%20for%20Open%20Source "Buy rmm5t a coffee for open source!"
|
27
|
-
[codementor]: https://www.codementor.io/rmm5t?utm_campaign=profile&utm_source=button-rmm5t&utm_medium=shields "Book a session with rmm5t on Codementor!"
|
28
|
-
|
29
|
-
[![Twitter](https://img.shields.io/twitter/follow/rmm5t.svg?style=social)](https://twitter.com/rmm5t)
|
30
|
-
[![Stack Overflow](https://img.shields.io/stackexchange/stackoverflow/r/8985.svg?style=social)](http://stackoverflow.com/users/8985/ryan-mcgeary)
|
31
|
-
|
32
14
|
## Installation
|
33
15
|
|
34
16
|
Add this line to your application's Gemfile:
|
@@ -118,3 +100,7 @@ Iso639["GeRmAn"].name # => "German"
|
|
118
100
|
## Versioning
|
119
101
|
|
120
102
|
Semantic Versioning 2.0 as defined at <http://semver.org>.
|
103
|
+
|
104
|
+
## License
|
105
|
+
|
106
|
+
[MIT License](https://rmm5t.mit-license.org/)
|
data/iso639.gemspec
CHANGED
@@ -3,21 +3,29 @@ lib = File.expand_path('../lib', __FILE__)
|
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'iso639/version'
|
5
5
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
username = "rmm5t"
|
8
|
+
spec.name = "iso639"
|
9
|
+
spec.version = Iso639::VERSION
|
10
|
+
spec.authors = ["Ryan McGeary"]
|
11
|
+
spec.email = ["ryan@mcgeary.org"]
|
12
|
+
spec.description = %q{ISO 639-1 and ISO 639-2 lookups by name, alpha-2 code, or alpha-3 code}
|
13
|
+
spec.summary = spec.description
|
14
|
+
spec.homepage = "https://github.com/#{username}/#{spec.name}"
|
15
|
+
spec.license = "MIT"
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
spec.files = `git ls-files`.split($/)
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ["lib"]
|
20
21
|
|
21
|
-
|
22
|
-
|
22
|
+
spec.metadata = {
|
23
|
+
"bug_tracker_uri" => "#{spec.homepage}/issues",
|
24
|
+
"changelog_uri" => "#{spec.homepage}/releases",
|
25
|
+
"source_code_uri" => spec.homepage,
|
26
|
+
"funding_uri" => "https://github.com/sponsors/#{username}",
|
27
|
+
}
|
28
|
+
|
29
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
30
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
23
31
|
end
|
data/lib/iso639/version.rb
CHANGED
data/lib/iso639.rb
CHANGED
@@ -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
|
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
|
data/test/iso639_test.rb
CHANGED
@@ -86,6 +86,7 @@ describe Iso639 do
|
|
86
86
|
assert_equal "fr", Iso639["fra"].alpha2
|
87
87
|
assert_equal "fr", Iso639["French"].alpha2
|
88
88
|
assert_equal "fr", Iso639["français"].alpha2
|
89
|
+
assert_equal "krc", Iso639["Karachay-Balkar"].alpha3
|
89
90
|
end
|
90
91
|
|
91
92
|
it "should ignore case sensitivity" do
|
@@ -105,7 +106,7 @@ describe Iso639 do
|
|
105
106
|
it "should ignore regional designations" do
|
106
107
|
assert_equal "en", Iso639["en_US"].alpha2
|
107
108
|
assert_equal "en", Iso639["en_GB"].alpha2
|
108
|
-
assert_equal "fr", Iso639["
|
109
|
-
assert_equal "fr", Iso639["
|
109
|
+
assert_equal "fr", Iso639["fr-CA"].alpha2
|
110
|
+
assert_equal "fr", Iso639["fr-FR"].alpha2
|
110
111
|
end
|
111
112
|
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.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan McGeary
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
description: ISO 639-1 and ISO 639-2 lookups by name, alpha-2 code, or alpha-3 code
|
42
42
|
email:
|
43
43
|
- ryan@mcgeary.org
|
@@ -45,8 +45,10 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
+
- ".github/FUNDING.yml"
|
49
|
+
- ".github/no-response.yml"
|
50
|
+
- ".github/workflows/ci.yml"
|
48
51
|
- ".gitignore"
|
49
|
-
- ".travis.yml"
|
50
52
|
- CHANGELOG.md
|
51
53
|
- CONTRIBUTING.md
|
52
54
|
- Gemfile
|
@@ -66,8 +68,12 @@ files:
|
|
66
68
|
homepage: https://github.com/rmm5t/iso639
|
67
69
|
licenses:
|
68
70
|
- MIT
|
69
|
-
metadata:
|
70
|
-
|
71
|
+
metadata:
|
72
|
+
bug_tracker_uri: https://github.com/rmm5t/iso639/issues
|
73
|
+
changelog_uri: https://github.com/rmm5t/iso639/releases
|
74
|
+
source_code_uri: https://github.com/rmm5t/iso639
|
75
|
+
funding_uri: https://github.com/sponsors/rmm5t
|
76
|
+
post_install_message:
|
71
77
|
rdoc_options: []
|
72
78
|
require_paths:
|
73
79
|
- lib
|
@@ -82,9 +88,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
88
|
- !ruby/object:Gem::Version
|
83
89
|
version: '0'
|
84
90
|
requirements: []
|
85
|
-
|
86
|
-
|
87
|
-
signing_key:
|
91
|
+
rubygems_version: 3.5.23
|
92
|
+
signing_key:
|
88
93
|
specification_version: 4
|
89
94
|
summary: ISO 639-1 and ISO 639-2 lookups by name, alpha-2 code, or alpha-3 code
|
90
95
|
test_files:
|