Better support for custom emoji source path #99
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi
Let's start with some history, actually your history ...
#73 (comment)
#51 (comment)
as you see people have problems with something ridiculous called "emoji" directory appended to every thing by default and without any possible way to disable it 👎 even with this little (actually nothing) option:
I went into this problem too (are you surprised?), I googled and then read your entire issue list only to find out this problem existed for 3 years and you just said:
after this reply I understood that no maintainer gives a damn about this problem. So I moved on to fix this by myself (I had 0% knowledge of Ruby this morning, I might have 5% now).
Now lets see what causes this PAIN IN THE ASS:
filter_with_emoji function is the key function here:
filter_with_emoji uses html pipeline gem, the "emoji" directory is appended by this module
file: https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/emoji_filter.rb
if you didn't/can't find your sins (yes, its your mistake) in the above code, let me guide you:
I guess when you were busy writing jemoji, you saw this line and told yourselves:
😄 YEAH NOTHING ...
Exceptionally brilliant way of reading source docs, if it's optional then why should I even bother myself looking at what it does?
Let's see what's wrong:
now you see this right? if you don't provide the :asseth_path, pipeline will append "emoji" to filenames,
and your brilliant way for "Customizing" as explained in README.md is useless as hell because no one can simply serve any emoji from a CDN like https://cdn.jsdelivr.net/emojione/assets/3.0/png/32/1f600.png
Now, I (some random guy with 0% Ruby knowledge) had fixed this in 1 day (the same thing you didn't give a damn for 3 years).
I have fixed it in a way that it won't break current installations, and let people get rid of "emoji" directory, by a simple new keyword called "asset":
backward compatibility ensures if user doesn't define "asset", or "emoji" at all, "emoji" directory will appended and this won't break anything (something you should know about me is that I don't like testing, so if I were you, I wouldn't trust this)
and I didn't touch README.md because I suck at English, someone else with proper grammar understanding should edit and update it.
Best,
Mahdi
(Oh, I was about to forget apologizing for being a bit salty and flaming you in this message. Sorry)