unicode-emoji 4.0.2 → 4.0.4

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: d94f58ea61375a083bf39d43197503aa257981effa0be11f4ad1224a427f62e9
4
- data.tar.gz: 59b4eee9136d1b7360234491a0edbfc61000ad951cbcb5d9d4e41b410a59e9cd
3
+ metadata.gz: 3b08d6adaddfcbca3e754c9a52a0c0d5c772da86ca708affc9799ad113c5a005
4
+ data.tar.gz: e9f3817a215ef38b7933d69b4f0563d848a03f6a6b8728ecd06a74417fb5f8a7
5
5
  SHA512:
6
- metadata.gz: e8ab356aa91cd24e7085cdd40251eeec64a78f22792c1698a08100fd6716e0ef3be1f41bb7ef6641527cf79680d22502b6601676a8eaca49f0c8fbe4ec057326
7
- data.tar.gz: 3cef152d23b2fca1db09c16129a62694bd9311d38cd825247a6017f3f3a45018e123b0a821b1fc86450031ceca5bd8447ec7c8ef7f5517cbf026780724584128
6
+ metadata.gz: cedad0ceb5f1039be614bbca170cccc3f29e8f05bd7fc74714ed586ddf20edb5da25a6c8fd840acfb7dfbeb918ec6e2218cf427e5e510eb2406235253e32ad74
7
+ data.tar.gz: 4680b526737abd7491351ff87c5d323f3a6acf5996dffa4c2f4737e10bc8083da16928dbab34362b6014ae5a17863266eb456ab2d382f25350339eaf71a175bf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 4.0.4
4
+
5
+ - Add `REGEX_TEXT_PRESENTATION` to be able to match for raw default-text Emoji codepoints
6
+
7
+ ## 4.0.3
8
+
9
+ - Remove emoji-test.txt from Rubygems package
10
+
3
11
  ## 4.0.2
4
12
 
