tanuki_emoji 0.12.0 → 0.13.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: 0cd69298cf8929ea174ffe7bbd233d4c109ea8718be551f5360d6fc5780de7aa
4
- data.tar.gz: 9ebc786c9887e0653d970a201863030a7d1b6db7a8321ffa7a5aa71e45217b2b
3
+ metadata.gz: 03a9c7c072edee70643369a71de1b6bb85ecf044c4030ff355cc0caab71b081c
4
+ data.tar.gz: e697dfff9b354990fa2a6ef0c52cf368d968690008ffee415de66e010c9cf9ce
5
5
  SHA512:
6
- metadata.gz: 074d89b94fb55ff415bc373a3a93c328c88a25a2d3ddb4f9c55f17531c8d666231c830aef305163159e62f1494969e995b4c8ea13204672a07d17811cd27c952
7
- data.tar.gz: 66727db990cce5221e0c9008fb19ec033fed3ad47ddcc00c52ecbee3b7c52237d00d8c69cf05125463ff527d31859af3b341cdca2be16a139beee1a2cbbc81d6
6
+ metadata.gz: 4c1b8e5c498364ece688325c25f568d585cab71682380a56d58717f8f7e961bcac557f23b84b4126b34e9592515f26c30d48c9742f1affcaecbde7ba6bd11143
7
+ data.tar.gz: 64782dcf6b3b024f6d496b00e0265689fbffbaf4c4b8811b051a75eac8f9804bb4df6dd866f84cf1ec95c0c80c379e3122b7913fb9ddfb10786278c86e707f62
data/.gitignore CHANGED
@@ -11,6 +11,8 @@
11
11
  /*.gem
12
12
  /app/assets/**/*
13
13
  .DS_Store
14
+ /pages/_data/emojis.json
15
+ /pages/_site/**/*
14
16
 
15
17
  # rspec failure tracking
16
18
  .rspec_status
data/.gitlab-ci.yml CHANGED
@@ -102,3 +102,20 @@ update-changelog:
102
102
  version=$(ruby -e "print Gem::Specification.load('${GEMSPEC_FILE}').version")
103
103
  [ -n "${version}" ] || (echo "VERSION could not be parsed in ${GEMSPEC_FILE}!" && exit 1)
104
104
  - 'curl --fail --request POST --header "PRIVATE-TOKEN: ${GITLAB_API_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/repository/changelog?version=${version}&branch=${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"'
105
+
106
+ pages:
107
+ stage: deploy
108
+ image: ruby:3.2
109
+ script:
110
+ - echo "The site will be deployed to $CI_PAGES_URL"
111
+ - gem install bundler
112
+ - cd pages
113
+ - bundle install
114
+ - bundle exec rake generate
115
+ - bundle exec jekyll build
116
+ artifacts:
117
+ paths:
118
+ - pages
119
+ publish: pages/_site
120
+ rules:
121
+ - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
data/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 0.13.0 (2024-10-25)
8
+
9
+ ### Fixed (1 change)
10
+
11
+ - [Ensure no Unicode aliases collide with gemojione](https://gitlab.com/gitlab-org/ruby/gems/tanuki_emoji/-/commit/e26557d826947b78733f1c9522f73918cf86d7c1) ([merge request](https://gitlab.com/gitlab-org/ruby/gems/tanuki_emoji/-/merge_requests/75))
12
+
7
13
  ## 0.12.0 (2024-10-22)
8
14
 
9
15
  ### Fixed (2 changes)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tanuki_emoji (0.12.0)
4
+ tanuki_emoji (0.13.0)
5
5
  i18n (~> 1.14)
6
6
 
7
7
  GEM
data/Rakefile CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "bundler/setup"
3
4
  require "bundler/gem_tasks"
4
5
  require "rspec/core/rake_task"
5
6
  require "rubocop/rake_task"
@@ -143,7 +143,9 @@ module TanukiEmoji
143
143
  end
144
144
 
145
145
  def inspect
146
- "#<#{self.class.name}: #{codepoints} (#{hex}) #{alpha_code} aliases: #{aliases}>"
146
+ # rubocop:disable Layout/LineLength
147
+ %(#<#{self.class.name}: #{codepoints} (#{hex}), alpha_code: "#{alpha_code}", aliases: #{aliases}, name: "#{name}", description: "#{description}">)
148
+ # rubocop:enable Layout/LineLength
147
149
  end
148
150
 
149
151
  def ==(other)
@@ -50,10 +50,17 @@ module TanukiEmoji
50
50
 
51
51
  if emoji.alpha_code != emoji_data[:shortname]
52
52
  org_alpha_code = emoji.alpha_code
53
+ org_alpha_code_sym = TanukiEmoji::Character.format_name(org_alpha_code).to_sym
53
54
  emoji.replace_alpha_code(emoji_data[:shortname])
54
55
 
55
- # add the unicode alias back only if it's not a different emoji
56
- emoji.add_alias(org_alpha_code) unless EMOJI_DIFFERENCES[:unicode].include?(emoji.codepoints)
56
+ # rubocop:disable Style/AsciiComments
57
+ # Ensure that we're not adding an alias that is part of the gemonione data.
58
+ # For example, Unicode uses `sunglasses` for 🕶️, which is `dark_sunglasses` in gemojione.
59
+ # `sunglasses` is 😎 which is `smiling_face_with_sunglasses` in Unicode.
60
+ # We don't want `sunglasses` to be added as an alias of `dark_sunglasses`, because that
61
+ # would interfere with `sunglasses` being the primary code for `smiling_face_with_sunglasses`
62
+ # rubocop:enable Style/AsciiComments
63
+ emoji.add_alias(org_alpha_code) unless db.key?(org_alpha_code_sym) || EMOJI_DIFFERENCES[:unicode].include?(emoji.codepoints)
57
64
  end
58
65
 
59
66
  add_emoji_data(emoji, emoji_data)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TanukiEmoji
4
- VERSION = "0.12.0"
4
+ VERSION = '0.13.0'
5
5
  end
data/tanuki_emoji.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  # Specify which files should be added to the gem when it is released.
23
23
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
24
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
- git_files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features|bin)/}) }
25
+ git_files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features|bin|pages)/}) }
26
26
  asset_files = Dir.glob('app/assets/**/*').reject { |f| f.match(%r{\.DS_Store}) }
27
27
 
28
28
  git_files + asset_files
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.12.0
4
+ version: 0.13.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: 2024-10-22 00:00:00.000000000 Z
11
+ date: 2024-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n