Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/bin/*
!/bin/gemoji
.bundle
.ruby-version
Gemfile.lock
Expand Down
25 changes: 1 addition & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE).

This project adheres to the [Open Code of Conduct][code-of-conduct]. By participating, you are expected to uphold this code.
[code-of-conduct]: http://todogroup.org/opencodeofconduct/#gemoji/opensource@github.com

Our emoji set is based off Apple's emoji character palette, plus some custom
emoji such as :octocat: :shipit: :metal:.

Some useful tools in development are:

```
Expand All @@ -17,28 +11,11 @@ Sets up the development environment. The prerequisites are:
* Ruby 1.9+
* Bundler

```
rake db:generate
```

On OS X, this will rebuild the `db/Category-Emoji.json` file from the system
one, pulling in any new emoji that Apple may have added in the meantime.

```
script/test
```

Runs the test suite, including the integrity test where we assert that we have
covered each of Apple's emoji.

```
script/regenerate
```

Rebuilds the `db/emoji.json` file which is our main list of emoji: their
canonical representations, descriptions, aliases, and tags. This requires OS X
because Safari is used in the process to verify which character render as emoji
and which render as ordinary Unicode glyphs from the current font.
Runs the test suite.

```
script/console
Expand Down
16 changes: 1 addition & 15 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
octocat, squirrel, shipit
Copyright (c) 2013 GitHub Inc. All rights reserved.

bowtie, neckbeard, fu
Copyright (c) 2013 37signals, LLC. All rights reserved.

feelsgood, finnadie, goberserk, godmode, hurtrealbad, rage 1-4, suspect
Copyright (c) 2013 id Software. All rights reserved.

trollface
Copyright (c) 2013 whynne@deviantart. All rights reserved.

Source code:

Copyright (c) 2013 GitHub, Inc.
Copyright (c) 2019 GitHub, Inc.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
gemoji
======

This library contains character information about native emoji, as well as image
files for a few custom emoji.
This library contains character information about native emojis.


Installation
Expand All @@ -14,16 +13,6 @@ Add `gemoji` to your Gemfile.
gem 'gemoji'
```

### Extract images

``` sh
bundle exec gemoji extract public/images/emoji
```

This will extract images into filenames such as:

* `public/images/emoji/octocat.png`


Example Rails Helper
--------------------
Expand Down
5 changes: 0 additions & 5 deletions bin/gemoji

This file was deleted.

120 changes: 0 additions & 120 deletions db/emoji.json
Original file line number Diff line number Diff line change
Expand Up @@ -20612,124 +20612,4 @@
, "unicode_version": "11.0"
, "ios_version": "12.1"
}
, {
"aliases": [
"basecamp"
]
, "tags": [
]
}
, {
"aliases": [
"basecampy"
]
, "tags": [
]
}
, {
"aliases": [
"bowtie"
]
, "tags": [
]
}
, {
"aliases": [
"feelsgood"
]
, "tags": [
]
}
, {
"aliases": [
"finnadie"
]
, "tags": [
]
}
, {
"aliases": [
"goberserk"
]
, "tags": [
]
}
, {
"aliases": [
"godmode"
]
, "tags": [
]
}
, {
"aliases": [
"hurtrealbad"
]
, "tags": [
]
}
, {
"aliases": [
"neckbeard"
]
, "tags": [
]
}
, {
"aliases": [
"octocat"
]
, "tags": [
]
}
, {
"aliases": [
"rage1"
]
, "tags": [
]
}
, {
"aliases": [
"rage2"
]
, "tags": [
]
}
, {
"aliases": [
"rage3"
]
, "tags": [
]
}
, {
"aliases": [
"rage4"
]
, "tags": [
]
}
, {
"aliases": [
"shipit"
, "squirrel"
]
, "tags": [
]
}
, {
"aliases": [
"suspect"
]
, "tags": [
]
}
, {
"aliases": [
"trollface"
]
, "tags": [
]
}
]
4 changes: 1 addition & 3 deletions gemoji.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Gem::Specification.new do |s|
s.version = "3.0.1"
s.summary = "Emoji library"
s.description = "Character information and metadata for standard and custom emoji."
s.executables = ["gemoji"]

s.required_ruby_version = '> 1.9'

Expand All @@ -14,8 +13,7 @@ Gem::Specification.new do |s|

s.files = Dir[
"README.md",
"bin/gemoji",
"images/*.png",
"LICENSE",
"db/emoji.json",
"lib/**/*.rb",
]
Expand Down
Binary file removed images/basecamp.png
Binary file not shown.
Binary file removed images/basecampy.png
Binary file not shown.
Binary file removed images/bowtie.png
Binary file not shown.
Binary file removed images/feelsgood.png
Binary file not shown.
Binary file removed images/finnadie.png
Binary file not shown.
Binary file removed images/goberserk.png
Binary file not shown.
Binary file removed images/godmode.png
Binary file not shown.
Binary file removed images/hurtrealbad.png
Binary file not shown.
Binary file removed images/neckbeard.png
Binary file not shown.
Binary file removed images/octocat.png
Binary file not shown.
Binary file removed images/rage1.png
Binary file not shown.
Binary file removed images/rage2.png
Binary file not shown.
Binary file removed images/rage3.png
Binary file not shown.
Binary file removed images/rage4.png
Binary file not shown.
Binary file removed images/shipit.png
Binary file not shown.
Binary file removed images/suspect.png
Binary file not shown.
Binary file removed images/trollface.png
Binary file not shown.
4 changes: 0 additions & 4 deletions lib/emoji.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ def data_file
File.expand_path('../../db/emoji.json', __FILE__)
end