5
13
  - Directly use `RbConfig::CONFIG["UNICODE_EMOJI_VERSION"]` to detect Ruby's Emoji version,
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unicode-emoji (4.0.2)
4
+ unicode-emoji (4.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -153,6 +153,7 @@ Gem Regex (`Unicode::Emoji`'s Emoji support level) | Native Regex (Ruby's Emoji
153
153
  `Unicode::Emoji::REGEX_PROP_MODIFIER_BASE` | `/\p{EBase}/`
154
154
  `Unicode::Emoji::REGEX_PROP_COMPONENT` | `/\p{EComp}/`
155
155
  `Unicode::Emoji::REGEX_PROP_PRESENTATION` | `/\p{EPres}/`
156
+ `Unicode::Emoji::REGEX_TEXT_PRESENTATION` | `/[\p{Emoji}&&\P{EPres}]/`
156
157
 
157
158
  #### Extended Pictographic Regex
158
159
 
@@ -300,6 +300,7 @@ def compile(emoji_character:, emoji_modifier:, emoji_modifier_base:, emoji_compo
300
300
 
301
301
  # Matches only basic single, textual emoji, ignores components like modifiers or simple digits
302
302
  regexes[:REGEX_TEXT] = Regexp.compile(text_emoji)
303
+ regexes[:REGEX_TEXT_PRESENTATION] = Regexp.compile(text_presentation)
303
304
 
304
305
  # Export regexes for Emoji properties so they can be used with newer Unicode than Ruby's
305
306
  regexes[:REGEX_PROP_EMOJI] = Regexp.compile(emoji_character)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Unicode
4
4
  module Emoji
5
- VERSION = "4.0.2"
5
+ VERSION = "4.0.4"
6
6
  EMOJI_VERSION = "16.0"
7
7
  CLDR_VERSION = "46"
8
8
  DATA_DIRECTORY = File.expand_path('../../../data', __dir__).freeze
@@ -0,0 +1,8 @@
1
+ # This file was generated by a script, please do not edit it by hand.
2
+ # See `$ rake generate_constants` and data/generate_constants.rb for more info.
3
+
4
+ module Unicode
5
+ module Emoji
6
+ REGEX_TEXT_PRESENTATION = /[\#\*0-9©®‼⁉™ℹ↔-↙↩↪⌨⏏⏭-⏯⏱⏲⏸-⏺Ⓜ▪▫▶◀◻◼☀-☄☎☑☘☝☠☢☣☦☪☮☯☸-☺♀♂♟♠♣♥♦♨♻♾⚒⚔-⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛰⛱⛴⛷-⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅-⬇〰〽㊗㊙🅰🅱🅾🅿🈂🈷🌡🌤-🌬🌶🍽🎖🎗🎙-🎛🎞🎟🏋-🏎🏔-🏟🏳🏵🏷🐿👁📽🕉🕊🕯🕰🕳-🕹🖇🖊-🖍🖐🖥🖨🖱🖲🖼🗂-🗄🗑-🗓🗜-🗞🗡🗣🗨🗯🗳🗺🛋🛍-🛏🛠-🛥🛩🛰🛳]/
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # This file was generated by a script, please do not edit it by hand.
2
+ # See `$ rake generate_constants` and data/generate_constants.rb for more info.
3
+
4
+ module Unicode
5
+ module Emoji
6
+ REGEX_TEXT_PRESENTATION = /[\p{Emoji}&&\P{EPres}]/
7
+ end
8
+ end
data/lib/unicode/emoji.rb CHANGED
@@ -48,6 +48,7 @@ module Unicode
48
48
  REGEX_POSSIBLE
49
49
  REGEX_BASIC
50
50
  REGEX_TEXT
51
+ REGEX_TEXT_PRESENTATION
51
52
  REGEX_PROP_EMOJI
52
53
  REGEX_PROP_MODIFIER
53
54
  REGEX_PROP_MODIFIER_BASE
@@ -12,7 +12,7 @@ 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"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-emoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.4
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-13 00:00:00.000000000 Z
11
+ date: 2024-11-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: "[Emoji 16.0] Provides Unicode Emoji data and regexes, incorporating
14
14
  the latest Unicode and Emoji standards. Includes a categorized list of recommended
@@ -47,6 +47,7 @@ files:
47
47
  - lib/unicode/emoji/generated/regex_prop_modifier_base.rb
48
48
  - lib/unicode/emoji/generated/regex_prop_presentation.rb
49
49
  - lib/unicode/emoji/generated/regex_text.rb
50
+ - lib/unicode/emoji/generated/regex_text_presentation.rb
50
51
  - lib/unicode/emoji/generated/regex_valid.rb
51
52
  - lib/unicode/emoji/generated/regex_valid_include_text.rb
52
53
  - lib/unicode/emoji/generated/regex_well_formed.rb
@@ -66,6 +67,7 @@ files:
66
67
  - lib/unicode/emoji/generated_native/regex_prop_modifier_base.rb
67
68
  - lib/unicode/emoji/generated_native/regex_prop_presentation.rb
68
69
  - lib/unicode/emoji/generated_native/regex_text.rb
70
+ - lib/unicode/emoji/generated_native/regex_text_presentation.rb
69
71
  - lib/unicode/emoji/generated_native/regex_valid.rb
70
72
  - lib/unicode/emoji/generated_native/regex_valid_include_text.rb
71
73
  - lib/unicode/emoji/generated_native/regex_well_formed.rb
@@ -74,7 +76,6 @@ files:
74
76
  - lib/unicode/emoji/lazy_constants.rb
75
77
  - lib/unicode/emoji/list.rb
76
78
  - spec/data/.keep
77
- - spec/data/emoji-test.txt
78
79
  - spec/emoji_test_txt_spec.rb
79
80
  - spec/unicode_emoji_spec.rb
80
81
  - unicode-emoji.gemspec
@@ -107,6 +108,5 @@ specification_version: 4
107
108
  summary: Emoji data and regex
108
109
  test_files:
109
110
  - spec/data/.keep
110
- - spec/data/emoji-test.txt
111
111
  - spec/emoji_test_txt_spec.rb
112
112
  - spec/unicode_emoji_spec.rb