human_languages 0.8.0 → 0.9.0

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
  SHA256:
3
- metadata.gz: 260491578de61743bf549fa59bd87f7052e33e3fdec8758d0ee1a48808cd1526
4
- data.tar.gz: 3e8cf139c9615f10d4d7fd782eea3125ce064670359340361b846f19487ac7a4
3
+ metadata.gz: bff47fe435ed7bd834eb62fea743188741b3b77c7c0847b60e9620e65ce1e49e
4
+ data.tar.gz: deb077773f5e00f446c1c5010298ffb6715769c12499ddc94e9591ef3a65a81b
5
5
  SHA512:
6
- metadata.gz: 6fa4d32b4f26609d5e855a66f0ed88a30741f9718c7676cb0091d24654d51526a36f197f793b4ee27d4a849584291d4e66a4a91974d50f4d643b5ad5247d7601
7
- data.tar.gz: 5d9127db926a09491619fa148603c01edb54666692566109b22e615b41cd0ff8ca5ecca4c96be91a30f6ad1b5a1f8887609f348a8a1fdf4545295a234dd90755
6
+ metadata.gz: '0994b809da4c6338d1d30075694de5765e16dc1ac9fe54b58ab4dc8d2bd353e31ff688f73b2f1c37b29cbe9b33daf00b30c0af21d64c78f34b010da701ca7463'
7
+ data.tar.gz: b1406a41f8f47242e7bb7ad86acb45d8959dd6dfc7f4752373931a628f37f81c25f07f6ac748e96f31cee7605d8c0b11d482ad801541340ad47ebb6075ede341
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,22 @@ 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
+
10
26
  ## [0.8.0] - 2024-02-05
11
27
 
12
28
  ### 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.21'
9
- gem 'rake', '~> 13.1'
10
- gem 'rubocop', '~> 1.60'
11
- gem 'rubocop-minitest', '~> 0.34.5'
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,55 +1,53 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- human_languages (0.8.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.7.1)
10
+ json (2.8.2)
11
11
  language_server-protocol (3.17.0.3)
12
- minitest (5.21.2)
13
- parallel (1.24.0)
14
- parser (3.3.0.5)
12
+ minitest (5.25.1)
13
+ parallel (1.26.3)
14
+ parser (3.3.6.0)
15
15
  ast (~> 2.4.1)
16
16
  racc
17
- racc (1.7.3)
17
+ racc (1.8.1)
18
18
  rainbow (3.1.1)
19
- rake (13.1.0)
20
- regexp_parser (2.9.0)
21
- rexml (3.2.6)
22
- rubocop (1.60.2)
19
+ rake (13.2.1)
20
+ regexp_parser (2.9.2)
21
+ rubocop (1.68.0)
23
22
  json (~> 2.3)
24
23
  language_server-protocol (>= 3.17.0)
25
24
  parallel (~> 1.10)
26
25
  parser (>= 3.3.0.2)
27
26
  rainbow (>= 2.2.2, < 4.0)
28
- regexp_parser (>= 1.8, < 3.0)
29
- rexml (>= 3.2.5, < 4.0)
30
- rubocop-ast (>= 1.30.0, < 2.0)
27
+ regexp_parser (>= 2.4, < 3.0)
28
+ rubocop-ast (>= 1.32.2, < 2.0)
31
29
  ruby-progressbar (~> 1.7)
32
30
  unicode-display_width (>= 2.4.0, < 3.0)
33
- rubocop-ast (1.30.0)
34
- parser (>= 3.2.1.0)
35
- rubocop-minitest (0.34.5)
36
- rubocop (>= 1.39, < 2.0)
37
- rubocop-ast (>= 1.30.0, < 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)
38
36
  rubocop-rake (0.6.0)
39
37
  rubocop (~> 1.0)
40
38
  ruby-progressbar (1.13.0)
41
- unicode-display_width (2.5.0)
39
+ unicode-display_width (2.6.0)
42
40
 
43
41
  PLATFORMS
44
42
  x86_64-linux
45
43
 
46
44
  DEPENDENCIES
47
45
  human_languages!
48
- minitest (~> 5.21)
49
- rake (~> 13.1)
50
- rubocop (~> 1.60)
51
- rubocop-minitest (~> 0.34.5)
46
+ minitest (~> 5.25)
47
+ rake (~> 13.2)
48
+ rubocop (~> 1.68)
49
+ rubocop-minitest (~> 0.36.0)
52
50
  rubocop-rake (~> 0.6.0)
53
51
 
54
52
  BUNDLED WITH
55
- 2.3.7
53
+ 2.5.6
data/README.adoc CHANGED
@@ -8,7 +8,7 @@ image:https://badge.fury.io/rb/human_languages.svg["Gem Version", link="https://
8
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