def images_path
File.expand_path("../../images", __FILE__)
end

def all
return @all if defined? @all
@all = []
Expand Down
58 changes: 0 additions & 58 deletions lib/emoji/cli.rb

This file was deleted.

23 changes: 6 additions & 17 deletions test/emoji_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class EmojiTest < TestCase
end

test "unicodes set contains the unicodes" do
min_size = Emoji.all.reject(&:custom?).size
min_size = Emoji.all.size
count = Emoji.all.map(&:unicode_aliases).flatten.size
assert count > min_size, "there were too few unicode mappings: #{count}"
end
Expand Down Expand Up @@ -112,15 +112,15 @@ class EmojiTest < TestCase
end

test "emoji have category" do
missing = Emoji.all.select { |e| !e.custom? && e.category.to_s.empty? }
missing = Emoji.all.select { |e| e.category.to_s.empty? }
assert_equal [], missing.map(&:name), "some emoji don't have a category"

emoji = Emoji.find_by_alias('family_man_woman_girl')
assert_equal 'Smileys & People', emoji.category
end

test "emoji have description" do
missing = Emoji.all.select { |e| !e.custom? && e.description.to_s.empty? }
missing = Emoji.all.select { |e| e.description.to_s.empty? }
assert_equal [], missing.map(&:name), "some emoji don't have a description"

emoji = Emoji.find_by_alias('family_man_woman_girl')
Expand All @@ -133,27 +133,16 @@ class EmojiTest < TestCase
end

test "emoji have iOS version" do
missing = Emoji.all.select { |e| !e.custom? && e.ios_version.to_s.empty? }
missing = Emoji.all.select { |e| e.ios_version.to_s.empty? }
assert_equal [], missing.map(&:name), "some emoji don't have an iOS version"

emoji = Emoji.find_by_alias('family_man_woman_girl')
assert_equal '8.3', emoji.ios_version
end

test "custom emojis" do
test "no custom emojis" do
custom = Emoji.all.select(&:custom?)
assert custom.size > 0

custom.each do |emoji|
assert_nil emoji.raw
assert_equal [], emoji.unicode_aliases
end
end

test "custom emoji names" do
custom_names = Emoji.all.select(&:custom?).map(&:name)
assert custom_names.include?("shipit")
assert !custom_names.include?("+1")
assert 0, custom.size
end

test "create" do
Expand Down