emojidex 0.0.10 → 0.0.11

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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -1
  3. data/Gemfile +1 -1
  4. data/Guardfile +26 -1
  5. data/emojidex.gemspec +3 -2
  6. data/lib/emojidex.rb +1 -0
  7. data/lib/emojidex/cache.rb +16 -15
  8. data/lib/emojidex/client.rb +1 -1
  9. data/lib/emojidex/collection_checker.rb +91 -0
  10. data/lib/emojidex/extended.rb +1 -1
  11. data/lib/emojidex/service.rb +3 -3
  12. data/lib/emojidex/utf.rb +2 -2
  13. data/spec/collection_checker_spec.rb +67 -0
  14. data/spec/spec_helper.rb +6 -0
  15. data/spec/support/sample_collections/good/emoji.json +30 -0
  16. data/spec/support/sample_collections/good/mouth.svg +49 -0
  17. data/spec/support/sample_collections/good/nut_and_bolt.svg +372 -0
  18. data/spec/support/sample_collections/good/purple_heart.svg +24 -0
  19. data/spec/support/sample_collections/good/px32/mouth.png +0 -0
  20. data/spec/support/sample_collections/good/px32/nut_and_bolt.png +0 -0
  21. data/spec/support/sample_collections/good/px32/purple_heart.png +0 -0
  22. data/spec/support/sample_collections/good/px32/woman_with_bunny_ears.png +0 -0
  23. data/spec/support/sample_collections/good/woman_with_bunny_ears.svg +90 -0
  24. data/spec/support/sample_collections/missing_assets/emoji.json +30 -0
  25. data/spec/support/sample_collections/missing_assets/mouth.svg +49 -0
  26. data/spec/support/sample_collections/missing_assets/purple_heart.svg +24 -0
  27. data/spec/support/sample_collections/missing_assets/px32/mouth.png +0 -0
  28. data/spec/support/sample_collections/missing_assets/px32/nut_and_bolt.png +0 -0
  29. data/spec/support/sample_collections/missing_assets/px32/woman_with_bunny_ears.png +0 -0
  30. data/spec/support/sample_collections/missing_assets/woman_with_bunny_ears.svg +90 -0
  31. data/spec/support/sample_collections/missing_index/emoji.json +23 -0
  32. data/spec/support/sample_collections/missing_index/mouth.svg +49 -0
  33. data/spec/support/sample_collections/missing_index/nut_and_bolt.svg +372 -0
  34. data/spec/support/sample_collections/missing_index/purple_heart.svg +24 -0
  35. data/spec/support/sample_collections/missing_index/px32/mouth.png +0 -0
  36. data/spec/support/sample_collections/missing_index/px32/nut_and_bolt.png +0 -0
  37. data/spec/support/sample_collections/missing_index/px32/purple_heart.png +0 -0
  38. data/spec/support/sample_collections/missing_index/px32/woman_with_bunny_ears.png +0 -0
  39. data/spec/support/sample_collections/missing_index/woman_with_bunny_ears.svg +90 -0
  40. data/spec/utf_spec.rb +2 -1
  41. metadata +29 -7
  42. data/Rakefile +0 -8
  43. data/spec/support/test1/animation.json +0 -6
  44. data/spec/support/test2/animation.json +0 -6
  45. data/spec/support/test3/animation.json +0 -5
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="レイヤー_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
5
+ y="0px" width="64px" height="64px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">
6
+ <g>
7
+ <g>
8
+ <path fill="none" stroke="#6C007C" stroke-width="4.5343" stroke-miterlimit="10" d="M32,54.346c0,0-16.888-9.531-22.389-21.351
9
+ s0-23.341,10.184-23.341S32,21.474,32,21.474S34.021,9.655,44.205,9.655s15.685,11.521,10.184,23.34
10
+ C48.889,44.814,32,54.346,32,54.346z"/>
11
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="31.9995" y1="2.8848" x2="31.9995" y2="48.213">
12
+ <stop offset="0" style="stop-color:#FFFFFF"/>
13
+ <stop offset="0.5091" style="stop-color:#BD1FFF"/>
14
+ <stop offset="0.6081" style="stop-color:#BE23FF"/>
15
+ <stop offset="0.7089" style="stop-color:#C22FFF"/>
16
+ <stop offset="0.8105" style="stop-color:#C844FF"/>
17
+ <stop offset="0.912" style="stop-color:#D060FF"/>
18
+ <stop offset="1" style="stop-color:#D97FFF"/>
19
+ </linearGradient>
20
+ <path fill="url(#SVGID_1_)" d="M32,54.346c0,0-16.888-9.531-22.389-21.351s0-23.341,10.184-23.341S32,21.474,32,21.474
21
+ S34.021,9.655,44.205,9.655s15.685,11.521,10.184,23.34C48.889,44.814,32,54.346,32,54.346z"/>
22
+ </g>
23
+ </g>
24
+ </svg>
@@ -0,0 +1,90 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 15.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="レイヤー_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
5
+ y="0px" width="64px" height="64px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">
6
+ <polygon fill="#FF9712" stroke="#440C01" stroke-width="2.1893" stroke-miterlimit="10" points="21.143,41.693 21.143,70.026
7
+ 32.81,58.86 "/>
8
+ <path fill="#FF9712" stroke="#440C01" stroke-width="2.1893" stroke-miterlimit="10" d="M36.306,21.797
9
+ c0,0,10.364-2.099,15.432,4.604c5.066,6.702,7.5,32.624,2.333,43.625C43.643,65.693,29.665,34.7,29.665,34.7
10
+ S20.893,24.358,36.306,21.797z"/>
11
+ <path fill="#FF9712" stroke="#440C01" stroke-width="2.1893" stroke-miterlimit="10" d="M29.665,27.344l6.021-5.497
12
+ c0,0-8.464-0.956-12.855,5.497c-9.576,14.069,6.834,27.309,6.834,27.309V27.344z"/>
13
+ <g>
14
+ <g>
15
+ <ellipse fill="#FFB997" cx="36.306" cy="44.604" rx="15.432" ry="16.062"/>
16
+
17
+ <ellipse fill="none" stroke="#420707" stroke-width="2.1893" stroke-miterlimit="10" cx="36.306" cy="44.604" rx="15.432" ry="16.062"/>
18
+ </g>
19
+ <defs>
20
+ <filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="19.779" y="27.446" width="33.053" height="34.313">
21
+
22
+ <feColorMatrix type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" color-interpolation-filters="sRGB" result="source"/>
23
+ </filter>
24
+ </defs>
25
+ <mask maskUnits="userSpaceOnUse" x="19.779" y="27.446" width="33.053" height="34.313" id="SVGID_1_">
26
+ <g filter="url(#Adobe_OpacityMaskFilter)">
27
+
28
+ <image overflow="visible" width="38" height="39" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMA
29
+ EAMCAwYAAAGrAAACAQAAApr/2wCEABALCwsMCxAMDBAXDw0PFxsUEBAUGx8XFxcXFx8eFxoaGhoX
30
+ Hh4jJSclIx4vLzMzLy9AQEBAQEBAQEBAQEBAQEABEQ8PERMRFRISFRQRFBEUGhQWFhQaJhoaHBoa
31
+ JjAjHh4eHiMwKy4nJycuKzU1MDA1NUBAP0BAQEBAQEBAQEBAQP/CABEIACcAJgMBIgACEQEDEQH/
32
+ xACEAAADAQADAAAAAAAAAAAAAAAABQcGAQMEAQEAAAAAAAAAAAAAAAAAAAAAEAABBAICAwEAAAAA
33
+ AAAAAAAFAQIDBAAGMBIQEQcUEQACAQIFAwEJAAAAAAAAAAABAhEAAxAhMcESQQQFgVGh0TJCcqKy
34
+ FBIBAAAAAAAAAAAAAAAAAAAAMP/aAAwDAQACEQMRAAAAn7/qr5PM9a/AQ4bg+pcWsB6eBUY8zIK3
35
+ 4D3MAKgD/9oACAECAAEFAOH/2gAIAQMAAQUA4f/aAAgBAQABBQBEVVEajfIo75xOjS2vXxa5qotC
36
+ JKrWjrRYVHQ3arg6tP8Aznr+jw711svhXeNaKKNI0rsNuHDhmuPqqXVxrBBDZaqP2Pa1hM2zNl+f
37
+ /9oACAECAgY/AB//2gAIAQMCBj8AH//aAAgBAQEGPwCBrXNgbSHTLOpF1p9PhRN1eVofUN8FVxNu
38
+ 3BI6TS20AEDB0dQTBpfGn5WfL7c22q7OvLbEzpFdnEZF+XqjRSOTFtzDbUrowMjB2dwDFL5I6K0j
39
+ 28YI3wH8vb379voBbdveoNQPFd0H6k2bkfrXLyFq7ZWcldGQfkBh/9k=" transform="matrix(1 0 0 1 17 25)">
40
+ </image>
41
+ </g>
42
+ </mask>
43
+ <g opacity="0.42" mask="url(#SVGID_1_)">
44
+ <ellipse fill="#ED032A" cx="36.306" cy="44.604" rx="15.432" ry="16.062"/>
45
+
46
+ <ellipse fill="none" stroke="#ED032A" stroke-width="2.1893" stroke-miterlimit="10" cx="36.306" cy="44.604" rx="15.432" ry="16.062"/>
47
+ </g>
48
+ </g>
49
+ <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-31.9458" y1="44.207" x2="-28.0966" y2="49.6414" gradientTransform="matrix(1 0 0 1 64.1973 0)">
50
+ <stop offset="0" style="stop-color:#FFA67F"/>
51
+ <stop offset="0.0969" style="stop-color:#FF967B"/>
52
+ <stop offset="0.3655" style="stop-color:#FF7170"/>
53
+ <stop offset="0.6143" style="stop-color:#FF5568"/>
54
+ <stop offset="0.8336" style="stop-color:#FF4564"/>
55
+ <stop offset="1" style="stop-color:#FF3F62"/>
56
+ </linearGradient>
57
+ <ellipse fill="url(#SVGID_2_)" cx="33.896" cy="46.529" rx="2.382" ry="2.097"/>
58
+ <g>
59
+ <path fill="#026594" d="M26.551,40.007c-1.163,0-2.134,0.92-2.452,2.175l2.305,0.869l-2.305,0.87
60
+ c0.316,1.255,1.289,2.177,2.452,2.177c1.421,0,2.572-1.362,2.572-3.045S27.972,40.007,26.551,40.007z"/>
61
+ <g>
62
+ <path fill="#026594" d="M42.368,40.007c-1.163,0-2.135,0.919-2.452,2.175l2.305,0.869l-2.305,0.87
63
+ c0.317,1.255,1.289,2.177,2.452,2.177c1.421,0,2.572-1.362,2.572-3.045S43.789,40.007,42.368,40.007z"/>
64
+ </g>
65
+ </g>
66
+ <g>
67
+ <path fill="#FFFFFF" stroke="#DD2C5E" stroke-miterlimit="10" d="M47.521,17.121c-2.946,6.796-7.205,11.496-9.512,10.496
68
+ s-1.789-7.32,1.158-14.117c2.946-6.797,7.639-14.391,9.511-10.497C50.613,7.027,50.467,10.323,47.521,17.121z"/>
69
+ <path fill="#FF5C83" d="M42.419,24.043c-2.164,4.993-3.914,3.794-5.066,3.295c-1.153-0.501-0.334-4.953,1.83-9.944
70
+ c2.164-4.993,4.988-8.856,6.006-8.134C47.973,11.231,44.584,19.05,42.419,24.043z"/>
71
+ </g>
72
+ <path fill="#510811" d="M29.665,54.652c0,0,10.283-1.439,11.032-1.919c0.751-0.481,1.844-0.241,0,1.919
73
+ C38.856,56.81,33.907,60.891,29.665,54.652z"/>
74
+ <g>
75
+ <g>
76
+ <path fill="#FFFFFF" stroke="#DD2C5E" stroke-miterlimit="10" d="M25.884,12.711c2.783,6.865,3.149,13.196,0.82,14.141
77
+ c-2.33,0.946-6.475-3.855-9.257-10.72c-2.784-6.865-2.763-11.695,1.328-10.3C23,7.271,23.101,5.846,25.884,12.711z"/>
78
+ <path fill="#FF5C83" d="M27.246,21.202c2.044,5.043-0.037,5.452-1.2,5.923c-1.166,0.472-3.767-3.233-5.811-8.275
79
+ c-2.046-5.043-2.821-9.766-1.593-9.985C22,8.262,25.202,16.159,27.246,21.202z"/>
80
+ </g>
81
+ <path fill="#FFFFFF" stroke="#DD2C5E" stroke-miterlimit="10" d="M11.795,8.981c-1.587,4.147,0.591,11.505,4.963,8.397
82
+ c4.372-3.107,5.584-7.001,5.654-9.606l1.362,0.47c0,0-2.96-5.368-5.547-4.249S13.14,5.468,11.795,8.981z"/>
83
+ </g>
84
+ <path fill="#FFFFFF" stroke="#DD2C5E" stroke-width="1.267" stroke-miterlimit="10" d="M17.838,36.391c0,0,5.243-7.266,13.575-8.528
85
+ c7.949-1.204,15.121,2.214,19.425,9.338c0,0-2.348-16.99-20.179-14.969C23.203,23.078,19.948,28.074,17.838,36.391z"/>
86
+ <path fill="#FF9712" stroke="#440C01" stroke-width="2.1893" stroke-miterlimit="10" d="M26.611,28.15
87
+ c17.624,10.772,19.031,11.857,26.031,16.454C52.643,44.604,49.45,20.409,26.611,28.15z"/>
88
+ <path fill="#FF9712" stroke="#440C01" stroke-width="2.1893" stroke-miterlimit="10" d="M20.889,48.626
89
+ c0,0-1.315-12.793,9.771-18.115c0,0-7.353-4.388-10.283,0.423C16.331,37.575,17.587,43.019,20.889,48.626z"/>
90
+ </svg>
data/spec/utf_spec.rb CHANGED
@@ -55,7 +55,8 @@ describe Emojidex::UTF do
55
55
  describe '.cache!' do
