unicode-emoji 4.0.0 β†’ 4.0.3

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: 5cc77126aeb986e5645ebce97fc3e1be5835b9e5adb9764af980e0175d7d9284
4
- data.tar.gz: ffd47af7c556ee26951f6c5f30122ecd44520f1a3aa6856c526c4e4dec050e77
3
+ metadata.gz: 6380c3c0ad44728037efba8733373e0c2b923b959239544cb0efda1ac595815d
4
+ data.tar.gz: 9c45c4d5ba6134933472459e8223657f23aa779fb0e2d0bc68822da3a8b726e3
5
5
  SHA512:
6
- metadata.gz: 810730ae1a796edc6c80c87d0d4e7c0a5bfdbda45c43f57dfde3a05afee7ee5df8d43f378c5c0de34d9e9bca8e9edfaee67261d16057a0aacc79f50c39d703d2
7
- data.tar.gz: f300c259b7389d60130b9f910b1301f31bf60d47c32fd16f86935cdf63c740bb44c28ab8fd38bc643f35cd6b4d7e9a76583d3be156683404439069ccf58d8250
6
+ metadata.gz: d5ec122b5aad377bf3e4f17b11d9428a4eaaeaaa3245b2302cfed5befdb40a53e7b549c08e215c9eb43c445f5dd1cb69ac000343ecc7fc88473cb3a1475aa6e3
7
+ data.tar.gz: 36427662e0a3d911884d45d7d7d0ab3313449598deda482a22dd64c99c3720ef12a16aecb7f3f446913e591cea9517b7a312bcc8731a74f06ff99498a973d070
data/CHANGELOG.md CHANGED
@@ -1,6 +1,15 @@
1
1
  # CHANGELOG
2
2
 
3
- ### 4.0.0
3
+ ## 4.0.3
4
+
5
+ - Remove emoji-test.txt from Rubygems package
6
+
7
+ ## 4.0.2
8
+
9
+ - Directly use `RbConfig::CONFIG["UNICODE_EMOJI_VERSION"]` to detect Ruby's Emoji version,
10
+ drop unicode-version dependency
11
+
12
+ ## 4.0.0
4
13
 
5
14
  - **Breaking change:** Regexes now include single skin tone modifiers (`🏻`) and hair components (`🦰`).
6
15
  They were previously considered to be invalid partial Emoji, however since they are supposed to be
@@ -13,7 +22,7 @@
13
22
  - Add `REGEX_EMOJI_KEYCAP` for matching specifically Emoji keycaps
14
23
  - Use character class instead of lookbehind for native text emoji and non-emoji pictographic regexes
15
24
 
16
- ### 3.8.0
25
+ ## 3.8.0
17
26
 
18
27
  - Add new RGI-based regexes `REGEX_INCLUDE_MQE` and `REGEX_INCLUDE_MQE_UQE` which allows to match
19
28
  for minimally-qualified and unqualified RGI sequences (Emoji that lack some VS16)
@@ -23,7 +32,7 @@
23
32
  - Update CLDR to v46 (valid subdivisions)
24
33
  - Further improvements (see commit log)
25
34
 
26
- ### 3.7.0
35
+ ## 3.7.0
27
36
 
28
37
  - Bump required Ruby slightly to 2.5
29
38
  - Introduce new `REGEX_POSSIBLE` which contains the regex described in
@@ -36,46 +45,46 @@
36
45
  - Separately autoload emoji list, so it can be loaded when other indexes
37
46
  are not needed
38
47
 
39
- ### 3.6.0
48
+ ## 3.6.0
40
49
 
41
50
  - `Unicode::Emoji::REGEX_TEXT` now matches non-emoji keycaps like "3⃣" (U+0033 U+20E3)
42
51
  - Minor refactorings
43
52
 
44
- ### 3.5.0
53
+ ## 3.5.0
45
54
 
46
55
  - Emoji 16.0
47
56
 
48
- ### 3.4.0
57
+ ## 3.4.0
49
58
 
50
59
  - Emoji 15.1
51
60
 
52
- ### 3.3.2
61
+ ## 3.3.2
53
62
 
54
63
  - Update valid subdivisions to CLDR 43 (no changes)
