unicode-emoji 2.4.0 → 2.8.0

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: 01370a115b3b6135d1b2d495ed25ccc9f2bebec4b27d171f567ea7c134facc24
4
- data.tar.gz: b50bb761b4c556588bed13622e3926734f471f773648e033640bd274e450147f
3
+ metadata.gz: 7aa0991308dd22c0d643200e52d609b611c393cc73b2a161eca83bddbf435daa
4
+ data.tar.gz: 7c9f5561da128d4d343f20e10334eae973f753da50fe798206cdaf27c0815029
5
5
  SHA512:
6
- metadata.gz: ecebc5a3f30904d12bb8170d44f596577a40a5895393448359d7fa6c52d3b0a83fab12d8da3ec708f76313b1a3286b4a7b23a415076f1b9c58468ad364576e57
7
- data.tar.gz: 72071ac2532ddab99aaac5fd9c61ad2f4047c3ab8428e6b9995f607d0f020c0596283291d3a43de00eb5e78d90f089ed8b563ec22c77adaa65e6016fd3908501
6
+ metadata.gz: 2a84bb7293e52d559bc940105b3ffaf8b511263e6e3adffbe7d204c75d25eb8bca8a3b3ea4d30d27e9b15a65f9cc26397077ce3fc6b861e7d67f19e3320cb636
7
+ data.tar.gz: 185520969e9222d295b7768c458ce546d9e0ffb190eb802ea58052c46f300204cedf94d4a6c37cfc92bdb1266694fd244fb8f6009b4b074f24681213827d5a2d
data/CHANGELOG.md CHANGED
@@ -1,6 +1,28 @@
1
1
  ## CHANGELOG
2
2
 
3
- ### 2.4.0 (unreleased)
3
+ ### 2.8.0
4
+
5
+ - Update valid subdivisions to CLDR 39
6
+
7
+ ### 2.7.1
8
+
9
+ - Update valid subdivisions to CLDR 38.1
10
+
11
+ ### 2.7.0
12
+
13
+ - Update valid subdivisions to CLDR 38
14
+ - Loosen Ruby dependency to allow Ruby 3.0
15
+
16
+ ### 2.6.0
17
+
18
+ - Emoji 13.1
19
+
20
+ ### 2.5.0
21
+
22
+ - Use native Emoji regex properties when current Ruby's Emoji support is the same as our current Emoji version
23
+ - Update valid subdivisions to CLDR 37
24
+
25
+ ### 2.4.0
4
26
 
5
27
  - Emoji 13.0
6
28
 
data/MIT-LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2020 Jan Lelis, https://janlelis.com
1
+ Copyright (c) 2017-2021 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
@@ -1,16 +1,16 @@
1
- # Unicode::Emoji [![[version]](https://badge.fury.io/rb/unicode-emoji.svg)](https://badge.fury.io/rb/unicode-emoji) [![[travis]](https://travis-ci.org/janlelis/unicode-emoji.svg)](https://travis-ci.org/janlelis/unicode-emoji)
1
+ # Unicode::Emoji [![[version]](https://badge.fury.io/rb/unicode-emoji.svg)](https://badge.fury.io/rb/unicode-emoji) [![[ci]](https://github.com/janlelis/unicode-emoji/workflows/Test/badge.svg)](https://github.com/janlelis/unicode-emoji/actions?query=workflow%3ATest)
2
2
 
3
- A small Ruby library which provides Unicode Emoji data and regexes, incorporating the latest Unicode and Emoji standards.
3
+ Provides Unicode Emoji data and regexes, incorporating the latest Unicode and Emoji standards.
4
4
 
5
5
  Also includes a categorized list of recommended Emoji.
6
6
 
7
- Emoji version: **13.0** (January 2019)
7
+ Emoji version: **13.1** (September 2020)
8
8
 
9
- CLDR version (used for sub-region flags): **36** (October 2019)
9
+ CLDR version (used for sub-region flags): **39** (April 2021)
10
10
 
11
- Supported Rubies: **2.7**, **2.6**, **2.5**, **2.4**
11
+ Supported Rubies: **3.0**, **2.7**, **2.6**, **2.5** (also latest JRuby and TruffleRuby stable)
12
12
 
13
- No longer supported Rubies, but might still work: **2.3**
13
+ No longer supported Rubies, but might still work: **2.4**, **2.3**
14
14
 