56
56
  it 'caches emoji to local storage cache' do
57
57
  tmp_cache_path = File.expand_path('../support/tmpcache', __FILE__)
58
- utf.cache!(cache_dir: tmp_cache_path)
58
+ utf.cache!(cache_path: tmp_cache_path)
59
+ expect(ENV['EMOJI_CACHE']).to eq(utf.cache_path)
59
60
  expect(File.exist? tmp_cache_path).to be_truthy
60
61
  expect(File.exist? tmp_cache_path + '/sushi.svg').to be_truthy
61
62
  expect(File.exist? tmp_cache_path + '/emoji.json').to be_truthy
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emojidex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rei Kagetsuki
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-07-16 00:00:00.000000000 Z
14
+ date: 2014-07-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday
@@ -55,7 +55,6 @@ files:
55
55
  - Gemfile
56
56
  - Guardfile
57
57
  - README.md
58
- - Rakefile
59
58
  - emoji/categories.json
60
59
  - emojidex.gemspec
61
60
  - lib/emojidex.rb
@@ -67,6 +66,7 @@ files:
67
66
  - lib/emojidex/category.rb
68
67
  - lib/emojidex/client.rb
69
68
  - lib/emojidex/collection.rb
69
+ - lib/emojidex/collection_checker.rb
70
70
  - lib/emojidex/defaults.rb
