tanuki_emoji 0.2.2 → 0.3.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: 645689214f62f8cecd946ba6976840c6c590d4c005ba0e7453bfff581a92a8c6
4
- data.tar.gz: 6a513c16e4a198a2c6b583421f84fd63b2be942fc6f3c4504f57a331a0e2c098
3
+ metadata.gz: c67213658b22404d9912d1a6704748c1106602013ea3263e819dff1c05ee4dc8
4
+ data.tar.gz: 205335429c995e7fc884867b50caed6beb2f1bec90c9a4fa3bf31afdc364aa64
5
5
  SHA512:
6
- metadata.gz: 79b2910f7c1cdf7526fac4daf312577b88b2c00c2c8915ba29f5f83946271378bcfc0223938a501088a58072009dd881079f8ff5bd2a5aecc6b5c9162e49b108
7
- data.tar.gz: 5d1dc520b29a272f279465afd4fcdc48669a59bfd6edc98250a1592ba377dc7f90e1ba9ba27b3fa451613e6b1a8fb0a6d7c2c43edf9f09b84ac172a421050a85
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.2.2] - 2021-08-32
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tanuki_emoji (0.2.2)
4
+ tanuki_emoji (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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-z_0-9]+):/) ? alpha_code : ":#{alpha_code}:"
101
+ alpha_code.to_s.match?(/:([_+\-a-z0-9]+):/) ? alpha_code.to_s : ":#{alpha_code}:"
93
102
  end
94
103
 
95
104
  private
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TanukiEmoji
4
- VERSION = "0.2.2"
4
+ VERSION = "0.3.0"
5
5
  end
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.2.2
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-23 00:00:00.000000000 Z
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