remove_emoji 3.0.1 → 4.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d92c9c586ac5e8f436c8037a4b6d085c70054c122b84ac8acd9ed8ea39c3070
4
- data.tar.gz: 64cc337b3e7abf952d3674b553558c72d770ecdc4015c32bf5886bffbbc2b47f
3
+ metadata.gz: 802f086849accf266efa3fd4cc73daa10fe7094536e7fa5be590f0e0142eb6e7
4
+ data.tar.gz: 505a0a8fb3803d7796067b470df5580f1937f9eb2300be982db88b3c75d7a45a
5
5
  SHA512:
6
- metadata.gz: 376b0e93223820a209ac3ed2dcf16c351c78c19142123e03f9e333913222f4c149485e98e4a0d3450a3dff8ff3b8694b297e5f6edd5073722fe819fe9870cc51
7
- data.tar.gz: 7a57682cdf3d4bea4fcfbff6cfdb52ea09708b9fccead96515bcf6c6a588c61f90a66a8b4730a50abde5778a80ad3efa96a2c39075289fba4dcbf44b0ecc69f8
6
+ metadata.gz: 03eb4fbcdf4e0d5bc7013da5ef28a32cddb2e7f475ae952284a433ddd0aabea0dd513406f539680b1fc7d3a879cbc941005f76f8d84119c1c82b89d50891d268
7
+ data.tar.gz: aa0a236af05a1f4d6d2888a65ceda358aa9e5582c82e641f126a1296a3d2147109fdf86f247ea56f9248784114dc7eada8cb88a0c421b2ff713dcb1461a4eff9
data/README.md CHANGED
@@ -1,18 +1,16 @@
1
- Remove Emoji
1
+ Remove Emoji ( for Ruby )
2
2
  =================================================
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/remove_emoji.svg)](https://badge.fury.io/rb/remove_emoji)
5
- [![Build Status](https://travis-ci.org/guanting112/remove_emoji.svg?branch=master)](https://travis-ci.org/guanting112/remove_emoji)
5
+ [![Ruby CI](https://github.com/guanting112/remove_emoji/actions/workflows/ci.yml/badge.svg)](https://github.com/guanting112/remove_emoji/actions)
6
6
  [![Code Climate](https://codeclimate.com/github/guanting112/remove_emoji/badges/gpa.svg)](https://codeclimate.com/github/guanting112/remove_emoji)
7
7
 
8
- 此為針對「移除」Unicode Emoji 圖示 所開發的專屬套件,
9
- 您可以透過該套件移除令人困擾的 Emoji 符號。
10
- ( It can remove any of the emoji supported by that package. )
8
+ This is a gem developed for "removing" Unicode Emoji icons, you can use this gem to remove annoying Emoji symbols.
11
9
 
12
- ![emoji](https://i.imgur.com/yA6WYmS.jpg)
10
+ ![emoji](https://i.imgur.com/h1Ip0r6.png)
13
11
 
14
12
 
15
- Installation / 安裝方式
13
+ Installation
16
14
  --------
17
15
 
18
16
  via Rubygems
@@ -24,20 +22,20 @@ gem install remove_emoji
24
22
  In your Gemfile:
25
23
 
26
24
  ```ruby
27
- gem 'remove_emoji', '~> 3.0.0'
25
+ gem 'remove_emoji', '~> 4.0.0'
28
26
  ```
29
27
 
30
- Usage / 使用方式
28
+ Usage
31
29
  --------
32
30
 
33
- 使用方式很簡單,僅需要呼叫 RemoveEmoji::Sanitize.call 遞入你要過濾的字串即可過濾。
31
+ Usage is simple, just call `RemoveEmoji.remove` passing in the string you want to filter.
34
32
 
35
33
  ```ruby
36
34
  require 'remove_emoji'
37
35
 
38
- original_string = "Remove..😊😍😌🤕👿👹👧👧🏻👧🏼👧🏽🤜🏼👍🏽👌☝🏼🥝🥦🌶🌽🍎..Emoji"
36
+ original_string = "😊😍😌🤕👿👹👧👧🏻👧🏼👧🏽🤜🏼👍🏽👌☝🏼🥝🥦🌶🌽🍎"
39
37
 
40
- puts RemoveEmoji::Sanitize.call(original_string)
38
+ puts RemoveEmoji.remove(original_string)
41
39
  ```
42
40
 
43
41
  ```ruby
@@ -64,7 +62,7 @@ STRING
64
62
  # ==========
65
63
  # Output
66
64
  # ==========
67
- puts RemoveEmoji::Sanitize.call(original_string)
65
+ puts RemoveEmoji.remove(original_string)
68
66
 
69
67
  # Result:
70
68
  # abcdefghijklmnopqrstuvwxyz....0123456789
@@ -86,8 +84,3 @@ Demo ( Before / After )
86
84
  ------
87
85
 
88
86
  ![emoji_effect](https://i.imgur.com/OzcQYWL.jpg)
89
-
90
- LICENSE
91
- --------
92
-
93
- 本專案原始碼採 MIT LICENSE 授權 ( 詳見 LICENSE 檔案 )
@@ -1,3 +1,3 @@
1
1
  module RemoveEmoji
2
- VERSION = '3.0.1'
2
+ VERSION = '4.0.0'
3
3
  end
data/lib/remove_emoji.rb CHANGED
@@ -2,19 +2,9 @@ require "remove_emoji/version"
2
2
  require "remove_emoji/rules"
3
3
 
4
4
  module RemoveEmoji
5
- class Sanitize
6
-
7
- def initialize(original_string)
8
- @original_string = original_string
9
- end
10
-
11
- def self.call(*args)
12
- new(*args).sanitize
13
- end
14
-
15
- def sanitize
16
- @original_string.gsub(RemoveEmoji::MATCH_EMOJI_CODEPOINTS_RULE, '')
17
- end
18
5
 
6
+ def self.remove(string)
7
+ string.gsub(RemoveEmoji::MATCH_EMOJI_CODEPOINTS_RULE, '')
19
8
  end
9
+
20
10
  end
metadata CHANGED
@@ -1,88 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remove_emoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
- - Guanting Chen
7
+ - Guanting112
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-01 00:00:00.000000000 Z
11
+ date: 2025-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "<"
18
- - !ruby/object:Gem::Version
19
- version: '3.0'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: '1.7'
23
- type: :development
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - "<"
28
- - !ruby/object:Gem::Version
29
- version: '3.0'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '1.7'
33
- - !ruby/object:Gem::Dependency
34
- name: rake
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: 12.3.3
40
- type: :development
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 12.3.3
47
- - !ruby/object:Gem::Dependency
48
- name: minitest
14
+ name: rspec
49
15
  requirement: !ruby/object:Gem::Requirement
50
16
  requirements:
51
17
  - - "~>"
52
18
  - !ruby/object:Gem::Version
53
- version: '5.0'
19
+ version: '3.0'
54
20
  type: :development
55
21
  prerelease: false
56
22
  version_requirements: !ruby/object:Gem::Requirement
57
23
  requirements:
58
24
  - - "~>"
59
25
  - !ruby/object:Gem::Version
60
- version: '5.0'
61
- description: " Remove Emoji \U0001F608\U0001F6AB\U0001F631 ( 2021 version, for Ruby
62
- 2.x ~ 3 / Rails 4 ~ 6.x )"
26
+ version: '3.0'
27
+ description: " Remove Emoji \U0001F6AB\U0001F631 ( for Ruby 2.x ~ 4 / Rails 4 ~ 8
28
+ )"
63
29
  email:
64
- - cgt886@gmail.com
65
30
  executables: []
66
31
  extensions: []
67
32
  extra_rdoc_files: []
68
33
  files:
69
- - ".gitignore"
70
- - ".travis.yml"
71
- - Gemfile
72
- - LICENSE.txt
73
34
  - README.md
74
- - Rakefile
75
- - bin/console
76
- - bin/setup
77
35
  - lib/remove_emoji.rb
78
36
  - lib/remove_emoji/rules.rb
79
37
  - lib/remove_emoji/version.rb
80
- - remove_emoji.gemspec
81
38
  homepage: https://github.com/guanting112/remove_emoji
82
39
  licenses:
83
40
  - MIT
84
- metadata:
85
- allowed_push_host: https://rubygems.org
41
+ metadata: {}
86
42
  post_install_message:
87
43
  rdoc_options: []
88
44
  require_paths:
@@ -91,16 +47,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
47
  requirements:
92
48
  - - ">="
93
49
  - !ruby/object:Gem::Version
94
- version: '2'
50
+ version: 2.3.0
95
51
  required_rubygems_version: !ruby/object:Gem::Requirement
96
52
  requirements:
97
53
  - - ">="
98
54
  - !ruby/object:Gem::Version
99
55
  version: '0'
100
56
  requirements: []
101
- rubygems_version: 3.2.3
57
+ rubygems_version: 3.5.9
102
58
  signing_key:
103
59
  specification_version: 4
104
- summary: "Remove Emoji \U0001F608\U0001F6AB\U0001F631 ( 2021 version, for Ruby 2.x
105
- ~ 3 / Rails 4 ~ 6.x )"
60
+ summary: "Remove Emoji \U0001F6AB\U0001F631 ( for Ruby 2.x ~ 4 / Rails 4 ~ 8 )"
106
61
  test_files: []
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- /Gemfile.lock
data/.travis.yml DELETED
@@ -1,12 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.0
4
- - 2.1
5
- - 2.2
6
- - 2.3.1
7
- - 2.4.6
8
- - 2.5.1
9
- - 2.6.3
10
- - 2.6.5
11
- - 2.7.0
12
- - 3.0.0
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- gemspec
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017-2021 Guanting Chen
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/Rakefile DELETED
@@ -1,9 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require 'rake/testtask'
3
-
4
- task :default => :spec
5
-
6
- Rake::TestTask.new(:spec) do |t|
7
- t.test_files = FileList['spec/*_spec.rb']
8
- t.warning = true
9
- end
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "remove_emoji"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/remove_emoji.gemspec DELETED
@@ -1,37 +0,0 @@
1
-
2
- lib = File.expand_path("../lib", __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "remove_emoji/version"
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "remove_emoji"
8
- spec.version = RemoveEmoji::VERSION
9
- spec.authors = ["Guanting Chen"]
10
- spec.email = ["cgt886@gmail.com"]
11
- spec.summary = %q{ Remove Emoji 😈🚫😱 ( 2021 version, for Ruby 2.x ~ 3 / Rails 4 ~ 6.x )}
12
- spec.description = %q{ Remove Emoji 😈🚫😱 ( 2021 version, for Ruby 2.x ~ 3 / Rails 4 ~ 6.x )}
13
- spec.homepage = "https://github.com/guanting112/remove_emoji"
14
- spec.license = "MIT"
15
- spec.platform = Gem::Platform::RUBY
16
- spec.required_ruby_version = '>= 2'
17
-
18
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
19
- # to allow pushing to a single host or delete this section to allow pushing to any host.
20
- if spec.respond_to?(:metadata)
21
- spec.metadata['allowed_push_host'] = "https://rubygems.org"
22
- else
23
- raise "RubyGems 2.0 or newer is required to protect against " \
24
- "public gem pushes."
25
- end
26
-
27
- spec.files = `git ls-files -z`.split("\x0").reject do |f|
28
- f.match(%r{^(test|spec|features)/})
29
- end
30
- spec.bindir = "exe"
31
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
- spec.require_paths = ["lib"]
33
-
34
- spec.add_development_dependency "bundler", "<3.0", ">=1.7"
35
- spec.add_development_dependency "rake", ">= 12.3.3"
36
- spec.add_development_dependency 'minitest', '~> 5.0'
37
- end