unicode-sequence_name 1.13.0 → 1.14.1

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: aafb17b3d62ba18cd902df787bc9d114a193b7efc1f36faa847c5aea97949c28
4
- data.tar.gz: a27797d3a9f9268a0353fc55bf9d6509a13fdfa57cde40f378d0f9d78b70f4fe
3
+ metadata.gz: 4503c1bf10b43d732a5ee88c9a9059837f2190910f10a0c33fdfda6dd516b68f
4
+ data.tar.gz: 6d821ef47679dc9be1aef97a9a489051127b54f160e2fd7609a9cded3ee5decf
5
5
  SHA512:
6
- metadata.gz: e20286349ee5a8d0647ccd6a4bfe29ba355217f95edb146dcde4db7b2f3df86ed08f9f9cd93e3f521564305567adaee45f71acd3122bfc17652501a8d5d9745f
7
- data.tar.gz: a7b58d30bc6967d833481d5caa93eaba02ab0f8587f1017e4f9d952d4904d746cac129eb0fe0339fb1ac70f11b536aef8a2d40bbe1217bf3d7a9ac009a6b7c29
6
+ metadata.gz: e5e8ff63ca2e1e97a604fdf4bc4f8067afb8eba9d7e163a6ddd0eb6e13b6b565a19cc67b2f43b70566d3e5903dc429a6b8fbfb2379a938d201bd1482dccb41c9
7
+ data.tar.gz: b8728edb403073493e7d135016981ffdd2d046f1369a696fb23e0e4ec36075035aee38a19f4e03545b8d9174490e7e45235283ab4491af5fe654e8c035c4fb67
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 1.14.1
4
+
5
+ - Fix bug that some singleton Emoji would be included in index
6
+
7
+ ### 1.14.0
8
+
9
+ - Unicode 16.0
10
+ - Emoji 16.0
11
+
3
12
  ### 1.13.0
4
13
 
5
14
  - Unicode 15.1
