40 Commits

Author SHA1 Message Date
Mislav Marohnić
0f9400398e 🔥 extractor logic
We no longer ship any images to extract.
2019-05-05 02:28:19 +02:00
Mislav Marohnić
987463b50b 🔥 obsolete scripts 2019-05-05 01:58:35 +02:00
Michael Stock
21c4cfe247 Fix typo in README of Sierra 2016-09-29 23:14:17 -07:00
Mislav Marohnić
537ccc48ed Replace rake emoji task with a new gemoji executable
The availability of `gemoji extract` command allows easy extraction of
emoji assets into non-Rails applications.
2016-09-29 16:50:19 -04:00
Janko Marohnić
9308a10b52 Use image_path instead of asset_path in readme
In Rails 4.2 `#asset_path` has changed. Prior to Rails 4.2,
`#asset_path` would search all asset directories, and prepend the
appropriate asset type directory name to the result:

  asset_path("emoji/unicode/<id>.png")
  #=> "/images/emoji/unicode/<id>.png"

However, In Rails 4.2 `#asset_path` doesn't do that anymore, and assumes
that you've specified the correct folder. Since Emoji images are copied
to public/images/emoji/unicode, `#asset_path` would then generate the
wrong URL path:

  asset_path("emoji/unicode/<id>.png")
  #=> "/emoji/unicode/<id>.png"

Using `#image_path` fixes that, because that method looks specifically
for images/ folder, so it will find the Emoji images.
2015-01-26 23:53:48 +01:00
Inge Jørgensen
ac3620cf89 Make image_filename customizable 2014-12-12 22:31:34 +01:00
Jeremy Kemper
f9aba615af Change find_by_* to return nil rather than raise an exception.
This is a breaking API change.

You probably have code that looks like
  if emoji = Emoji.find_by_alias($1) { nil }
that you can change to
  if emoji = Emoji.find_by_alias($1)
2014-07-18 09:16:21 -07:00
Mislav Marohnić
3b65ee2f15 Merge pull request #49 from github/edit-emoji
Add API for adding new / editing existing emoji
2014-07-04 11:54:55 +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ć
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ć
2530b24121 Update usage examples in the README with the new API 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
Rob Rix
824a0ee189 Use extant emoji in the example 2014-02-24 13:50:01 -05:00
TheRakken
28983a9ea9 Fixed typo in README.md 2014-02-02 02:06:43 +03:00
Javan Makhmali
8c96cb878f Document unicode mapping 2013-11-16 13:37:41 -05:00
Dan Thompson
808cb099de Remove 'Rails' as rake task no longer requires it 2013-01-07 10:03:43 -05:00
Dan Thompson
b9fa07e0e2 Fix readme typo 2013-01-03 17:24:44 -05:00
Joshua Peek
198d829f42 Load tasks 2012-11-29 11:30:57 -06:00
Joshua Peek
77e1fb9e71 Editing 2012-11-29 10:45:33 -06:00
Joshua Peek
cf468c1cfd Fix syntax error 2012-11-29 10:44:29 -06:00
Joshua Peek
6d538220a2 🔥 railtie 2012-11-29 10:42:52 -06:00
Joshua Peek
dbb7e48c66 Update bundler instructions 2012-10-02 16:30:57 -05:00
Trevor Turk
d1d6d35da9 add an example to the readme 2012-10-02 15:47:15 -05:00
Trevor Turk
fc275cad0a clean up readme 2012-10-02 15:17:17 -05:00
Trevor Turk
74372af2f8 draft new readme 2012-10-01 11:14:45 -05:00
Joshua Peek
3358ffbeb4 Remove some old instructions 2012-09-28 10:05:13 -05:00
Trevor Turk
db6bc0fb28 todo about the problematic symlinks 2012-08-01 13:01:44 -05:00
Trevor Turk
a2e1d15d13 notes and todos 2012-08-01 11:53:38 -05:00
Trevor Turk
29b8706186 better instructions for myself 2012-07-31 11:34:27 -05:00
Trevor Turk
b845d2ae46 add BCX to the list of apps 2012-05-15 19:10:09 -05:00
Trevor Turk
fdac12910a elongate campfire deploy steps 2011-12-28 17:33:44 -06:00
Trevor Turk
8004efdd45 update readme 2011-12-16 09:00:46 -06:00
Joshua Peek
a071e4b610 Improve readme 2011-12-15 12:02:40 -06:00
Trevor Turk
77526909f8 add instructions for updating campfire 2011-12-15 10:51:37 -06:00
Joshua Peek
32bc3fb711 Incomplete readme 2011-12-14 16:08:45 -06:00
Joshua Peek
51c6b9eed9 Remove todos 2011-12-14 16:07:42 -06:00
Trevor Turk
bb77066a5b notes 2011-12-14 13:09:21 -06:00
Joshua Peek
fe8df4eb0b Upcase README 2011-12-14 13:02:55 -06:00