unicode-name 1.12.0 → 1.13.1
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/.rake_tasks +3 -0
- data/CHANGELOG.md +27 -17
- data/Gemfile.lock +13 -13
- data/MIT-LICENSE.txt +1 -1
- data/README.md +9 -4
- data/data/name.marshal.gz +0 -0
- data/lib/unicode/name/constants.rb +2 -2
- data/lib/unicode/name.rb +2 -2
- data/spec/unicode_name_spec.rb +5 -0
- data/unicode-name.gemspec +1 -1
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad37a86c74a53f8ed0fd5b7d99958e63f06537392c1156810405d8cf83e98082
|
4
|
+
data.tar.gz: ec21c556d90d33b7dbef6ac61cfca62805505f4a3afba068a5efc8f3d967b686
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a86c60936a59105991a4e769ecfa2ea6cff752ab85a4ad87ca800d2455d13cf2b276cfa20a4d281bc4b91eb4f9c7155293b4da8a454d544a992045b66b9006e
|
7
|
+
data.tar.gz: 8e2ad3afb63a2dda11dee3b2a5b3e7ea24e275e3744fbfe14615b8cca698ae14b2d9784cf6180e4d4136eb058fe1ae4b1a1fddd1ff34fc220ac059a0639586fb
|
data/.rake_tasks
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
## CHANGELOG
|
2
2
|
|
3
|
+
### 1.13.1
|
4
|
+
|
5
|
+
Bugfix release:
|
6
|
+
|
7
|
+
- Fix medial vowels not generated correctly for Hangul syllables #1
|
8
|
+
- Unicode::Name.readable now also applies correction if one exists
|
9
|
+
|
10
|
+
### 1.13.0
|
11
|
+
|
12
|
+
- Unicode 16.0
|
13
|
+
|
3
14
|
### 1.12.0
|
4
15
|
|
5
16
|
- Unicode 15.1
|
@@ -18,59 +29,58 @@
|
|
18
29
|
|
19
30
|
### 1.8.0
|
20
31
|
|
21
|
-
|
32
|
+
- Unicode 12.1
|
22
33
|
|
23
34
|
### 1.7.1
|
24
35
|
|
25
|
-
|
36
|
+
- Push unicode-types dependency to 1.4.0
|
26
37
|
|
27
38
|
### 1.7.0
|
28
39
|
|
29
|
-
|
40
|
+
- Unicode 12
|
30
41
|
|
31
42
|
### 1.6.0
|
32
43
|
|
33
|
-
|
34
|
-
|
44
|
+
- Unicode 11
|
45
|
+
- Do not depend on rubygems (only use zlib stdlib for unzipping)
|
35
46
|
|
36
47
|
### 1.5.2
|
37
48
|
|
38
|
-
|
49
|
+
- Explicitly load rubygems/util, fixes regression in 1.5.1
|
39
50
|
|
40
51
|
### 1.5.1
|
41
52
|
|
42
|
-
|
53
|
+
- Use `Gem::Util` for `gunzip`, removes deprecation warning
|
43
54
|
|
44
55
|
### 1.5.0
|
45
56
|
|
46
|
-
|
57
|
+
- Unicode 10
|
47
58
|
|
48
59
|
### 1.4.2
|
49
60
|
|
50
|
-
|
61
|
+
- Fix that Unicode::Name.correct would not fail if codepoint has aliases but no correction
|
51
62
|
|
52
63
|
### 1.4.1
|
53
64
|
|
54
|
-
|
55
|
-
|
65
|
+
- Be compatible with Ruby 2.4's surrogate literals
|
66
|
+
- Bump unicode-types dependency
|
56
67
|
|
57
68
|
### 1.4.0
|
58
69
|
|
59
|
-
|
70
|
+
- Support Hangul syllables
|
60
71
|
|
61
72
|
### 1.3.0
|
62
73
|
|
63
|
-
|
74
|
+
- Support Unicode 9.0
|
64
75
|
|
65
76
|
### 1.2.0
|
66
77
|
|
67
|
-
|
78
|
+
- Support CJK Ideographs
|
68
79
|
|
69
80
|
### 1.1.0
|
70
81
|
|
71
|
-
|
82
|
+
- Support codepoint labels
|
72
83
|
|
73
84
|
### 1.0.0
|
74
85
|
|
75
|
-
|
76
|
-
|
86
|
+
- Initial release
|
data/Gemfile.lock
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
unicode-name (1.
|
5
|
-
unicode-types (~> 1.
|
4
|
+
unicode-name (1.13.1)
|
5
|
+
unicode-types (~> 1.10)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
io-console (0.
|
11
|
-
irb (1.
|
12
|
-
rdoc
|
13
|
-
reline (>= 0.
|
14
|
-
minitest (5.
|
15
|
-
psych (5.1.
|
10
|
+
io-console (0.7.2)
|
11
|
+
irb (1.14.1)
|
12
|
+
rdoc (>= 4.0.0)
|
13
|
+
reline (>= 0.4.2)
|
14
|
+
minitest (5.25.1)
|
15
|
+
psych (5.1.2)
|
16
16
|
stringio
|
17
|
-
rake (13.
|
18
|
-
rdoc (6.
|
17
|
+
rake (13.2.1)
|
18
|
+
rdoc (6.7.0)
|
19
19
|
psych (>= 4.0.0)
|
20
|
-
reline (0.
|
20
|
+
reline (0.5.10)
|
21
21
|
io-console (~> 0.5)
|
22
|
-
stringio (3.
|
23
|
-
unicode-types (1.
|
22
|
+
stringio (3.1.1)
|
23
|
+
unicode-types (1.10.0)
|
24
24
|
|
25
25
|
PLATFORMS
|
26
26
|
ruby
|
data/MIT-LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# Unicode::Name [![[version]](https://badge.fury.io/rb/unicode-name.svg)](https://badge.fury.io/rb/unicode-name)
|
1
|
+
# Unicode::Name [![[version]](https://badge.fury.io/rb/unicode-name.svg)](https://badge.fury.io/rb/unicode-name) [![[ci]](https://github.com/janlelis/unicode-name/workflows/Test/badge.svg)](https://github.com/janlelis/unicode-name/actions?query=workflow%3ATest)
|
2
2
|
|
3
3
|
Return Unicode codepoint names, aliases, and labels.
|
4
4
|
|
5
|
-
Unicode version: **
|
5
|
+
Unicode version: **16.0.0** (September 2024)
|
6
6
|
|
7
|
-
Supported Rubies: **3.2**, **3.1**, **3.0**
|
7
|
+
Supported Rubies: **3.3**, **3.2**, **3.1**, **3.0**
|
8
8
|
|
9
9
|
Old Rubies that might still work: **2.X**
|
10
10
|
|
@@ -19,6 +19,9 @@ Unicode::Name.of "🚡" # => "AERIAL TRAMWAY"
|
|
19
19
|
Unicode::Name.of "丁" # => "CJK UNIFIED IDEOGRAPH-4E01"
|
20
20
|
Unicode::Name.of "한" # => "HANGUL SYLLABLE HAN"
|
21
21
|
|
22
|
+
# Unicode 16 (2024) example
|
23
|
+
Unicode::Name.of "" # => "SQUARE SPIRAL FROM TOP LEFT"
|
24
|
+
|
22
25
|
# Aliases, by type
|
23
26
|
Unicode::Name.aliases "\t" # => {:control=>["CHARACTER TABULATION", "HORIZONTAL TABULATION"],
|
24
27
|
:abbreviation=>["HT", "TAB"]}
|
@@ -43,7 +46,9 @@ See [unicode-sequence_names](https://github.com/janlelis/unicode-sequence_name)
|
|
43
46
|
|
44
47
|
See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related micro libraries.
|
45
48
|
|
49
|
+
See [unicode-name.js](https://github.com/janlelis/unicode-name.js) for a JavaScript implementation of this gem.
|
50
|
+
|
46
51
|
## MIT License
|
47
52
|
|
48
|
-
- Copyright (C) 2016-
|
53
|
+
- Copyright (C) 2016-2024 Jan Lelis <https://janlelis.com>. Released under the MIT license.
|
49
54
|
- Unicode data: https://www.unicode.org/copyright.html#Exhibit1
|
data/data/name.marshal.gz
CHANGED
Binary file
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
module Unicode
|
4
4
|
module Name
|
5
|
-
VERSION = "1.
|
6
|
-
UNICODE_VERSION = "
|
5
|
+
VERSION = "1.13.1"
|
6
|
+
UNICODE_VERSION = "16.0.0"
|
7
7
|
DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + "/../../../data/").freeze
|
8
8
|
INDEX_FILENAME = (DATA_DIRECTORY + "/name.marshal.gz").freeze
|
9
9
|
end
|
data/lib/unicode/name.rb
CHANGED
@@ -63,7 +63,7 @@ module Unicode
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def self.readable(char)
|
66
|
-
|
66
|
+
correct(char) ||
|
67
67
|
( as = aliases(char) ) &&
|
68
68
|
( as[:control] && as[:control][0] ||
|
69
69
|
as[:figment] && as[:figment][0] ||
|
@@ -78,7 +78,7 @@ module Unicode
|
|
78
78
|
def self.hangul_decomposition(codepoint)
|
79
79
|
base = codepoint - HANGUL_START
|
80
80
|
final = base % HANGUL_FINAL_MAX
|
81
|
-
medial = (base
|
81
|
+
medial = (base % HANGUL_MEDIAL_MAX) / HANGUL_FINAL_MAX
|
82
82
|
initial = base / HANGUL_MEDIAL_MAX
|
83
83
|
"#{INDEX[:JAMO][:INITIAL][initial]}#{INDEX[:JAMO][:MEDIAL][medial]}#{INDEX[:JAMO][:FINAL][final]}"
|
84
84
|
end
|
data/spec/unicode_name_spec.rb
CHANGED
@@ -16,6 +16,9 @@ describe Unicode::Name do
|
|
16
16
|
it "works for Hangul Syllables" do
|
17
17
|
assert_equal "HANGUL SYLLABLE HAN", Unicode::Name.of("한")
|
18
18
|
assert_equal "HANGUL SYLLABLE GAG", Unicode::Name.of("각")
|
19
|
+
assert_equal "HANGUL SYLLABLE GAE", Unicode::Name.of("개")
|
20
|
+
assert_equal "HANGUL SYLLABLE GAENG", Unicode::Name.of("갱")
|
21
|
+
assert_equal "HANGUL SYLLABLE DWALB", Unicode::Name.of("돫")
|
19
22
|
end
|
20
23
|
|
21
24
|
it "will return nil for characters without name" do
|
@@ -24,6 +27,7 @@ describe Unicode::Name do
|
|
24
27
|
end
|
25
28
|
|
26
29
|
it "works with recent Unicode characters" do
|
30
|
+
assert_equal "SQUARE SPIRAL FROM TOP LEFT", Unicode::Name.of("") # Unicode 16.0
|
27
31
|
assert_equal "ALCHEMICAL SYMBOL FOR QUICK LIME", Unicode::Name.of("🝁") # Unicode 15.1
|
28
32
|
assert_equal "KAKTOVIK NUMERAL ZERO", Unicode::Name.of("𝋀") # Unicode 15.0
|
29
33
|
assert_equal "ETHIOPIC SYLLABLE HHYAA", Unicode::Name.of("𞟣") # Unicode 14.0
|
@@ -88,6 +92,7 @@ describe Unicode::Name do
|
|
88
92
|
describe ".readable" do
|
89
93
|
it "will return best readable representation of a codepoint" do
|
90
94
|
assert_equal "LATIN CAPITAL LETTER A", Unicode::Name.readable("A")
|
95
|
+
assert_equal "LATIN CAPITAL LETTER GHA", Unicode::Name.readable("Ƣ")
|
91
96
|
assert_equal "NULL", Unicode::Name.readable("\0")
|
92
97
|
assert_equal "<noncharacter-FFFFF>", Unicode::Name.readable("\u{FFFFF}")
|
93
98
|
assert_equal "<reserved-10C50>", Unicode::Name.readable("\u{10C50}")
|
data/unicode-name.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicode-name
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unicode-types
|
@@ -16,15 +16,15 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.10'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
27
|
-
description: "[Unicode
|
26
|
+
version: '1.10'
|
27
|
+
description: "[Unicode 16.0.0] Returns the name, aliases, or label of a Unicode code
|
28
28
|
point"
|
29
29
|
email:
|
30
30
|
- hi@ruby.consulting
|
@@ -33,6 +33,7 @@ extensions: []
|
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
35
|
- ".gitignore"
|
36
|
+
- ".rake_tasks"
|
36
37
|
- CHANGELOG.md
|
37
38
|
- CODE_OF_CONDUCT.md
|
38
39
|
- Gemfile
|
@@ -52,7 +53,7 @@ licenses:
|
|
52
53
|
- MIT
|
53
54
|
metadata:
|
54
55
|
rubygems_mfa_required: 'true'
|
55
|
-
post_install_message:
|
56
|
+
post_install_message:
|
56
57
|
rdoc_options: []
|
57
58
|
require_paths:
|
58
59
|
- lib
|
@@ -67,8 +68,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
68
|
- !ruby/object:Gem::Version
|
68
69
|
version: '0'
|
69
70
|
requirements: []
|
70
|
-
rubygems_version: 3.
|
71
|
-
signing_key:
|
71
|
+
rubygems_version: 3.5.20
|
72
|
+
signing_key:
|
72
73
|
specification_version: 4
|
73
74
|
summary: Returns name/aliases/label of a Unicode codepoint
|
74
75
|
test_files:
|