tanuki_emoji 0.2.2 → 0.3.0
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 +4 -4
- data/.ruby-version +1 -0
- data/CHANGELOG.md +8 -1
- data/Gemfile.lock +1 -1
- data/lib/tanuki_emoji/character.rb +10 -1
- data/lib/tanuki_emoji/index.rb +2 -2
- data/lib/tanuki_emoji/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c67213658b22404d9912d1a6704748c1106602013ea3263e819dff1c05ee4dc8
|
|
4
|
+
data.tar.gz: 205335429c995e7fc884867b50caed6beb2f1bec90c9a4fa3bf31afdc364aa64
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a32137a26584a98e2e59954829e769cfdacb126986debc443118477cae7c5bd16cde127a75cb606c9674e31545102df12792ac58ff25bab479d49676553be297
|
|
7
|
+
data.tar.gz: 4fc240c5cd68e53f5721063f74f32b4bd2e4f60840882fb55dc31cb23163615f0096d4616bed8c730ac198322d87a5328c9b6cf7b0ab7e1e2b95fb0cdad43207
|
data/.ruby-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.7
|
data/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
-
## [0.
|
|
9
|
+
## [0.3.0] - 2021-08-26
|
|
10
|
+
### Modified
|
|
11
|
+
- Characters can be compared and will be considered equal when all of its attributes matches
|
|
12
|
+
- `:+1:` and `:-1:` which are aliases for `:thumbsup:` and `:thumbsdown:` can now be used with `find_by_alpha_code`
|
|
13
|
+
- added tests for both `find_by_alpha_code` and `find_by_codepoints` and make sure `find_by_alpha_code` can handle `nil` correctly
|
|
14
|
+
|
|
15
|
+
## [0.2.2] - 2021-08-23
|
|
10
16
|
### Modified
|
|
11
17
|
- Fixed autoload load_path
|
|
12
18
|
|
|
@@ -27,3 +33,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
27
33
|
[0.1.0]:https://gitlab.com/gitlab-org/tanuki_emoji/-/releases/v0.1.0
|
|
28
34
|
[0.2.0]:https://gitlab.com/gitlab-org/tanuki_emoji/-/releases/v0.2.0
|
|
29
35
|
[0.2.1]:https://gitlab.com/gitlab-org/tanuki_emoji/-/releases/v0.2.1
|
|
36
|
+
[0.2.2]:https://gitlab.com/gitlab-org/tanuki_emoji/-/releases/v0.2.2
|
data/Gemfile.lock
CHANGED
|
@@ -82,6 +82,15 @@ module TanukiEmoji
|
|
|
82
82
|
"#<#{self.class.name}:#{name} #{codepoints}(#{hex})>"
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
+
def ==(other)
|
|
86
|
+
name == other.name &&
|
|
87
|
+
codepoints == other.codepoints &&
|
|
88
|
+
codepoints_alternates == other.codepoints_alternates &&
|
|
89
|
+
alpha_code == other.alpha_code &&
|
|
90
|
+
aliases == other.aliases &&
|
|
91
|
+
description == other.description
|
|
92
|
+
end
|
|
93
|
+
|
|
85
94
|
# Convert Unicode code points to Hex format for inspection
|
|
86
95
|
#
|
|
87
96
|
# ensure alpha code is formatted with colons
|
|
@@ -89,7 +98,7 @@ module TanukiEmoji
|
|
|
89
98
|
# @param [String] alpha_code
|
|
90
99
|
# @return [String] formatted alpha code
|
|
91
100
|
def self.format_alpha_code(alpha_code)
|
|
92
|
-
alpha_code.match?(/:([a-
|
|
101
|
+
alpha_code.to_s.match?(/:([_+\-a-z0-9]+):/) ? alpha_code.to_s : ":#{alpha_code}:"
|
|
93
102
|
end
|
|
94
103
|
|
|
95
104
|
private
|
data/lib/tanuki_emoji/index.rb
CHANGED
|
@@ -68,11 +68,11 @@ module TanukiEmoji
|
|
|
68
68
|
def reset!(reload: true)
|
|
69
69
|
@all = []
|
|
70
70
|
|
|
71
|
-
load_data_files if reload
|
|
72
|
-
|
|
73
71
|
remove_instance_variable :@name_index if defined? @name_index
|
|
74
72
|
remove_instance_variable :@alpha_code_index if defined? @alpha_code_index
|
|
75
73
|
remove_instance_variable :@codepoints_index if defined? @codepoints_index
|
|
74
|
+
|
|
75
|
+
load_data_files if reload
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
private
|
data/lib/tanuki_emoji/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tanuki_emoji
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gabriel Mazetto
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-08-
|
|
11
|
+
date: 2021-08-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Tanuki Emoji provides Emoji character information and metadata with support
|
|
14
14
|
for Noto Emoji resources as fallback
|
|
@@ -24,6 +24,7 @@ files:
|
|
|
24
24
|
- ".gitmodules"
|
|
25
25
|
- ".rspec"
|
|
26
26
|
- ".rubocop.yml"
|
|
27
|
+
- ".ruby-version"
|
|
27
28
|
- CHANGELOG.md
|
|
28
29
|
- CONTRIBUTING.md
|
|
29
30
|
- Gemfile
|