human_languages 0.7.0 → 0.9.0

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
  SHA256:
3
- metadata.gz: 20b8b867dd0dfd832d335d36654c4694f052f3ac27678126a52b8c5a642f84ca
4
- data.tar.gz: ec6824a865759f3996fa88b451e08df60f5b0dc5b3b7e7ac65da69b21aa999f6
3
+ metadata.gz: bff47fe435ed7bd834eb62fea743188741b3b77c7c0847b60e9620e65ce1e49e
4
+ data.tar.gz: deb077773f5e00f446c1c5010298ffb6715769c12499ddc94e9591ef3a65a81b
5
5
  SHA512:
6
- metadata.gz: 90e86425845dbc672d8b83f49f47c9d52daefe3cfe19f538297696e76c62e9e79636f7a29c83e7a2db50afdcc07b0af5802ee43114105c30924741bdaf1ea349
7
- data.tar.gz: 6a11b163c23981727ee4192663438a5734b15b1af953eeb00841a389a45bca7d3a4e4e858ef384f803b3fe6906ce15c6c2c11fd1f593f5286fb5b297f0b0455f
6
+ metadata.gz: '0994b809da4c6338d1d30075694de5765e16dc1ac9fe54b58ab4dc8d2bd353e31ff688f73b2f1c37b29cbe9b33daf00b30c0af21d64c78f34b010da701ca7463'
7
+ data.tar.gz: b1406a41f8f47242e7bb7ad86acb45d8959dd6dfc7f4752373931a628f37f81c25f07f6ac748e96f31cee7605d8c0b11d482ad801541340ad47ebb6075ede341
data/.reuse/dep5 CHANGED
@@ -4,7 +4,7 @@ Upstream-Contact: Benno Bielmeier <git@bbenno.com>
4
4
  Source: https://github.com/bbenno/languages
5
5
 
6
6
  Files: *
7
- Copyright: 2022 Benno Bielmeier <git@bbenno.com>
7
+ Copyright: 2022-2024 Benno Bielmeier <git@bbenno.com>
8
8
  License: MIT
9
9
 