55
64
  -> there won't be any new RGI subdivision flags in Emoji
56
65
 
57
- ### 3.3.1
66
+ ## 3.3.1
58
67
 
59
68
  - Update valid subdivisions to CLDR 42 (no changes)
60
69
 
61
- ### 3.3.0
70
+ ## 3.3.0
62
71
 
63
72
  - Emoji 15.0
64
73
 
65
- ### 3.2.0
74
+ ## 3.2.0
66
75
 
67
76
  - Update valid subdivisions to CLDR 41
68
77
 
69
- ### 3.1.1
78
+ ## 3.1.1
70
79
 
71
80
  - Fix `REGEX` to be able to match complete family emoji, instead of
72
81
  sub-matching partial families, thanks @matt17r
73
82
 
74
- ### 3.1.0
83
+ ## 3.1.0
75
84
 
76
85
  - Update valid subdivisions to CLDR 40
77
86
 
78
- ### 3.0.0
87
+ ## 3.0.0
79
88
 
80
89
  - Vastly improve memory usage, patch by @radarek
81
90
  - Emoji regexes are now pre-generated and bundled with the release
@@ -83,54 +92,54 @@
83
92
  - Most constants (e.g. regexes) now get autoloaded
84
93
  - See https://github.com/janlelis/unicode-emoji/pull/9 for more details
85
94
 
86
- ### 2.9.0
95
+ ## 2.9.0
87
96
 
88
97
  - Emoji 14.0
89
98
 
90
- ### 2.8.0
99
+ ## 2.8.0
91
100
 
92
101
  - Update valid subdivisions to CLDR 39
93
102
 
94
- ### 2.7.1
103
+ ## 2.7.1
95
104
 
96
105
  - Update valid subdivisions to CLDR 38.1
97
106
 
98
- ### 2.7.0
107
+ ## 2.7.0
99
108
 
100
109
  - Update valid subdivisions to CLDR 38
101
110
  - Loosen Ruby dependency to allow Ruby 3.0
102
111
 
103
- ### 2.6.0
112
+ ## 2.6.0
104
113
 
105
114
  - Emoji 13.1
106
115
 
107
- ### 2.5.0
116
+ ## 2.5.0
108
117
 
109
118
  - Use native Emoji regex properties when current Ruby's Emoji support is the same as our current Emoji version
110
119
  - Update valid subdivisions to CLDR 37
111
120
 
112
- ### 2.4.0
121
+ ## 2.4.0
113
122
 
114
123
  - Emoji 13.0
115
124
 
116
- ### 2.3.1
125
+ ## 2.3.1
117
126
 
118
127
  - Fix index to actually include Emoji 12.1
119
128
 
120
- ### 2.3.0
129
+ ## 2.3.0
121
130
 
122
131
  - Emoji 12.1
123
132
 
124
- ### 2.2.0
133
+ ## 2.2.0
125
134
 
126
135
  - Update subdivisions to CLDR 36
127
136
 
128
- ### 2.1.0
137
+ ## 2.1.0
129
138
 
130
139
  - Add `REGEX_PICTO` which matches codepoints with the **Extended_Pictographic** property
131
140
  - Add `REGEX_PICTO_NO_EMOJI` which matches codepoints with the **Extended_Pictographic** property, but no **Emoji** property
132
141
 
133
- ### 2.0.0
142
+ ## 2.0.0
134
143
 
135
144
  - Emoji 12.0 data (including valid subdivisions)
136
145
  - Introduce new `REGEX_WELL_FORMED` to be able to match for invalid tag and region sequences
@@ -139,40 +148,40 @@
139
148
  - Issue warning when using `#list` method to retrieve outdated category
140
149
  - Change matching for ZWJ sequences: Do not limit sequence to a maximum of 3 ZWJs
141
150
 
142
- ### 1.1.0
151
+ ## 1.1.0
143
152
 
144
153
  - Emoji 11.0
145
154
  - Do not depend on rubygems (only use zlib stdlib for unzipping)
146
155
 
147
- ### 1.0.3
156
+ ## 1.0.3
148
157
 
149
158
  - Explicitly load rubygems/util, fixes regression in 1.2.1
150
159
 
151
- ### 1.0.2
160
+ ## 1.0.2
152
161
 
153
162
  - Use `Gem::Util` for `gunzip`, removes deprecation warning
154
163
 
155
- ### 1.0.1
164
+ ## 1.0.1
156
165
 
157
166
  - Actually set required Ruby version to 2.3 in gemspec
158
167
 
159
- ### 1.0.0
168
+ ## 1.0.0
160
169
 
161
170
  - Drop support for Ruby below 2.3, use 0.9 if you need to
162
171
  - Internal refactorings, no API change
163
172
 
164
- ### 0.9.3
173
+ ## 0.9.3
165
174
 
166
175
  - Implement native Emoji regex matchers, but do not activate or document, yet
167
176
 
168
- ### 0.9.2
177
+ ## 0.9.2
169
178
 
170
179
  - REGEX_TEXT: Do not match if the text emoji is followed by a emoji modifier
171
180
 
172
- ### 0.9.1
181
+ ## 0.9.1
173
182
 
174
183
  - Include a categorized list of recommended Emoji
175
184
 
176
- ### 0.9.0
185
+ ## 0.9.0
177
186
 
178
187
  - Initial release (Emoji version 5.0)
data/Gemfile.lock CHANGED
@@ -1,8 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unicode-emoji (4.0.0)
5
- unicode-version (~> 1.0)
4
+ unicode-emoji (4.0.3)
6
5
 
7
6
  GEM
8
7
  remote: https://rubygems.org/
@@ -20,7 +19,6 @@ GEM
20
19
  reline (0.3.8)
21
20
  io-console (~> 0.5)
22
21
  stringio (3.0.8)
23
- unicode-version (1.4.0)
24
22
 
25
23
  PLATFORMS
26
24
  ruby
data/README.md CHANGED
@@ -37,7 +37,7 @@ string = "String which contains all types of Emoji sequences:
37
37
  - Sequence using ZWJ (zero width joiner): πŸ€ΎπŸ½β€β™€οΈ
38
38
  "
39
39
 