71
71
  - lib/emojidex/emoji.rb
72
72
  - lib/emojidex/error.rb
@@ -78,6 +78,7 @@ files:
78
78
  - spec/api/search/emoji_spec.rb
79
79
  - spec/categories_spec.rb
80
80
  - spec/client_spec.rb
81
+ - spec/collection_checker_spec.rb
81
82
  - spec/emoji_spec.rb
82
83
  - spec/extended_spec.rb
83
84
  - spec/spec_helper.rb
@@ -106,9 +107,31 @@ files:
106
107
  - spec/support/fixtures/search_emoji.json
107
108
  - spec/support/fixtures/single_emoji.json
108
109
  - spec/support/fixtures/single_emoji_detailed.json
109
- - spec/support/test1/animation.json
110
- - spec/support/test2/animation.json
111
- - spec/support/test3/animation.json
110
+ - spec/support/sample_collections/good/emoji.json
111
+ - spec/support/sample_collections/good/mouth.svg
112
+ - spec/support/sample_collections/good/nut_and_bolt.svg
113
+ - spec/support/sample_collections/good/purple_heart.svg
114
+ - spec/support/sample_collections/good/px32/mouth.png
115
+ - spec/support/sample_collections/good/px32/nut_and_bolt.png
116
+ - spec/support/sample_collections/good/px32/purple_heart.png
117
+ - spec/support/sample_collections/good/px32/woman_with_bunny_ears.png
118
+ - spec/support/sample_collections/good/woman_with_bunny_ears.svg
119
+ - spec/support/sample_collections/missing_assets/emoji.json
120
+ - spec/support/sample_collections/missing_assets/mouth.svg
121
+ - spec/support/sample_collections/missing_assets/purple_heart.svg
122
+ - spec/support/sample_collections/missing_assets/px32/mouth.png
123
+ - spec/support/sample_collections/missing_assets/px32/nut_and_bolt.png
124
+ - spec/support/sample_collections/missing_assets/px32/woman_with_bunny_ears.png
125
+ - spec/support/sample_collections/missing_assets/woman_with_bunny_ears.svg
126
+ - spec/support/sample_collections/missing_index/emoji.json
127
+ - spec/support/sample_collections/missing_index/mouth.svg
128
+ - spec/support/sample_collections/missing_index/nut_and_bolt.svg
129
+ - spec/support/sample_collections/missing_index/purple_heart.svg
130
+ - spec/support/sample_collections/missing_index/px32/mouth.png
131
+ - spec/support/sample_collections/missing_index/px32/nut_and_bolt.png
132
+ - spec/support/sample_collections/missing_index/px32/purple_heart.png
133
+ - spec/support/sample_collections/missing_index/px32/woman_with_bunny_ears.png
134
+ - spec/support/sample_collections/missing_index/woman_with_bunny_ears.svg
112
135
  - spec/utf_spec.rb
113
136
  homepage: http://developer.emojidex.com
114
137
  licenses:
@@ -135,4 +158,3 @@ signing_key:
135
158
  specification_version: 4
136
159
  summary: emojidex Ruby tools
137
160
  test_files: []
138
- has_rdoc:
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- require 'rake'
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task :default => :spec
@@ -1,6 +0,0 @@
1
- {
2
- "name": "test1",
3
- "oneshot": false,
4
- "order": [0, 1, 2, 3, 4, 5],
5
- "delay": [0.1, 0.2, 0.3, 0.4, 0.5]
6
- }
@@ -1,6 +0,0 @@
1
- {
2
- "name": "test2",
3
- "oneshot": false,
4
- "order": [0, 1, 2, 3],
5
- "delay": 0.9
6
- }
@@ -1,5 +0,0 @@
1
- {
2
- "name": "test3",
3
- "oneshot": false,
4
- "order": [0, 1, 2, 3, 4, 5, 6, 7]
5
- }