Граф коммитов

453 Коммитов

Автор SHA1 Сообщение Дата
Mislav Marohnić 0bea2df7ba Add ability to use `Emoji.create` without a block 2014-07-04 11:51:20 +08:00
Mislav Marohnić e9480a983b Merge pull request #51 from phoet/patch-1
fix formatting
2014-07-04 11:43:31 +08:00
Mislav Marohnić 3935375ca8 Change emoji creation API to take name as 1st argument
It's more likely that someone will want to add a new emoji with a custom
image rather than a character that has a Unicode representation.

Also move the VARIATION_SELECTOR_16 logic outside of Emoji::Character
since it doesn't need to be concerned with it.
2014-07-03 18:13:55 +08:00
Peter Schröder 77ff183d85 fix formatting 2014-07-02 22:17:35 -04:00
Mislav Marohnić 06c5d0993b Fix some emoji images
/cc @charliesome because I only discovered these mismatches because of
his trains
2014-07-03 00:23:02 +08:00
Mislav Marohnić f73921aacd Add test that images on disk don't have duplicates 2014-07-02 19:51:36 +08:00
Mislav Marohnić e2ae300270 Merge pull request #50 from github/preview
HTML page to preview the emoji database
2014-06-28 09:13:41 +08:00
Mislav Marohnić bbfae32663 HTML page to preview the emoji database 2014-06-28 07:50:16 +08:00
Mislav Marohnić 65031cfcd2 Add documentation note about images for added emoji
It comes down to: if you add new emoji, you must add images for them as
well. That's the whole point.
2014-06-28 07:19:58 +08:00
Mislav Marohnić 7477247802 Add API for adding new / editing existing emoji
- Emoji.create(raw) => yields to block
- Emoji.edit_emoji(emoji) => yields to block

The block forms are so that the list of aliases & unicode_aliases is
re-indexed after the update.
2014-06-28 07:19:58 +08:00
Mislav Marohnić ef06de5305 Merge pull request #48 from github/fire-old-api
🔥 old gemoji API
2014-06-28 06:08:09 +08:00
Mislav Marohnić 097fbafcb7 🔥 old API 2014-06-27 19:09:59 +08:00
Mislav Marohnić 608ddd58fd Update gemspec to fix warnings
- Specifying `licenses` is recommended
- More helpful `summary` and `description`
2014-06-27 19:03:27 +08:00
Mislav Marohnić 72aecc9105 Actually give up on 1.8.7 compatbility
Gemoji implementation depends on `codepoints` and test depend on some
more Ruby 1.9-only features, so don't pretend that the library will be
1.8 compatible anytime soon. Probably never.

This reverts commit 6a781b6474.
2014-06-27 19:02:05 +08:00
Mislav Marohnić 6a781b6474 Add json gem for 1.8.7 test compatibility 2014-06-27 18:52:36 +08:00
Mislav Marohnić cb55354db9 Set up minitest gem for 1.8.7 test compatibility 2014-06-27 18:43:58 +08:00
Mislav Marohnić 490b07b49e Disable spam 2014-06-27 18:43:09 +08:00
Mislav Marohnić 1a7a23fd46 Enable Travis CI 2014-06-27 18:36:36 +08:00
Mislav Marohnić d7b020fd16 Merge pull request #47 from github/no-symlinks
Get emoji list & aliases from data file instead of symlinks
2014-06-27 18:33:17 +08:00
Mislav Marohnić a9112090fa Tweak tags for some emoji
Ensure that tags accurately describe the original meaning of the emoji
(with respect to its definition from Unicode spec).
2014-06-27 18:25:56 +08:00
Mislav Marohnić 01394ed139 Have `unicode_aliases` include emoji's raw representation as well
This brings it up to par with `aliases`, which includes `name` as well.
2014-06-27 11:21:46 +08:00
Mislav Marohnić 2530b24121 Update usage examples in the README with the new API 2014-06-27 11:21:45 +08:00
Mislav Marohnić 5d2401222a Improve emoji lookup fallback behavior
Instead of an unfriendly LocalJumpError, raise the Emoji::NotFound
exception with a helpful message if the block was not given.

If a fallback block was given, yield the value for which the lookup failed.
2014-06-27 11:21:45 +08:00
Mislav Marohnić 70db910026 Add dump script to inspect Unicode descriptions & aliases
This script was used to construct the initial `emoji.json` file.

Example:

    rake db:dump | less -r