data/Gemfile.lock CHANGED
@@ -1,24 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unicode-sequence_name (1.13.0)
4
+ unicode-sequence_name (1.14.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- io-console (0.6.0)
10
- irb (1.8.1)
11
- rdoc
12
- reline (>= 0.3.8)
13
- minitest (5.20.0)
14
- psych (5.1.0)
9
+ io-console (0.7.2)
10
+ irb (1.14.1)
11
+ rdoc (>= 4.0.0)
12
+ reline (>= 0.4.2)
13
+ minitest (5.25.1)
14
+ psych (5.1.2)
15
15
  stringio
16
- rake (13.0.6)
17
- rdoc (6.5.0)
16
+ rake (13.2.1)
17
+ rdoc (6.7.0)
18
18
  psych (>= 4.0.0)
19
- reline (0.3.8)
19
+ reline (0.5.10)
20
20
  io-console (~> 0.5)
21
- stringio (3.0.8)
21
+ stringio (3.1.1)
22
22
 
23
23
  PLATFORMS
24
24
  ruby
data/MIT-LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2023 Jan Lelis, https://janlelis.com
1
+ Copyright (c) 2017-2024 Jan Lelis, https://janlelis.com
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Returns the name of a Unicode codepoint sequence (= more than one codepoint involved), if one exists.
4
4
 
5
- Unicode version: **15.1.0** (September 2023)
5
+ Unicode version: **16.0.0** (September 2024)
6
6
 
7
- Emoji version: **15.0** (September 2022)
7
+ Emoji version: **16.0** (September 2024)
8
8
 
9
9
  IVD version: **2022-09-13** (September 2022)
10
10
 
11
- Supported Rubies: **3.2**, **3.1**, **3.0**
11
+ Supported Rubies: **3.3**, **3.2**, **3.1**, **3.0**
12
12
 
13
- Old Rubies which might still work: **2.X**
13
+ Old Rubies which might still work: **2.7**, **2.6**, **2.5**, **2.4**, **2.3**, **2.X**
14
14
 
15
15
  ## Usage
16
16
 
@@ -29,16 +29,22 @@ Unicode::SequenceName.of "❤️‍🔥" # => "HEART ON FIRE"
29
29
  Unicode::SequenceName.of "🫱🏻‍🫲🏾" # => "HANDSHAKE: LIGHT SKIN TONE, MEDIUM-DARK SKIN TONE"
30
30
  Unicode::SequenceName.of "🐦‍⬛" # => "BLACK BIRD"
31
31
  Unicode::SequenceName.of "🙂‍↔️" # => "HEAD SHAKING HORIZONTALLY"
32
+ Unicode::SequenceName.of "‘︁" # => "LEFT SINGLE QUOTATION MARK (right-justified fullwidth form)"
32
33
  ```
33
34
 
34
- Names for singular codepoints are not included, you can use [unicode-name](https://github.com/janlelis/unicode-name) for that purpose.
35
+ Names for singular codepoints are not included, you can use [unicode-name](https://github.com/janlelis/unicode-name) for that purpose. This is how you could use both libraries together to get the most relevant name of a character:
36
+
37
+ ```ruby
38
+ name = Unicode::Name.sequence_name(char) || Unicode::Name.readable(char)
39
+ ```
35
40
 
36
41
  ## Also See
37
42
 
38
43
  - [uniscribe](https://github.com/janlelis/uniscribe) - cli utility that makes use of unicode_sequence-name
39
44
  - [unicode-x](https://github.com/janlelis/unicode-x) - more Unicode related micro libraries
45
+ - [unicode-name.js](https://github.com/janlelis/unicode-name.js) - JavaScript implementation of name and sequence_name
40
46
 
41
47
  ## MIT License
42
48
 
43
- - Copyright (C) 2017-2023 Jan Lelis <https://janlelis.com>. Released under the MIT license.
49
+ - Copyright (C) 2017-2024 Jan Lelis <https://janlelis.com>. Released under the MIT license.
44
50
  - Unicode data: https://www.unicode.org/copyright.html#Exhibit1
Binary file
@@ -2,9 +2,9 @@
2
2
 
3
3
  module Unicode
4
4
  module SequenceName
5
- VERSION = "1.13.0"
6
- UNICODE_VERSION = "15.1.0"
7
- EMOJI_VERSION = "15.1"
5
+ VERSION = "1.14.1"
6
+ UNICODE_VERSION = "16.0.0"
7
+ EMOJI_VERSION = "16.0"
8
8
  IVD_VERSION = "2022-09-13"
9
9
  DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + "/../../../data/").freeze
10
10
  INDEX_FILENAME = (DATA_DIRECTORY + "/sequence_name.marshal.gz").freeze
@@ -5,7 +5,7 @@ module Unicode
5
5
  def self.sequence_name(string)
6
6
  codepoints = get_codepoint_values(string)
7
7
  require_relative "sequence_name/index" unless defined? ::Unicode::SequenceName::INDEX
8
- if res = INDEX[codepoints]
8
+ if res = INDEX[:SEQUENCES][codepoints]
9
9
  res
10
10
  else
11
11
  nil
@@ -16,12 +16,17 @@ describe Unicode::SequenceName do
16
16
  assert_equal "HANDSHAKE: LIGHT SKIN TONE, MEDIUM-DARK SKIN TONE", Unicode::SequenceName.of("🫱🏻‍🫲🏾") # Emoji 14.0
17
17
  assert_equal "BLACK BIRD", Unicode::SequenceName.of("🐦‍⬛") # Emoji 15.0
18
18
  assert_equal "HEAD SHAKING HORIZONTALLY", Unicode::SequenceName.of("🙂‍↔️") # Emoji 15.1
19
+ assert_equal "LEFT SINGLE QUOTATION MARK (right-justified fullwidth form)", Unicode::SequenceName.of("‘︁") # Unicode 16.0
19
20
  end
20
21
 
21
22
  it "will return nil for characters without name" do
22
23
  assert_nil Unicode::SequenceName.of("\u{10c50}")
23
24
  assert_nil Unicode::SequenceName.of("bla")
24
25
  end
26
+
27
+ it "will return nil for single codepoints" do
28
+ assert_nil Unicode::SequenceName.of("⏳")
29
+ end
25
30
  end
26
31
  end
27
32
 
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-sequence_name
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.14.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: 2023-10-01 00:00:00.000000000 Z
11
+ date: 2024-10-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: "[Unicode 15.1.0][Emoji 15.1] Returns the name of a Unicode code point
13
+ description: "[Unicode 16.0.0][Emoji 16.0] Returns the name of a Unicode code point
14
14
  sequence, if one exists"
15
15
  email:
16
16
  - hi@ruby.consulting
@@ -38,7 +38,7 @@ licenses:
38
38
  - MIT
39
39
  metadata:
40
40
  rubygems_mfa_required: 'true'
41
- post_install_message:
41
+ post_install_message:
42
42
  rdoc_options: []
43
43
  require_paths:
44
44
  - lib
@@ -53,8 +53,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  requirements: []
56
- rubygems_version: 3.4.4
57
- signing_key:
56
+ rubygems_version: 3.5.20
57
+ signing_key:
58
58
  specification_version: 4
59
59
  summary: Returns the name of a Unicode codepoint sequence, if one exists
60
60
  test_files: