Skip to content

Commit 9f9eb85

Browse files
committed
Use RbConfig for Emoji version detection; release v4.0.1
1 parent c39e8c5 commit 9f9eb85

File tree

4 files changed

+41
-38
lines changed

4 files changed

+41
-38
lines changed

CHANGELOG.md

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# CHANGELOG
22

3-
### 4.0.0
3+
## 4.0.1
4+
5+
- Directly use `RbConfig::CONFIG["UNICODE_EMOJI_VERSION"]` to detect Ruby's Emoji version,
6+
drop unicode-version dependency
7+
8+
## 4.0.0
49

510
- **Breaking change:** Regexes now include single skin tone modifiers (`🏻`) and hair components (`🦰`).
611
They were previously considered to be invalid partial Emoji, however since they are supposed to be
@@ -13,7 +18,7 @@
1318
- Add `REGEX_EMOJI_KEYCAP` for matching specifically Emoji keycaps
1419
- Use character class instead of lookbehind for native text emoji and non-emoji pictographic regexes
1520

16-
### 3.8.0
21+
## 3.8.0
1722

1823
- Add new RGI-based regexes `REGEX_INCLUDE_MQE` and `REGEX_INCLUDE_MQE_UQE` which allows to match
1924
for minimally-qualified and unqualified RGI sequences (Emoji that lack some VS16)
@@ -23,7 +28,7 @@
2328
- Update CLDR to v46 (valid subdivisions)
2429
- Further improvements (see commit log)
2530

26-
### 3.7.0
31+
## 3.7.0
2732

2833
- Bump required Ruby slightly to 2.5
2934
- Introduce new `REGEX_POSSIBLE` which contains the regex described in
@@ -36,101 +41,101 @@
3641
- Separately autoload emoji list, so it can be loaded when other indexes
3742
are not needed
3843

39-
### 3.6.0
44+
## 3.6.0
4045

4146
- `Unicode::Emoji::REGEX_TEXT` now matches non-emoji keycaps like "3⃣" (U+0033 U+20E3)
4247
- Minor refactorings
4348

44-
### 3.5.0
49+
## 3.5.0
4550

4651
- Emoji 16.0
4752

48-
### 3.4.0
53+
## 3.4.0
4954

5055
- Emoji 15.1
5156

52-
### 3.3.2
57+
## 3.3.2
5358

5459
- Update valid subdivisions to CLDR 43 (no changes)
5560
-> there won't be any new RGI subdivision flags in Emoji
5661

57-
### 3.3.1
62+
## 3.3.1
5863

5964
- Update valid subdivisions to CLDR 42 (no changes)
6065

61-
### 3.3.0
66+
## 3.3.0
6267

6368
- Emoji 15.0
6469

65-
### 3.2.0
70+
## 3.2.0
6671

6772
- Update valid subdivisions to CLDR 41
6873

69-
### 3.1.1
74+
## 3.1.1
7075

7176
- Fix `REGEX` to be able to match complete family emoji, instead of
7277
sub-matching partial families, thanks @matt17r
7378

74-
### 3.1.0
79+
## 3.1.0
7580

7681
- Update valid subdivisions to CLDR 40
7782

78-
### 3.0.0
83+
## 3.0.0
7984

8085
- Vastly improve memory usage, patch by @radarek
8186
- Emoji regexes are now pre-generated and bundled with the release
8287
- Regexes use character classes instead of unions when possible
8388
- Most constants (e.g. regexes) now get autoloaded
8489
- See https://github.com/janlelis/unicode-emoji/pull/9 for more details
8590

86-
### 2.9.0
91+
## 2.9.0
8792

8893
- Emoji 14.0
8994

90-
### 2.8.0
95+
## 2.8.0
9196

9297
- Update valid subdivisions to CLDR 39
9398

94-
### 2.7.1
99+
## 2.7.1
95100

96101
- Update valid subdivisions to CLDR 38.1
97102

98-
### 2.7.0
103+
## 2.7.0
99104

100105
- Update valid subdivisions to CLDR 38
101106
- Loosen Ruby dependency to allow Ruby 3.0
102107

103-
### 2.6.0
108+
## 2.6.0
104109

105110
- Emoji 13.1
106111

107-
### 2.5.0
112+
## 2.5.0
108113

109114
- Use native Emoji regex properties when current Ruby's Emoji support is the same as our current Emoji version
110115
- Update valid subdivisions to CLDR 37
111116

112-
### 2.4.0
117+
## 2.4.0
113118

114119
- Emoji 13.0
115120

116-
### 2.3.1
121+
## 2.3.1
117122

118123
- Fix index to actually include Emoji 12.1
119124

120-
### 2.3.0
125+
## 2.3.0
121126

122127
- Emoji 12.1
123128

124-
### 2.2.0
129+
## 2.2.0
125130

126131
- Update subdivisions to CLDR 36
127132

128-
### 2.1.0
133+
## 2.1.0
129134

130135
- Add `REGEX_PICTO` which matches codepoints with the **Extended_Pictographic** property
131136
- Add `REGEX_PICTO_NO_EMOJI` which matches codepoints with the **Extended_Pictographic** property, but no **Emoji** property
132137

133-
### 2.0.0
138+
## 2.0.0
134139

135140
- Emoji 12.0 data (including valid subdivisions)
136141
- Introduce new `REGEX_WELL_FORMED` to be able to match for invalid tag and region sequences
@@ -139,40 +144,40 @@
139144
- Issue warning when using `#list` method to retrieve outdated category
140145
- Change matching for ZWJ sequences: Do not limit sequence to a maximum of 3 ZWJs
141146

142-
### 1.1.0
147+
## 1.1.0
143148

144149
- Emoji 11.0
145150
- Do not depend on rubygems (only use zlib stdlib for unzipping)
146151

147-
### 1.0.3
152+
## 1.0.3
148153

149154
- Explicitly load rubygems/util, fixes regression in 1.2.1
150155

151-
### 1.0.2
156+
## 1.0.2
152157

153158
- Use `Gem::Util` for `gunzip`, removes deprecation warning
154159

155-
### 1.0.1
160+
## 1.0.1
156161

157162
- Actually set required Ruby version to 2.3 in gemspec
158163

159-
### 1.0.0
164+
## 1.0.0
160165

161166
- Drop support for Ruby below 2.3, use 0.9 if you need to
162167
- Internal refactorings, no API change
163168

164-
### 0.9.3
169+
## 0.9.3
165170

166171
- Implement native Emoji regex matchers, but do not activate or document, yet
167172

168-
### 0.9.2
173+
## 0.9.2
169174

170175
- REGEX_TEXT: Do not match if the text emoji is followed by a emoji modifier
171176

172-
### 0.9.1
177+
## 0.9.1
173178

174179
- Include a categorized list of recommended Emoji
175180

176-
### 0.9.0
181+
## 0.9.0
177182

178183
- Initial release (Emoji version 5.0)

lib/unicode/emoji.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module Emoji
3434
end
3535

3636
generated_constants_dirpath = File.expand_path(
37-
EMOJI_VERSION == Unicode::Version.emoji_version ? "emoji/generated_native/" : "emoji/generated/",
37+
EMOJI_VERSION == RbConfig::CONFIG["UNICODE_EMOJI_VERSION"] ? "emoji/generated_native/" : "emoji/generated/",
3838
__dir__
3939
)
4040

lib/unicode/emoji/constants.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module Unicode
44
module Emoji
5-
VERSION = "4.0.0"
5+
VERSION = "4.0.1"
66
EMOJI_VERSION = "16.0"
77
CLDR_VERSION = "46"
88
DATA_DIRECTORY = File.expand_path('../../../data', __dir__).freeze

unicode-emoji.gemspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@ Gem::Specification.new do |gem|
1919
gem.metadata = { "rubygems_mfa_required" => "true" }
2020

2121
gem.required_ruby_version = ">= 2.5", "< 4.0"
22-
23-
gem.add_dependency "unicode-version", "~> 1.0"
2422
end

0 commit comments

Comments
 (0)