15
15
  If you are stuck on an older Ruby version, checkout the latest [0.9 version](https://rubygems.org/gems/unicode-emoji/versions/0.9.3) of this gem.
16
16
 
@@ -148,5 +148,5 @@ Unicode::Emoji.properties "☝" # => ["Emoji", "Emoji_Modifier_Base"]
148
148
 
149
149
  ## MIT
150
150
 
151
- - Copyright (C) 2017-2020 Jan Lelis <https://janlelis.com>. Released under the MIT license.
151
+ - Copyright (C) 2017-2021 Jan Lelis <https://janlelis.com>. Released under the MIT license.
152
152
  - Unicode data: https://www.unicode.org/copyright.html#Exhibit1
data/Rakefile CHANGED
@@ -32,6 +32,6 @@ end
32
32
 
33
33
  desc "#{gemspec.name} | Spec"
34
34
  task :spec do
35
- sh "for file in spec/*.rb; do ruby $file; done"
35
+ ruby "spec/unicode_emoji_spec.rb"
36
36
  end
37
37
  task default: :spec
Binary file
data/lib/unicode/emoji.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "unicode/version"
4
+
3
5
  require_relative "emoji/constants"
4
6
  require_relative "emoji/index"
5
7
 
@@ -47,7 +49,7 @@ module Unicode
47
49
  join = -> (*strings){ "(?:" + strings.join("|") + ")" }
48
50
  pack_and_join = ->(ords){ join[*ords.map{ |ord| pack[ord] }] }
49
51
 
50
- if ENABLE_NATIVE_EMOJI_UNICODE_PROPERTIES
52
+ if EMOJI_VERSION == Unicode::Version.emoji_version
51
53
  emoji_character = "\\p{Emoji}"
52
54
  emoji_modifier = "\\p{Emoji Modifier}"
53
55
  emoji_modifier_base = "\\p{Emoji Modifier Base}"
@@ -2,14 +2,11 @@
2
2
 
3
3
  module Unicode
4
4
  module Emoji
5
- VERSION = "2.4.0"
6
- EMOJI_VERSION = "13.0"
7
- CLDR_VERSION = "36"
5
+ VERSION = "2.8.0"
6
+ EMOJI_VERSION = "13.1"
7
+ CLDR_VERSION = "39"
8
8
  DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + "/../../../data/").freeze
9
9
  INDEX_FILENAME = (DATA_DIRECTORY + "/emoji.marshal.gz").freeze
10
-
11
- ENABLE_NATIVE_EMOJI_UNICODE_PROPERTIES = false
12
- # As of Ruby 2.7.0, Emoji version 12.1 is included
13
10
  end
14
11
  end
15
12
 
@@ -98,6 +98,11 @@ describe Unicode::Emoji do
98
98
  "👨‍🍼 man feeding baby" =~ Unicode::Emoji::REGEX
99
99
  assert_equal "👨‍🍼", $&
100
100
  end
101
+
102
+ it "matches 13.1 emoji" do
103
+ "❤️‍🔥 heart on fire" =~ Unicode::Emoji::REGEX
104
+ assert_equal "❤️‍🔥", $&
105
+ end
101
106
  end
102
107
 
103
108
  describe "REGEX_VALID" do
@@ -17,5 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ["lib"]
19
19
 
20
- gem.required_ruby_version = "~> 2.3"
20
+ gem.required_ruby_version = ">= 2.3", "< 4.0"
21
+
22
+ gem.add_dependency "unicode-version", "~> 1.0"
21
23
  end
metadata CHANGED
@@ -1,16 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-emoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-01 00:00:00.000000000 Z
12
- dependencies: []
13
- description: "[Emoji 13.0] A small Ruby library which provides Unicode Emoji data
11
+ date: 2021-04-07 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'
27
+ description: "[Emoji 13.1] A small Ruby library which provides Unicode Emoji data
14
28
  and regexes, incorporating the latest Unicode and Emoji standards. Includes a categorized
15
29
  list of recommended Emoji."
16
30
  email:
@@ -20,7 +34,6 @@ extensions: []
20
34
  extra_rdoc_files: []
21
35
  files:
22
36
  - ".gitignore"
23
- - ".travis.yml"
24
37
  - CHANGELOG.md
25
38
  - CODE_OF_CONDUCT.md
26
39
  - Gemfile
@@ -29,7 +42,6 @@ files:
29
42
  - README.md
30
43
  - Rakefile
31
44
  - data/emoji.marshal.gz
32
- - lib/unicode/.emoji.rb.swp
33
45
  - lib/unicode/emoji.rb
34
46
  - lib/unicode/emoji/constants.rb
35
47
  - lib/unicode/emoji/index.rb
@@ -45,16 +57,19 @@ require_paths:
45
57
  - lib
46
58
  required_ruby_version: !ruby/object:Gem::Requirement
47
59
  requirements:
48
- - - "~>"
60
+ - - ">="
49
61
  - !ruby/object:Gem::Version
50
62
  version: '2.3'
63
+ - - "<"
64
+ - !ruby/object:Gem::Version
65
+ version: '4.0'
51
66
  required_rubygems_version: !ruby/object:Gem::Requirement
52
67
  requirements:
53
68
  - - ">="
54
69
  - !ruby/object:Gem::Version
55
70
  version: '0'
56
71
  requirements: []
57
- rubygems_version: 3.1.2
72
+ rubygems_version: 3.2.3
58
73
  signing_key:
59
74
  specification_version: 4
60
75
  summary: Retrieve Emoji data about Unicode codepoints.
data/.travis.yml DELETED
@@ -1,20 +0,0 @@
1
- sudo: false
2
- language: ruby
3
-
4
- rvm:
5
- - 2.7
6
- - 2.6
7
- - 2.5
8
- - 2.4
9
- - 2.3
10
- - ruby-head
11
- - jruby-9.2.9.0
12
- - truffleruby
13
-
14
- matrix:
15
- allow_failures:
16
- - rvm: 2.3
17
- - rvm: ruby-head
18
- - rvm: jruby-2.9.2.0
19
- - rvm: truffleruby
20
- # fast_finish: true
Binary file