10
10
  Files: data/*
data/.rubocop.yml CHANGED
@@ -4,7 +4,7 @@ require:
4
4
  - rubocop-rake
5
5
 
6
6
  AllCops:
7
- TargetRubyVersion: 2.7
7
+ TargetRubyVersion: 3.1
8
8
  NewCops: enable
9
9
 
10
10
  Naming/VariableNumber:
@@ -12,3 +12,7 @@ Naming/VariableNumber:
12
12
 
13
13
  Layout/LineLength:
14
14
  Max: 120
15
+
16
+ Metrics/ClassLength:
17
+ Exclude:
18
+ - 'test/test_*'
data/CHANGELOG.md CHANGED
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Changed
11
+
12
+ - Update ISO 639 data incorporating approved changes of [2023 series](https://iso639-3.sil.org/sites/iso639-3/files/reports/2023%20Summary%20of%20Outcomes.pdf), [2024 Quarter 2](https://iso639-3.sil.org/sites/iso639-3/files/reports/2024%20Quarter%202%20639%20MA%20newsletter.pdf), and [2024 Quater 3](https://iso639-3.sil.org/sites/iso639-3/files/reports/2024%20Quarter%203%20639%20MA%20newsletter.pdf)
13
+ - Interface of `Languages.search` changed. See <https://github.com/bbenno/languages/pull/123> for more details.
14
+ - Argument `case_sensitive` has been removed.
15
+ - Argument `pattern` can no longer be String. Its type has to be `Regexp`
16
+
17
+ ### Deprecated
18
+
19
+ - Deprecate `Languages.ancient` as this "type of individual languages" has been removed by the maintenance agency and (probably) merged with extinct type.
20
+
21
+ ### Removed
22
+
23
+ - Support for Ruby v2.7
24
+ - Support for Ruby v3.0
25
+
26
+ ## [0.8.0] - 2024-02-05
27
+
28
+ ### Added
29
+
30
+ - Support / Tests for Ruby 3.3 (thanks to [@sandbergja](https://github.com/sandbergja))
31
+
10
32
  ## [0.7.0] - 2023-03-08
11
33
 
12
34
  ### Added
data/Gemfile CHANGED
@@ -5,8 +5,8 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in languages.gemspec
6
6
  gemspec
7
7
 
8
- gem 'minitest', '~> 5.18'
9
- gem 'rake', '~> 13.0'
10
- gem 'rubocop', '~> 1.48'
11
- gem 'rubocop-minitest', '~> 0.29.0'
8
+ gem 'minitest', '~> 5.25'
9
+ gem 'rake', '~> 13.2'
10
+ gem 'rubocop', '~> 1.68'
11
+ gem 'rubocop-minitest', '~> 0.36.0'
12
12
  gem 'rubocop-rake', '~> 0.6.0'
data/Gemfile.lock CHANGED
@@ -1,50 +1,53 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- human_languages (0.7.0)
4
+ human_languages (0.9.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.2)
10
- json (2.6.3)
11
- minitest (5.18.0)
12
- parallel (1.22.1)
13
- parser (3.2.1.0)
10
+ json (2.8.2)
11
+ language_server-protocol (3.17.0.3)
12
+ minitest (5.25.1)
13
+ parallel (1.26.3)
14
+ parser (3.3.6.0)
14
15
  ast (~> 2.4.1)
16
+ racc
17
+ racc (1.8.1)
15
18
  rainbow (3.1.1)
16
- rake (13.0.6)
17
- regexp_parser (2.7.0)
18
- rexml (3.2.5)
19
- rubocop (1.48.0)
19
+ rake (13.2.1)
20
+ regexp_parser (2.9.2)
21
+ rubocop (1.68.0)
20
22
  json (~> 2.3)
23
+ language_server-protocol (>= 3.17.0)
21
24
  parallel (~> 1.10)
22
- parser (>= 3.2.0.0)
25
+ parser (>= 3.3.0.2)
23
26
  rainbow (>= 2.2.2, < 4.0)
24
- regexp_parser (>= 1.8, < 3.0)
25
- rexml (>= 3.2.5, < 4.0)
26
- rubocop-ast (>= 1.26.0, < 2.0)
27
+ regexp_parser (>= 2.4, < 3.0)
28
+ rubocop-ast (>= 1.32.2, < 2.0)
27
29
  ruby-progressbar (~> 1.7)
28
30
  unicode-display_width (>= 2.4.0, < 3.0)
29
- rubocop-ast (1.27.0)
30
- parser (>= 3.2.1.0)
31
- rubocop-minitest (0.29.0)
32
- rubocop (>= 1.39, < 2.0)
31
+ rubocop-ast (1.36.1)
32
+ parser (>= 3.3.1.0)
33
+ rubocop-minitest (0.36.0)
34
+ rubocop (>= 1.61, < 2.0)
35
+ rubocop-ast (>= 1.31.1, < 2.0)
33
36
  rubocop-rake (0.6.0)
34
37
  rubocop (~> 1.0)
35
38
  ruby-progressbar (1.13.0)
36
- unicode-display_width (2.4.2)
39
+ unicode-display_width (2.6.0)
37
40
 
38
41
  PLATFORMS
39
42
  x86_64-linux
40
43
 
41
44
  DEPENDENCIES
42
45
  human_languages!
43
- minitest (~> 5.18)
44
- rake (~> 13.0)
45
- rubocop (~> 1.48)
46
- rubocop-minitest (~> 0.29.0)
46
+ minitest (~> 5.25)
47
+ rake (~> 13.2)
48
+ rubocop (~> 1.68)
49
+ rubocop-minitest (~> 0.36.0)
47
50
  rubocop-rake (~> 0.6.0)
48
51
 
49
52
  BUNDLED WITH
50
- 2.3.7
53
+ 2.5.6
data/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2022-2024 Benno Bielmeier
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.adoc CHANGED
@@ -5,10 +5,10 @@ Benno Bielmeier
5
5
  image:https://api.reuse.software/badge/github.com/bbenno/languages[link="https://api.reuse.software/info/github.com/bbenno/languages", alt="REUSE status"]
6
6
  image:https://badge.fury.io/rb/human_languages.svg["Gem Version", link="https://badge.fury.io/rb/human_languages"]
7
7
 
8
- image:https://img.shields.io/maintenance/yes/2023[Maintenance]
8
+ image:https://img.shields.io/maintenance/yes/2024[Maintenance]
9
9
  image:https://github.com/bbenno/languages/actions/workflows/main.yml/badge.svg[link="https://github.com/bbenno/languages/actions/workflows/main.yml"]
10
10
 
11
- Simple, dependency-less gem providing all known human languagesfootnote:[This includes all individual languages already accounted for in ISO 639-2 as well as extinct, ancient, constructed, and historical languages.] defined in ISO 639-3
11
+ Simple, dependency-less gem providing all known human languagesfootnote:[This includes all individual languages already accounted for in ISO 639-2 as well as extinct, constructed, and historical languages.] defined in ISO 639-3
12
12
 
13
13
  The ISO code set in link:data/[data/] is taken from the official ISO 639-3 registration authority (ISO 639-3/RA) https://iso639-3.sil.org/[SIL International].
14
14
 
@@ -58,26 +58,24 @@ invalid = Languages[:invalid] # invalid or unknown names or ISO codes returns n
58
58
  [source]
59
59
  Languages.all
60
60
 
61
- .Get languages by name
61
+ .Get languages by name (regexp search)
62
62
  [source]
63
63
  ----
64
- Languages.search "^Germ"
64
+ Languages.search /Germ/i
65
65
  Languages.search /\AJapan/
66
66
  ----
67
67
 
68
68
  [CAUTION]
69
69
  --
70
- Passing a string to `Languages.search` results in case-sensitive search.
71
- If case-insensitive search is intended, use ignorecase regexp like `/search_pattern/i` or pass optional `case_sensitive` parameter.
72
- [source]
73
- Languages.search('search_pattern', case_sensitive: false)
70
+ Searching languages by name is only allowed via `Regexp` that has been prepared and validated (if it comes from a untrusted user) in terms of case sensitivity and security / timeout.
71
+ The support of passing search pattern of type String has been removed in v0.9.0.
72
+ See https://github.com/bbenno/languages/pull/123[#123] for more details.
74
73
  --
75
74
 
76
75
  .Since ISO 639-3 categorizes the languages by scope and type, one can filter by them
77
76
  [source]
78
77
  ----
79
78
  # By scope
80
- Languages.ancient
81
79
  Languages.constructed
82
80
  Languages.extinct
83
81
  Languages.historical
@@ -92,7 +90,7 @@ Languages.special_languages
92
90
 
93
91
  .Further custom language selections can be implemented using `Languages.all`
94
92
  [source]
95
- Languages.all.select { |l| %w[ancient historical].include?(l.type) }
93
+ Languages.all.select { |l| %w[extinct historical].include?(l.type) }
96
94
 
97
95
  === Data Objects
98
96