emojidex 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +11 -10
- data/.rspec +2 -0
- data/.rubocop.yml +11 -0
- data/.travis.yml +17 -0
- data/Gemfile +16 -10
- data/Guardfile +12 -0
- data/README.md +27 -5
- data/Rakefile +6 -32
- data/emoji/categories.json +64 -0
- data/emojidex.gemspec +13 -20
- data/lib/emojidex.rb +9 -4
- data/lib/emojidex/api/categories.rb +16 -0
- data/lib/emojidex/api/emoji.rb +26 -0
- data/lib/emojidex/api/search/emoji.rb +16 -0
- data/lib/emojidex/cache.rb +69 -0
- data/lib/emojidex/categories.rb +32 -0
- data/lib/emojidex/category.rb +14 -0
- data/lib/emojidex/client.rb +60 -0
- data/lib/emojidex/collection.rb +119 -0
- data/lib/emojidex/defaults.rb +13 -0
- data/lib/emojidex/emoji.rb +74 -0
- data/lib/emojidex/error.rb +15 -0
- data/lib/emojidex/extended.rb +15 -0
- data/lib/emojidex/service.rb +32 -0
- data/lib/emojidex/utf.rb +15 -0
- data/spec/api/categories_spec.rb +49 -0
- data/spec/api/emoji_spec.rb +89 -0
- data/spec/api/search/emoji_spec.rb +30 -0
- data/spec/categories_spec.rb +18 -0
- data/spec/client_spec.rb +24 -0
- data/spec/emoji_spec.rb +63 -0
- data/spec/extended_spec.rb +107 -0
- data/spec/spec_helper.rb +64 -0
- data/spec/support/Genshin.svg +126 -0
- data/spec/support/couple_kiss/0.svg +177 -0
- data/spec/support/couple_kiss/1.svg +177 -0
- data/spec/support/couple_kiss/10.svg +293 -0
- data/spec/support/couple_kiss/11.svg +235 -0
- data/spec/support/couple_kiss/12.svg +235 -0
- data/spec/support/couple_kiss/13.svg +235 -0
- data/spec/support/couple_kiss/14.svg +177 -0
- data/spec/support/couple_kiss/15.svg +177 -0
- data/spec/support/couple_kiss/2.svg +177 -0
- data/spec/support/couple_kiss/3.svg +235 -0
- data/spec/support/couple_kiss/4.svg +235 -0
- data/spec/support/couple_kiss/5.svg +235 -0
- data/spec/support/couple_kiss/6.svg +293 -0
- data/spec/support/couple_kiss/7.svg +235 -0
- data/spec/support/couple_kiss/8.svg +235 -0
- data/spec/support/couple_kiss/9.svg +235 -0
- data/spec/support/couple_kiss/animation.json +14 -0
- data/spec/support/fixtures/categories.json +14 -0
- data/spec/support/fixtures/category.json +5 -0
- data/spec/support/fixtures/emoji.json +28 -0
- data/spec/support/fixtures/emoji_detailed.json +41 -0
- data/spec/support/fixtures/search_emoji.json +21 -0
- data/spec/support/fixtures/single_emoji.json +19 -0
- data/spec/support/fixtures/single_emoji_detailed.json +30 -0
- data/spec/support/test1/animation.json +6 -0
- data/spec/support/test2/animation.json +6 -0
- data/spec/support/test3/animation.json +5 -0
- data/spec/utf_spec.rb +66 -0
- metadata +82 -104
- data/app/assets/images/emojidex/.keep +0 -0
- data/app/assets/images/emojidex/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/emojidex/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/emojidex/application.js +0 -14
- data/app/assets/javascripts/emojidex/bootstrap.min.js +0 -7
- data/app/assets/javascripts/emojidex/cheat_sheet.js +0 -12
- data/app/assets/javascripts/emojidex/poe_pallet.js +0 -71
- data/app/assets/stylesheets/emojidex/application.css +0 -15
- data/app/assets/stylesheets/emojidex/bootstrap-responsive.min.css +0 -9
- data/app/assets/stylesheets/emojidex/bootstrap.min.css +0 -9
- data/app/assets/stylesheets/emojidex/cheat_sheet.css +0 -41
- data/app/controllers/emojidex/application_controller.rb +0 -7
- data/app/controllers/emojidex/cheat_sheet_controller.rb +0 -50
- data/app/helpers/emojidex/application_helper.rb +0 -4
- data/app/helpers/emojidex/cheat_sheet_helper.rb +0 -4
- data/app/views/emojidex/cheat_sheet/index.html.erb +0 -58
- data/app/views/layouts/emojidex/application.html.erb +0 -14
- data/bin/rails +0 -8
- data/config/routes.rb +0 -5
- data/lib/emojidex/engine.rb +0 -5
- data/lib/emojidex/version.rb +0 -3
- data/lib/generators/emojidex/install/install_generator.rb +0 -35
- data/lib/tasks/emojidex_tasks.rake +0 -4
- data/test/controllers/emojidex/cheat_sheet_controller_test.rb +0 -11
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/Rakefile +0 -6
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/assets/stylesheets/application.css +0 -13
- data/test/dummy/app/controllers/application_controller.rb +0 -5
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/mailers/.keep +0 -0
- data/test/dummy/app/models/.keep +0 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +0 -14
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/config.ru +0 -4
- data/test/dummy/config/application.rb +0 -23
- data/test/dummy/config/boot.rb +0 -5
- data/test/dummy/config/database.yml +0 -25
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -29
- data/test/dummy/config/environments/production.rb +0 -80
- data/test/dummy/config/environments/test.rb +0 -36
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/secret_token.rb +0 -12
- data/test/dummy/config/initializers/session_store.rb +0 -3
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -23
- data/test/dummy/config/routes.rb +0 -4
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +0 -58
- data/test/dummy/public/422.html +0 -58
- data/test/dummy/public/500.html +0 -57
- data/test/dummy/public/favicon.ico +0 -0
- data/test/emojidex_test.rb +0 -7
- data/test/helpers/emojidex/cheat_sheet_helper_test.rb +0 -6
- data/test/integration/navigation_test.rb +0 -10
- data/test/test_helper.rb +0 -15
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
require_dependency "emojidex/application_controller"
|
|
2
|
-
|
|
3
|
-
module Emojidex
|
|
4
|
-
class CheatSheetController < ApplicationController
|
|
5
|
-
before_filter :init_datas
|
|
6
|
-
|
|
7
|
-
def init_datas
|
|
8
|
-
@poe_index = Emojidex::ApplicationController::POE_INDEX
|
|
9
|
-
@categories = Array.new
|
|
10
|
-
@divided_emojis = Array.new
|
|
11
|
-
set_categories
|
|
12
|
-
set_divided_emojis
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def index
|
|
16
|
-
@path = '/assets/poe/png64/'
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def set_categories
|
|
20
|
-
@poe_index.each do |item|
|
|
21
|
-
@categories << item['category'] if !@categories.include?(item['category'])
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def set_divided_emojis
|
|
26
|
-
@categories.each do |category|
|
|
27
|
-
emojis = Array.new
|
|
28
|
-
@poe_index.each do |emoji|
|
|
29
|
-
if category == emoji['category']
|
|
30
|
-
emojis << emoji
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
@divided_emojis << emojis
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def poe_divided_emojis
|
|
38
|
-
respond_to do |format|
|
|
39
|
-
format.json {render :json => @divided_emojis}
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
def poe_categories
|
|
44
|
-
respond_to do |format|
|
|
45
|
-
format.json {render :json => @categories}
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
end
|
|
50
|
-
end
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
<% for i in 0..@categories.size - 1 %>
|
|
3
|
-
<% @divided_emojis[i].each do |item| %>
|
|
4
|
-
set_index('<%= item['name'] %>')
|
|
5
|
-
<% end %>
|
|
6
|
-
<% end %>
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<div class="container">
|
|
10
|
-
<div class="row-fluid">
|
|
11
|
-
<div class="span12">
|
|
12
|
-
<div class="row-fluid">
|
|
13
|
-
<h2 class="text-center">Phantom Open Emoji Cheat Sheet</h2>
|
|
14
|
-
</div>
|
|
15
|
-
<hr style="border-style:solid;">
|
|
16
|
-
|
|
17
|
-
<div class="row-fluid text-center">
|
|
18
|
-
<input type="text" id="emoji_name">
|
|
19
|
-
<input type="image" id="tooltip" src="/assets/poe/png20/grinning.png"
|
|
20
|
-
data-html="true" data-ttoggle="popover" data-placement="bottom" data-animation="false">
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<div class="row-fluid">
|
|
24
|
-
<div class="span12">
|
|
25
|
-
|
|
26
|
-
<% @categories.each_with_index do |category, i| %>
|
|
27
|
-
<div class="row-fluid">
|
|
28
|
-
<h3><%= category %></h3>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="row-fluid">
|
|
31
|
-
|
|
32
|
-
<% @divided_emojis[i].each_with_index do |item, j| %>
|
|
33
|
-
<% if j % 2 == 0 and j != 0 %>
|
|
34
|
-
</div>
|
|
35
|
-
<div class="row-fluid mt-l">
|
|
36
|
-
<% end %>
|
|
37
|
-
<div class="span6">
|
|
38
|
-
<div class="span2">
|
|
39
|
-
<%= image_tag @path + item['name'] + '.png' %>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="span10">
|
|
42
|
-
<p class="icon-name">
|
|
43
|
-
:<%= item['name'] %>:
|
|
44
|
-
</p>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
<% end %>
|
|
48
|
-
|
|
49
|
-
</div>
|
|
50
|
-
<hr style="border-style:dashed;">
|
|
51
|
-
<% end %>
|
|
52
|
-
|
|
53
|
-
<hr style="border-style:solid;">
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>Emojidex</title>
|
|
5
|
-
<%= stylesheet_link_tag "emojidex/application", media: "all" %>
|
|
6
|
-
<%= javascript_include_tag "emojidex/application" %>
|
|
7
|
-
<%= csrf_meta_tags %>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
|
|
11
|
-
<%= yield %>
|
|
12
|
-
|
|
13
|
-
</body>
|
|
14
|
-
</html>
|
data/bin/rails
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
|
|
3
|
-
|
|
4
|
-
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
|
5
|
-
ENGINE_PATH = File.expand_path('../../lib/emojidex/engine', __FILE__)
|
|
6
|
-
|
|
7
|
-
require 'rails/all'
|
|
8
|
-
require 'rails/engine/commands'
|
data/config/routes.rb
DELETED
data/lib/emojidex/engine.rb
DELETED
data/lib/emojidex/version.rb
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
require 'rails/generators'
|
|
2
|
-
require 'highline/import'
|
|
3
|
-
require 'bundler'
|
|
4
|
-
require 'bundler/cli'
|
|
5
|
-
|
|
6
|
-
module Emojidex
|
|
7
|
-
class InstallGenerator < Rails::Generators::Base
|
|
8
|
-
|
|
9
|
-
def notify_about_routes
|
|
10
|
-
insert_into_file File.join('config', 'routes.rb'), :after => "Application.routes.draw do\n" do
|
|
11
|
-
%Q{
|
|
12
|
-
mount Emojidex::Engine, :at => '/poe'
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
unless options[:quiet]
|
|
18
|
-
puts "*" * 50
|
|
19
|
-
puts "We added the following line to your application's config/routes.rb file:"
|
|
20
|
-
puts " "
|
|
21
|
-
puts " mount Emojidex::Engine, :at => '/poe'"
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def complete
|
|
26
|
-
unless options[:quiet]
|
|
27
|
-
puts "*" * 50
|
|
28
|
-
puts "Emojidex has been installed successfully. You're all ready to go!"
|
|
29
|
-
puts " "
|
|
30
|
-
puts "(、´・ω・)▄︻┻┳═一 Σ==!Enjoy!>"
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
end
|
|
35
|
-
end
|
data/test/dummy/README.rdoc
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
== README
|
|
2
|
-
|
|
3
|
-
This README would normally document whatever steps are necessary to get the
|
|
4
|
-
application up and running.
|
|
5
|
-
|
|
6
|
-
Things you may want to cover:
|
|
7
|
-
|
|
8
|
-
* Ruby version
|
|
9
|
-
|
|
10
|
-
* System dependencies
|
|
11
|
-
|
|
12
|
-
* Configuration
|
|
13
|
-
|
|
14
|
-
* Database creation
|
|
15
|
-
|
|
16
|
-
* Database initialization
|
|
17
|
-
|
|
18
|
-
* How to run the test suite
|
|
19
|
-
|
|
20
|
-
* Services (job queues, cache servers, search engines, etc.)
|
|
21
|
-
|
|
22
|
-
* Deployment instructions
|
|
23
|
-
|
|
24
|
-
* ...
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Please feel free to use a different markup language if you do not plan to run
|
|
28
|
-
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
DELETED
|
File without changes
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
|
2
|
-
// listed below.
|
|
3
|
-
//
|
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
|
6
|
-
//
|
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
8
|
-
// compiled file.
|
|
9
|
-
//
|
|
10
|
-
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
|
11
|
-
// about supported directives.
|
|
12
|
-
//
|
|
13
|
-
//= require_tree .
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
-
* listed below.
|
|
4
|
-
*
|
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
|
7
|
-
*
|
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
|
9
|
-
* compiled file, but it's generally better to create a new file per style scope.
|
|
10
|
-
*
|
|
11
|
-
*= require_self
|
|
12
|
-
*= require_tree .
|
|
13
|
-
*/
|
|
File without changes
|
|
File without changes
|
data/test/dummy/app/models/.keep
DELETED
|
File without changes
|
|
File without changes
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>Dummy</title>
|
|
5
|
-
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
|
|
6
|
-
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
|
|
7
|
-
<%= csrf_meta_tags %>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
|
|
11
|
-
<%= yield %>
|
|
12
|
-
|
|
13
|
-
</body>
|
|
14
|
-
</html>
|
data/test/dummy/bin/bundle
DELETED
data/test/dummy/bin/rails
DELETED
data/test/dummy/bin/rake
DELETED
data/test/dummy/config.ru
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
|
2
|
-
|
|
3
|
-
require 'rails/all'
|
|
4
|
-
|
|
5
|
-
Bundler.require(*Rails.groups)
|
|
6
|
-
require "emojidex"
|
|
7
|
-
|
|
8
|
-
module Dummy
|
|
9
|
-
class Application < Rails::Application
|
|
10
|
-
# Settings in config/environments/* take precedence over those specified here.
|
|
11
|
-
# Application configuration should go into files in config/initializers
|
|
12
|
-
# -- all .rb files in that directory are automatically loaded.
|
|
13
|
-
|
|
14
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
15
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
16
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
|
17
|
-
|
|
18
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
|
19
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
|
20
|
-
# config.i18n.default_locale = :de
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
data/test/dummy/config/boot.rb
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# SQLite version 3.x
|
|
2
|
-
# gem install sqlite3
|
|
3
|
-
#
|
|
4
|
-
# Ensure the SQLite 3 gem is defined in your Gemfile
|
|
5
|
-
# gem 'sqlite3'
|
|
6
|
-
development:
|
|
7
|
-
adapter: sqlite3
|
|
8
|
-
database: db/development.sqlite3
|
|
9
|
-
pool: 5
|
|
10
|
-
timeout: 5000
|
|
11
|
-
|
|
12
|
-
# Warning: The database defined as "test" will be erased and
|
|
13
|
-
# re-generated from your development database when you run "rake".
|
|
14
|
-
# Do not set this db to the same as development or production.
|
|
15
|
-
test:
|
|
16
|
-
adapter: sqlite3
|
|
17
|
-
database: db/test.sqlite3
|
|
18
|
-
pool: 5
|
|
19
|
-
timeout: 5000
|
|
20
|
-
|
|
21
|
-
production:
|
|
22
|
-
adapter: sqlite3
|
|
23
|
-
database: db/production.sqlite3
|
|
24
|
-
pool: 5
|
|
25
|
-
timeout: 5000
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
Dummy::Application.configure do
|
|
2
|
-
# Settings specified here will take precedence over those in config/application.rb.
|
|
3
|
-
|
|
4
|
-
# In the development environment your application's code is reloaded on
|
|
5
|
-
# every request. This slows down response time but is perfect for development
|
|
6
|
-
# since you don't have to restart the web server when you make code changes.
|
|
7
|
-
config.cache_classes = false
|
|
8
|
-
|
|
9
|
-
# Do not eager load code on boot.
|
|
10
|
-
config.eager_load = false
|
|
11
|
-
|
|
12
|
-
# Show full error reports and disable caching.
|
|
13
|
-
config.consider_all_requests_local = true
|
|
14
|
-
config.action_controller.perform_caching = false
|
|
15
|
-
|
|
16
|
-
# Don't care if the mailer can't send.
|
|
17
|
-
config.action_mailer.raise_delivery_errors = false
|
|
18
|
-
|
|
19
|
-
# Print deprecation notices to the Rails logger.
|
|
20
|
-
config.active_support.deprecation = :log
|
|
21
|
-
|
|
22
|
-
# Raise an error on page load if there are pending migrations
|
|
23
|
-
config.active_record.migration_error = :page_load
|
|
24
|
-
|
|
25
|
-
# Debug mode disables concatenation and preprocessing of assets.
|
|
26
|
-
# This option may cause significant delays in view rendering with a large
|
|
27
|
-
# number of complex assets.
|
|
28
|
-
config.assets.debug = true
|
|
29
|
-
end
|