unicode-name 1.13.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 +23 -17
- data/Gemfile.lock +11 -11
- data/README.md +4 -2
- data/data/name.marshal.gz +0 -0
- data/lib/unicode/name/constants.rb +1 -1
- data/lib/unicode/name.rb +2 -2
- data/spec/unicode_name_spec.rb +4 -0
- metadata +4 -3
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,12 @@
|
|
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
|
+
|
3
10
|
### 1.13.0
|
4
11
|
|
5
12
|
- Unicode 16.0
|
@@ -22,59 +29,58 @@
|
|
22
29
|
|
23
30
|
### 1.8.0
|
24
31
|
|
25
|
-
|
32
|
+
- Unicode 12.1
|
26
33
|
|
27
34
|
### 1.7.1
|
28
35
|
|
29
|
-
|
36
|
+
- Push unicode-types dependency to 1.4.0
|
30
37
|
|
31
38
|
### 1.7.0
|
32
39
|
|
33
|
-
|
40
|
+
- Unicode 12
|
34
41
|
|
35
42
|
### 1.6.0
|
36
43
|
|
37
|
-
|
38
|
-
|
44
|
+
- Unicode 11
|
45
|
+
- Do not depend on rubygems (only use zlib stdlib for unzipping)
|
39
46
|
|
40
47
|
### 1.5.2
|
41
48
|
|
42
|
-
|
49
|
+
- Explicitly load rubygems/util, fixes regression in 1.5.1
|
43
50
|
|
44
51
|
### 1.5.1
|
45
52
|
|
46
|
-
|
53
|
+
- Use `Gem::Util` for `gunzip`, removes deprecation warning
|
47
54
|
|
48
55
|
### 1.5.0
|
49
56
|
|
50
|
-
|
57
|
+
- Unicode 10
|
51
58
|
|
52
59
|
### 1.4.2
|
53
60
|
|
54
|
-
|
61
|
+
- Fix that Unicode::Name.correct would not fail if codepoint has aliases but no correction
|
55
62
|
|
56
63
|
### 1.4.1
|
57
64
|
|
58
|
-
|
59
|
-
|
65
|
+
- Be compatible with Ruby 2.4's surrogate literals
|
66
|
+
- Bump unicode-types dependency
|
60
67
|
|
61
68
|
### 1.4.0
|
62
69
|
|
63
|
-
|
70
|
+
- Support Hangul syllables
|
64
71
|
|
65
72
|
### 1.3.0
|
66
73
|
|
67
|
-
|
74
|
+
- Support Unicode 9.0
|
68
75
|
|
69
76
|
### 1.2.0
|
70
77
|
|
71
|
-
|
78
|
+
- Support CJK Ideographs
|
72
79
|
|
73
80
|
### 1.1.0
|
74
81
|
|
75
|
-
|
82
|
+
- Support codepoint labels
|
76
83
|
|
77
84
|
### 1.0.0
|
78
85
|
|
79
|
-
|
80
|
-
|
86
|
+
- Initial release
|
data/Gemfile.lock
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
unicode-name (1.13.
|
4
|
+
unicode-name (1.13.1)
|
5
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.
|
22
|
+
stringio (3.1.1)
|
23
23
|
unicode-types (1.10.0)
|
24
24
|
|
25
25
|
PLATFORMS
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
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
|
|
@@ -6,7 +6,7 @@ Unicode version: **16.0.0** (September 2024)
|
|
6
6
|
|
7
7
|
Supported Rubies: **3.3**, **3.2**, **3.1**, **3.0**
|
8
8
|
|
9
|
-
Old Rubies that might still work: **2.
|
9
|
+
Old Rubies that might still work: **2.X**
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
@@ -46,6 +46,8 @@ See [unicode-sequence_names](https://github.com/janlelis/unicode-sequence_name)
|
|
46
46
|
|
47
47
|
See [unicode-x](https://github.com/janlelis/unicode-x) for more Unicode related micro libraries.
|
48
48
|
|
49
|
+
See [unicode-name.js](https://github.com/janlelis/unicode-name.js) for a JavaScript implementation of this gem.
|
50
|
+
|
49
51
|
## MIT License
|
50
52
|
|
51
53
|
- Copyright (C) 2016-2024 Jan Lelis <https://janlelis.com>. Released under the MIT license.
|
data/data/name.marshal.gz
CHANGED
Binary file
|
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
|
@@ -89,6 +92,7 @@ describe Unicode::Name do
|
|
89
92
|
describe ".readable" do
|
90
93
|
it "will return best readable representation of a codepoint" do
|
91
94
|
assert_equal "LATIN CAPITAL LETTER A", Unicode::Name.readable("A")
|
95
|
+
assert_equal "LATIN CAPITAL LETTER GHA", Unicode::Name.readable("Ƣ")
|
92
96
|
assert_equal "NULL", Unicode::Name.readable("\0")
|
93
97
|
assert_equal "<noncharacter-FFFFF>", Unicode::Name.readable("\u{FFFFF}")
|
94
98
|
assert_equal "<reserved-10C50>", Unicode::Name.readable("\u{10C50}")
|
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.13.
|
4
|
+
version: 1.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unicode-types
|
@@ -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
|
@@ -67,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
68
|
- !ruby/object:Gem::Version
|
68
69
|
version: '0'
|
69
70
|
requirements: []
|
70
|
-
rubygems_version: 3.5.
|
71
|
+
rubygems_version: 3.5.20
|
71
72
|
signing_key:
|
72
73
|
specification_version: 4
|
73
74
|
summary: Returns name/aliases/label of a Unicode codepoint
|