On Tue, Jun 11, 2013 at 11:45 AM, Per Andersson <[email protected]> wrote:

> I also found that the rubygem gemoji is "Copyright All Rights Reserved" and
> hence not free software.
>
>     https://github.com/github/gemoji/blob/master/LICENSE
>
> This means that we have options
>
> 1. Just don't use gemoji with gitlab in Debian,
>

This should be fairly easy, we could patch-out this code in markdown.rb:

    # Private: Checks if an emoji icon exists in the image asset directory


    #


    # emoji - Identifier of the emoji as a string (e.g., "+1", "heart")


    #


    # Returns boolean


    def valid_emoji?(emoji)
      Emoji.names.include? emoji
    end


> 2. distribute ruby-gemoji in non-free, which means that gitlab must be
> in contrib,
>    (since it depends on non-free software but is free itself), or
>

No, it's already too complicated.


> 3. repackage gemoji to exclude the non-free images, maybe replacing them
> with
>    free ones,
>

That's nice pet project nobody would have time to do :)

4. something entirely else. Hack gitlab to output Unicode-characters
> instead?


This might be doable by replacing:

    def parse_emoji(text)
      # parse emoji


      text.gsub!(EMOJI_PATTERN) do |match|
        if valid_emoji?($2)
          image_tag(url_to_image("emoji/#{$2}.png"), class: 'emoji', title:
$1, alt: $1, size: "20x20")
        else
          match
        end
      end
    end

with the code which would use unicode characters where it make sense and
the unicode character exists (http://www.emoji-cheat-sheet.com/) instead of
using emoji.

O.
-- 
Ondřej Surý <[email protected]>

Reply via email to