gemojione 2.2.1 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6c31aa7fe7b8ee92277a07b465403cbc159c873e
4
+ data.tar.gz: 6e0dc67f99b2531b1e7024c8b6e9e1ce6fc1492e
5
+ SHA512:
6
+ metadata.gz: 2b453b7ddde4b2bb5f606d4fcce10753f7fe16ff0562ae81b0076cb7a3c31a17746fb7471d3961d73e834584e0c32a75dd7f4c13cda9eb997a260673e901cd67
7
+ data.tar.gz: 07fca85512fc137ce078990b7e192e027ccf11c2c1e65a1953e06ac2c3593d1c7787827c1ef399ae598fd5118ba9e9a0054c78a2c3bf8a73e39f677eb40b695a
@@ -4,6 +4,8 @@ rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
6
  - 2.1.0
7
+ - 2.2.5
8
+ - 2.3.1
7
9
  - jruby-19mode
8
10
  - rbx-2
9
11
  - ruby-head
data/README.md CHANGED
@@ -76,7 +76,7 @@ You can also serve the assets directly from the gem in your rails app:
76
76
 
77
77
  ```ruby
78
78
  # config/application.rb
79
- config.assets.paths << Gemojione::Index.images_path
79
+ config.assets.paths << Gemojione.index.images_path
80
80
  config.assets.precompile << "emoji/*.png"
81
81
  ```
82
82
 
@@ -116,6 +116,8 @@ gem 'escape_utils'
116
116
  ```
117
117
  ## Contributors: :heart:
118
118
 
119
+ This gem is a former fork of the [emoji](https://github.com/wpeterson/emoji) gem that has been adapted for EmojiOne.
120
+
119
121
  * [@ryan-orr](https://github.com/ryan-orr): Granted the official `emoji` rubygems account
120
122
  * [@mikowitz](https://github.com/mikowitz): `String` ext helpers
121
123
  * [@semanticart](https://github.com/semanticart): Cleanup/Ruby 1.9.3 support
@@ -8,6 +8,7 @@ module Gemojione
8
8
 
9
9
  @emoji_by_name = {}
10
10
  @emoji_by_moji = {}
11
+ @emoji_by_ascii = {}
11
12
 
12
13
  emoji_list.each do |key, emoji_hash|
13
14
 
@@ -20,6 +21,10 @@ module Gemojione
20
21
  @emoji_by_name[aliased] = emoji_hash if aliased
21
22
  end
22
23
 
24
+ emoji_hash['aliases_ascii'].each do |emoji_ascii|
25
+ @emoji_by_ascii[emoji_ascii] = emoji_hash if emoji_ascii
26
+ end
27
+
23
28
  moji = emoji_hash['moji']
24
29
  @emoji_by_moji[moji] = emoji_hash if moji
25
30
  end
@@ -34,6 +39,10 @@ module Gemojione
34
39
  @emoji_by_name[name]
35
40
  end
36
41
 
42
+ def find_by_ascii(ascii)
43
+ @emoji_by_ascii[ascii]
44
+ end
45
+
37
46
  def unicode_moji_regex
38
47
  @emoji_moji_regex
39
48
  end
@@ -1,3 +1,3 @@
1
1
  module Gemojione
2
- VERSION = "2.2.1"
2
+ VERSION = "2.3.0"
3
3
  end
@@ -17,6 +17,12 @@ describe Gemojione::Index do
17
17
  end
18
18
  end
19
19
 
20
+ describe 'find by ascii' do
21
+ it 'returns the heart emoji' do
22
+ assert index.find_by_ascii('<3')['unicode'] == "2764"
23
+ end
24
+ end
25
+
20
26
  describe "unicode_moji_regex" do
21
27
  it "should return complex moji regex" do
22
28
  regex = index.unicode_moji_regex
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemojione
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
5
- prerelease:
4
+ version: 2.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Steve Klabnik
@@ -11,28 +10,25 @@ authors:
11
10
  autorequire:
12
11
  bindir: bin
13
12
  cert_chain: []
14
- date: 2016-02-11 00:00:00.000000000 Z
13
+ date: 2016-05-15 00:00:00.000000000 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: json
18
17
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
18
  requirements:
21
- - - ! '>='
19
+ - - '>='
22
20
  - !ruby/object:Gem::Version
23
21
  version: '0'
24
22
  type: :runtime
25
23
  prerelease: false
26
24
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
25
  requirements:
29
- - - ! '>='
26
+ - - '>='
30
27
  - !ruby/object:Gem::Version
31
28
  version: '0'
32
29
  - !ruby/object:Gem::Dependency
33
30
  name: bundler
34
31
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
32
  requirements:
37
33
  - - ~>
38
34
  - !ruby/object:Gem::Version
@@ -40,7 +36,6 @@ dependencies:
40
36
  type: :development
41
37
  prerelease: false
42
38
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
39
  requirements:
45
40
  - - ~>
46
41
  - !ruby/object:Gem::Version
@@ -48,33 +43,29 @@ dependencies:
48
43
  - !ruby/object:Gem::Dependency
49
44
  name: rake
50
45
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
46
  requirements:
53
- - - ! '>='
47
+ - - '>='
54
48
  - !ruby/object:Gem::Version
55
49
  version: '0'
56
50
  type: :development
57
51
  prerelease: false
58
52
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
53
  requirements:
61
- - - ! '>='
54
+ - - '>='
62
55
  - !ruby/object:Gem::Version
63
56
  version: '0'
64
57
  - !ruby/object:Gem::Dependency
65
58
  name: minitest
66
59
  requirement: !ruby/object:Gem::Requirement
67
- none: false
68
60
  requirements:
69
- - - ! '>='
61
+ - - '>='
70
62
  - !ruby/object:Gem::Version
71
63
  version: '0'
72
64
  type: :development
73
65
  prerelease: false
74
66
  version_requirements: !ruby/object:Gem::Requirement
75
- none: false
76
67
  requirements:
77
- - - ! '>='
68
+ - - '>='
78
69
  - !ruby/object:Gem::Version
79
70
  version: '0'
80
71
  description: A gem for EmojiOne
@@ -1828,27 +1819,26 @@ files:
1828
1819
  homepage: http://github.com/jonathanwiesel/gemojione
1829
1820
  licenses:
1830
1821
  - MIT
1822
+ metadata: {}
1831
1823
  post_install_message:
1832
1824
  rdoc_options: []
1833
1825
  require_paths:
1834
1826
  - lib
1835
1827
  required_ruby_version: !ruby/object:Gem::Requirement
1836
- none: false
1837
1828
  requirements:
1838
- - - ! '>='
1829
+ - - '>='
1839
1830
  - !ruby/object:Gem::Version
1840
1831
  version: '0'
1841
1832
  required_rubygems_version: !ruby/object:Gem::Requirement
1842
- none: false
1843
1833
  requirements:
1844
- - - ! '>='
1834
+ - - '>='
1845
1835
  - !ruby/object:Gem::Version
1846
1836
  version: '0'
1847
1837
  requirements: []
1848
1838
  rubyforge_project:
1849
- rubygems_version: 1.8.23.2
1839
+ rubygems_version: 2.0.3
1850
1840
  signing_key:
1851
- specification_version: 3
1841
+ specification_version: 4
1852
1842
  summary: A gem for EmojiOne
1853
1843
  test_files:
1854
1844
  - test/gemojione_test.rb