diff --git a/.gitignore b/.gitignore index 40b89d2..cce1fd7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /bin/* -!/bin/gemoji .bundle .ruby-version Gemfile.lock diff --git a/README.md b/README.md index ea0c257..4f43828 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 -------------------- diff --git a/bin/gemoji b/bin/gemoji deleted file mode 100755 index fe62da7..0000000 --- a/bin/gemoji +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ruby -require 'emoji/cli' - -exit_code = Emoji::CLI.dispatch(ARGV) -exit exit_code diff --git a/gemoji.gemspec b/gemoji.gemspec index e1b4cd3..43200c3 100644 --- a/gemoji.gemspec +++ b/gemoji.gemspec @@ -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' @@ -14,8 +13,7 @@ Gem::Specification.new do |s| s.files = Dir[ "README.md", - "bin/gemoji", - "images/*.png", + "LICENSE", "db/emoji.json", "lib/**/*.rb", ] diff --git a/lib/emoji.rb b/lib/emoji.rb index eb02ae0..cb4b62a 100644 --- a/lib/emoji.rb +++ b/lib/emoji.rb @@ -11,10 +11,6 @@ module Emoji 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 = [] diff --git a/lib/emoji/cli.rb b/lib/emoji/cli.rb deleted file mode 100644 index 33c127a..0000000 --- a/lib/emoji/cli.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -require 'fileutils' -require 'optparse' - -module Emoji - module CLI - extend self - - InvalidUsage = Class.new(RuntimeError) - - def dispatch(argv) - cmd = argv[0] - argv = argv[1..-1] - - case cmd - when "extract" - public_send(cmd, argv) - when "help", "--help", "-h" - help - else - raise InvalidUsage - end - - return 0 - rescue InvalidUsage, OptionParser::InvalidArgument, OptionParser::InvalidOption => err - unless err.message == err.class.to_s - $stderr.puts err.message - $stderr.puts - end - $stderr.puts usage_text - return 1 - end - - def help - puts usage_text - end - - def extract(argv) - # OptionParser.new do |opts| - # opts.on("--size=64", Integer) do |size| - # end.parse!(argv) - - raise InvalidUsage unless argv.size == 1 - path = argv[0] - - Dir["#{Emoji.images_path}/*.png"].each do |png| - FileUtils.cp(png, File.join(path, File.basename(png))) - end - end - - def usage_text - < -EOF - end - end -end