emoji-datasource 7.0.2 → 14.0.1

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.
data/yarn.lock CHANGED
@@ -2,7 +2,7 @@
2
2
  # yarn lockfile v1
3
3
 
4
4
 
5
- emoji-datasource@^7.0.2:
6
- version "7.0.2"
7
- resolved "https://registry.yarnpkg.com/emoji-datasource/-/emoji-datasource-7.0.2.tgz#e32b9002c594334ea9ec74e11f21b20c5adcb74d"
8
- integrity sha512-F5TTUSktTIfbjHIlaz8tjsQ8EAD0UpJtj1i5O13jQARWTddtFgam3nE1W5WgSQoqU/cuTnF1H9tK/wlCOyzfiA==
5
+ emoji-datasource@^14.0.0:
6
+ version "14.0.0"
7
+ resolved "https://registry.yarnpkg.com/emoji-datasource/-/emoji-datasource-14.0.0.tgz#99529a62f3a86546fc670c09b672ddc9f24f3d44"
8
+ integrity sha512-SoOv0lSa+9/2X9ulSRDhu2u1zAOaOv5vtMY3OYUDcQCoReEh0/3eQAMuBM9LyD7Hy3G4K7mDPDqVeHUWvy7cow==
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emoji-datasource
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.2
4
+ version: 14.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justas Palumickas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-06 00:00:00.000000000 Z
11
+ date: 2023-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -44,42 +44,42 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.10'
47
+ version: '3.12'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.10'
54
+ version: '3.12'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.16'
61
+ version: '1.45'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.16'
68
+ version: '1.45'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.21'
75
+ version: '0.22'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.21'
82
+ version: '0.22'
83
83
  description: Emoji data from emoji-datasource (https://github.com/iamcal/emoji-data)
84
84
  npm package
85
85
  email:
@@ -95,7 +95,6 @@ files:
95
95
  - ".rubocop.yml"
96
96
  - CODE_OF_CONDUCT.md
97
97
  - Gemfile
98
- - Gemfile.lock
99
98
  - LICENSE
100
99
  - README.md
101
100
  - Rakefile
@@ -105,7 +104,6 @@ files:
105
104
  - lib/emoji-datasource.rb
106
105
  - lib/emoji_datasource.rb
107
106
  - lib/emoji_datasource/emoji.rb
108
- - lib/emoji_datasource/short_name_to_char.rb
109
107
  - lib/emoji_datasource/version.rb
110
108
  - package.json
111
109
  - vendor/emoji-datasource/emoji.json
@@ -118,6 +116,7 @@ metadata:
118
116
  source_code_uri: https://github.com/jpalumickas/emoji-datasource-ruby
119
117
  changelog_uri: https://github.com/jpalumickas/emoji-datasource-ruby/releases
120
118
  bug_tracker_uri: https://github.com/jpalumickas/emoji-datasource-ruby/issues
119
+ rubygems_mfa_required: 'true'
121
120
  post_install_message:
122
121
  rdoc_options: []
123
122
  require_paths:
@@ -126,14 +125,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
125
  requirements:
127
126
  - - ">="
128
127
  - !ruby/object:Gem::Version
129
- version: 2.5.0
128
+ version: 2.6.0
130
129
  required_rubygems_version: !ruby/object:Gem::Requirement
131
130
  requirements:
132
131
  - - ">="
133
132
  - !ruby/object:Gem::Version
134
133
  version: '0'
135
134
  requirements: []
136
- rubygems_version: 3.2.24
135
+ rubygems_version: 3.2.32
137
136
  signing_key:
138
137
  specification_version: 4
139
138
  summary: Emoji data from emoji-datasource npm package
data/Gemfile.lock DELETED
@@ -1,70 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- emoji-datasource (7.0.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- ast (2.4.2)
10
- coderay (1.1.3)
11
- diff-lcs (1.4.4)
12
- docile (1.4.0)
13
- method_source (1.0.0)
14
- parallel (1.20.1)
15
- parser (3.0.1.1)
16
- ast (~> 2.4.1)
17
- pry (0.14.1)
18
- coderay (~> 1.1)
19
- method_source (~> 1.0)
20
- rainbow (3.0.0)
21
- rake (13.0.3)
22
- regexp_parser (2.1.1)
23
- rexml (3.2.5)
24
- rspec (3.10.0)
25
- rspec-core (~> 3.10.0)
26
- rspec-expectations (~> 3.10.0)
27
- rspec-mocks (~> 3.10.0)
28
- rspec-core (3.10.1)
29
- rspec-support (~> 3.10.0)
30
- rspec-expectations (3.10.1)
31
- diff-lcs (>= 1.2.0, < 2.0)
32
- rspec-support (~> 3.10.0)
33
- rspec-mocks (3.10.2)
34
- diff-lcs (>= 1.2.0, < 2.0)
35
- rspec-support (~> 3.10.0)
36
- rspec-support (3.10.2)
37
- rubocop (1.16.1)
38
- parallel (~> 1.10)
39
- parser (>= 3.0.0.0)
40
- rainbow (>= 2.2.2, < 4.0)
41
- regexp_parser (>= 1.8, < 3.0)
42
- rexml
43
- rubocop-ast (>= 1.7.0, < 2.0)
44
- ruby-progressbar (~> 1.7)
45
- unicode-display_width (>= 1.4.0, < 3.0)
46
- rubocop-ast (1.7.0)
47
- parser (>= 3.0.1.1)
48
- ruby-progressbar (1.11.0)
49
- simplecov (0.21.2)
50
- docile (~> 1.1)
51
- simplecov-html (~> 0.11)
52
- simplecov_json_formatter (~> 0.1)
53
- simplecov-html (0.12.3)
54
- simplecov_json_formatter (0.1.3)
55
- unicode-display_width (2.0.0)
56
-
57
- PLATFORMS
58
- x86_64-darwin-19
59
- x86_64-darwin-20
60
-
61
- DEPENDENCIES
62
- emoji-datasource!
63
- pry (~> 0.14)
64
- rake (~> 13.0)
65
- rspec (~> 3.10)
66
- rubocop (~> 1.16)
67
- simplecov (~> 0.21)
68
-
69
- BUNDLED WITH
70
- 2.2.17
@@ -1,49 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module EmojiDatasource
4
- class ShortNameToChar
5
- def self.generate(name)
6
- new(name).call
7
- end
8
-
9
- attr_reader :short_name
10
-
11
- def initialize(short_name)
12
- @short_name = short_name
13
- end
14
-
15
- def call
16
- return unless short_name
17
- return EmojiDatasource.find_by_short_name(short_name)&.to_char unless skin_tone_matches
18
-
19
- emoji = EmojiDatasource.find_by_short_name(skin_tone_matches[1])
20
- return unless emoji
21
- return emoji.to_char if skin_tone_level == 1
22
-
23
- char_with_skin_tone(emoji)
24
- end
25
-
26
- private
27
-
28
- def char_with_skin_tone(emoji)
29
- return unless skin_tone_emoji
30
-
31
- skin_variation = emoji.skin_variations && emoji.skin_variations[skin_tone_emoji.unified]
32
- return unless skin_variation
33
-
34
- EmojiDatasource.unified_to_char(skin_variation[:unified])
35
- end
36
-
37
- def skin_tone_emoji
38
- EmojiDatasource.find_by_short_name("skin-tone-#{skin_tone_level}")
39
- end
40
-
41
- def skin_tone_level
42
- skin_tone_matches[2].to_i
43
- end
44
-
45
- def skin_tone_matches
46
- short_name.match(/:?(.+)::skin-tone-(\d+):?/)
47
- end
48
- end
49
- end