2014-06-27 11:21:45 +08:00
Mislav Marohnić 0845c3898a Add task to download Unicode 6.3 names list
This list contains textual descriptions for emoji characters.
2014-06-27 11:21:45 +08:00
Mislav Marohnić 07e15fde99 Remove duplicate image for shipit squirrel 2014-06-27 11:21:45 +08:00
Mislav Marohnić 2fad57ed49 Get emoji list & aliases from data file instead of symlinks
Previously, emoji name & unicode aliases were determined by following
symlinks among `images/emoji/*.png`. This led to nontrivial code for
resolving these aliases, made it tricky for contributors to add new
aliases and inspect existing ones, and didn't leave room for adding
metadata to emojis such as tags or descriptions from the Unicode spec.

Moreover, the aliases as symlinks led to duplication of image assets in
users' applications, with `hocho.png` and `knife.png` representing the
same emoji but being two separate images. Users were also unsure what to
do with `unicode/{HEX-NAME}.png` files, which would end up among their
images after running the `:emoji` task.

This change removes the symlinks support and creates the list of emojis
and their aliases in `emoji.json`. A single emoji is now represented with
an Emoji::Character instance, which has the `image_filename` method to
determine the path to the corresponding image instead of having to
construct it manually.
2014-06-27 11:21:45 +08:00
Mislav Marohnić c8c9805bfc 🔥 image symlinks
Emoji aliases as symlinks didn't scale.
2014-06-03 02:25:14 +07:00
Mislav Marohnić f1d0bfedaf Simplify `db:generate` task and have JSON be human-readable 2014-03-12 12:16:15 +01:00
Trevor Turk 204ace76da Merge pull request #40 from github/use-extant-emoji-in-readme-example
Use extant emoji in the example
2014-02-24 13:34:32 -06:00
Rob Rix 824a0ee189 Use extant emoji in the example 2014-02-24 13:50:01 -05:00
Javan Makhmali 4536894c48 Merge pull request #39 from TheRakken/patch-1
Fixed typo in README.md
2014-02-01 15:12:14 -08:00
TheRakken 28983a9ea9 Fixed typo in README.md 2014-02-02 02:06:43 +03:00
Javan Makhmali 11c08bdd2f Shell out to `cp` ourself.
The output from using FileUtil's `cp_r` with the previous options was `cp -rp --remove-destination`, which aren't even valid options.
2014-01-30 17:31:09 -05:00
Trevor Turk c77cd152ba Use old hash syntax for Ruby 1.8 compatibility 2014-01-30 15:12:37 -06:00
Joshua Peek 73f48e4b57 Merge pull request #38 from github/knife-alias
Alias 🔪 to the same as 🔪
2014-01-30 09:48:00 -08:00
Coby Chapple 633bd4ff33 alias 🔪 to the same as 🔪 2014-01-30 17:10:31 +00:00
Javan Makhmali 8c96cb878f Document unicode mapping 2013-11-16 13:37:41 -05:00
Javan Makhmali dc06bc9a6b Recursively copy the whole emoji dir, preserving symlinks 2013-11-16 13:10:04 -05:00
Javan Makhmali 7755a8a181 Gemoji 1.5.0 2013-11-10 21:45:17 -05:00
Javan Makhmali 69f625f36c Merge pull request #37 from github/unicode-mapping
Unicode mapping, codepoint fixes, and tests!
2013-11-10 18:43:45 -08:00
Javan Makhmali 13bcea9b4a Make mappings private pending better names 2013-11-10 11:09:48 -05:00
Javan Makhmali 19ddee2bdc Fix up incorrect/mising speaker emojis 2013-11-10 11:05:52 -05:00
Javan Makhmali 9cd56f6e3d Add missing train emoji 2013-11-10 10:49:01 -05:00
Javan Makhmali 56da9a86e3 Add support for the unicode variation selector (fe0f) added to 107 emojis in iOS 7 / OS X 10.9.
http://www.unicode.org/L2/L2011/11438-emoji-var.pdf
http://unicode.org/reports/tr28/tr28-3.html#13_7_variation_selectors
2013-11-10 10:04:11 -05:00
Javan Makhmali c180447c5b Compare our emoji to emoji straight from the horse's mouth 2013-11-06 09:22:12 -05:00
Javan Makhmali 150c509735 Add missing 🌃 2013-11-05 22:26:25 -05:00
Javan Makhmali 8e098547ad Fix incorrect codepoint for 🌠 2013-11-05 20:50:02 -05:00
Javan Makhmali 968373beae Merge branch 'keycaps' of git://github.com/lautis/gemoji into unicode-mapping 2013-11-05 20:26:19 -05:00
Javan Makhmali cb85b7b105 Tests to ensure the gem is in good shape. Leave the unicode tests intentionally failing. Fix to follow. 2013-11-05 20:07:56 -05:00