40
- string.scan(Unicode::Emoji::REGEX) # => ["😴", "▢️", "πŸ›ŒπŸ½", "πŸ‡΅πŸ‡Ή", "🏴󠁧󠁒󠁳󠁣󠁴󠁿", "2️⃣", "πŸ€ΎπŸ½β€β™€οΈ"]
40
+ string.scan(Unicode::Emoji::REGEX) # => ["😴", "▢️", "πŸ›ŒπŸ½", "πŸ‡΅πŸ‡Ή", "🏴󠁧󠁒󠁳󠁣󠁴󠁿", "2️⃣", "🏻", "πŸ€ΎπŸ½β€β™€οΈ"]
41
41
  ```
42
42
 
43
43
  Depending on your exact usecase, you can choose between multiple levels of Emoji detection:
@@ -79,7 +79,7 @@ Regex | Description | Example Matches | Example Non-Matc
79
79
  `Unicode::Emoji::REGEX_BASIC` | Matches (non-textual) Basic Emoji, but no sequences at all | `😴`, `▢️`, `🏻` | `😴︎`, `β–Ά`, `πŸ›ŒπŸ½`, `πŸ‡΅πŸ‡Ή`, `πŸ‡΅πŸ‡΅`,`2️⃣`, `🏴󠁧󠁒󠁳󠁣󠁴󠁿`, `🏴󠁧󠁒󠁑󠁧󠁒󠁿`, `πŸ€ΎπŸ½β€β™€οΈ`, `πŸ€ΎπŸ½β€β™€`, `πŸŒβ€β™‚οΈ`, `πŸ€ β€πŸ€’`, `1`
80
80
  `Unicode::Emoji::REGEX_TEXT` | Matches only textual singleton Emoji | `😴︎`, `β–Ά` | `😴`, `▢️`, `🏻`, `πŸ›ŒπŸ½`, `πŸ‡΅πŸ‡Ή`, `πŸ‡΅πŸ‡΅`,`2️⃣`, `🏴󠁧󠁒󠁳󠁣󠁴󠁿`, `🏴󠁧󠁒󠁑󠁧󠁒󠁿`, `πŸ€ΎπŸ½β€β™€οΈ`, `πŸ€ΎπŸ½β€β™€`, `πŸŒβ€β™‚οΈ`, `πŸ€ β€πŸ€’`, `1`
81
81
 
82
- Here is a list of all Emoji that can be matched using the two regexes: [character.construction/emoji-vs-text](https://character.construction/emoji-vs-text). The `REGEX_BASIC` regex also matches visual Emoji components (skin tone modifiers and hair components).
82
+ Here is a list of all Emoji that can be matched using the two regexes: [character.construction/emoji-vs-text](https://character.construction/emoji-vs-text). The `REGEX_BASIC` regex also matches [visual Emoji components](https://character.construction/emoji-components) (skin tone modifiers and hair components).
83
83
 
84
84
  While `REGEX_BASIC` is part of the above regexes, `REGEX_TEXT` is only included in the `*_INCLUDE_TEXT` or `*_UQE` variants.
85
85
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Unicode
4
4
  module Emoji
5
- VERSION = "4.0.0"
5
+ VERSION = "4.0.3"
6
6
  EMOJI_VERSION = "16.0"
7
7
  CLDR_VERSION = "46"
8
8
  DATA_DIRECTORY = File.expand_path('../../../data', __dir__).freeze
@@ -44,6 +44,6 @@ module Unicode
44
44
 
45
45
  # The current list of Emoji components that should have a visual representation
46
46
  # Currently skin tone modifiers + hair components
47
- VISUAL_COMPONENT = [*0x1F3FB..0x1F3FF, *0x1F9B0..0x1F9B3]
47
+ VISUAL_COMPONENT = [*0x1F3FB..0x1F3FF, *0x1F9B0..0x1F9B3].freeze
48
48
  end
49
49
  end
data/lib/unicode/emoji.rb CHANGED
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "unicode/version"
4
-
5
3
  require_relative "emoji/constants"
6
4
 
7
5
  module Unicode
@@ -34,7 +32,7 @@ module Unicode
34
32
  end
35
33
 
36
34
  generated_constants_dirpath = File.expand_path(
37
- EMOJI_VERSION == Unicode::Version.emoji_version ? "emoji/generated_native/" : "emoji/generated/",
35
+ EMOJI_VERSION == RbConfig::CONFIG["UNICODE_EMOJI_VERSION"] ? "emoji/generated_native/" : "emoji/generated/",
38
36
  __dir__
39
37
  )
40
38
 
@@ -12,13 +12,11 @@ Gem::Specification.new do |gem|
12
12
  gem.homepage = "https://github.com/janlelis/unicode-emoji"
13
13
  gem.license = "MIT"
14
14
 
15
- gem.files = Dir["{**/}{.*,*}"].select{ |path| File.file?(path) && path !~ /^pkg/ }
15
+ gem.files = Dir["{**/}{.*,*}"].select{ |path| File.file?(path) && path !~ /^pkg/ && path !~ /spec\/data\/[^.]/ }
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
  gem.metadata = { "rubygems_mfa_required" => "true" }
20
20
 
21
21
  gem.required_ruby_version = ">= 2.5", "< 4.0"
22
-
23
- gem.add_dependency "unicode-version", "~> 1.0"
24
22
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-emoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.3
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-06 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: unicode-version
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
11
+ date: 2024-11-13 00:00:00.000000000 Z
12
+ dependencies: []
27
13
  description: "[Emoji 16.0] Provides Unicode Emoji data and regexes, incorporating
28
14
  the latest Unicode and Emoji standards. Includes a categorized list of recommended
29
15
  Emoji."
@@ -88,7 +74,6 @@ files:
88
74
  - lib/unicode/emoji/lazy_constants.rb
89
75
  - lib/unicode/emoji/list.rb
90
76
  - spec/data/.keep
91
- - spec/data/emoji-test.txt
92
77
  - spec/emoji_test_txt_spec.rb
93
78
  - spec/unicode_emoji_spec.rb
94
79
  - unicode-emoji.gemspec
@@ -121,6 +106,5 @@ specification_version: 4
121
106
  summary: Emoji data and regex
122
107
  test_files:
123
108
  - spec/data/.keep
124
- - spec/data/emoji-test.txt
125
109
  - spec/emoji_test_txt_spec.rb
126
110
  - spec/unicode_emoji_spec.rb