rails_emoji 1.1 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,12 +1,17 @@
1
1
  # [Emoji](http://www.emoji-cheat-sheet.com/) for Ruby on Rails
2
2
 
3
+ ![:kiss:](https://github.com/jsw0528/rails_emoji/raw/master/vendor/assets/images/emojis/kiss.png)
4
+ ![:dancer:](https://github.com/jsw0528/rails_emoji/raw/master/vendor/assets/images/emojis/dancer.png)
5
+ ![:octocat:](https://github.com/jsw0528/rails_emoji/raw/master/vendor/assets/images/emojis/octocat.png)
6
+ ![:trollface:](https://github.com/jsw0528/rails_emoji/raw/master/vendor/assets/images/emojis/trollface.png)
7
+
3
8
  ---
4
9
 
5
10
  ## Installation
6
11
 
7
- * Add to your Gemfile: `gem "rails_emoji"`, then: `$ bundle`.
12
+ * Add to your Gemfile: `gem 'rails_emoji', '~> 1.2'`, then: `$ bundle`.
8
13
 
9
- * Or, download the [rails_emoji-1.1.gem](https://github.com/jsw0528/rails_emoji/blob/master/rails_emoji-1.1.gem), then `$ gem install ./rails_emoji-1.1.gem --no-ri --no-rdoc`.
14
+ * Or, download the [rails_emoji-1.2.gem](https://github.com/jsw0528/rails_emoji/raw/master/rails_emoji-1.2.gem), then `$ gem install ./rails_emoji-1.2.gem --no-ri --no-rdoc`.
10
15
 
11
16
  ## Usage
12
17
 
data/lib/rails_emoji.rb CHANGED
@@ -4,7 +4,7 @@ require 'rails_emoji/version'
4
4
 
5
5
  module RailsEmoji
6
6
  # People
7
- EMOJI = %w{bowtie smile blush smiley relaxed smirk heart_eyes kissing_heart kissing_face flushed relieved satisfied grin wink wink2 tongue unamused sweat pensive disappointed confounded fearful cold_sweat persevere cry sob joy astonished scream angry rage sleepy mask imp alien yellow_heart blue_heart purple_heart heart green_heart broken_heart heartbeat heartpulse cupid sparkles star star2 anger exclamation question grey_exclamation grey_question zzz dash sweat_drops notes musical_note fire hankey poop shit plus1 thumbsup -1 thumbsdown ok_hand punch fist v wave hand open_hands point_up point_down point_left point_right raised_hands pray point_up_2 clap muscle metal walking runner couple dancer dancers ok_woman no_good information_desk_person bow couplekiss couple_with_heart massage haircut nail_care boy girl woman man baby older_woman older_man person_with_blond_hair man_with_gua_pi_mao man_with_turban construction_worker cop angel princess guardsman skull feet lips kiss ear eyes nose feelsgood finnadie goberserk godmode hurtrealbad rage1 rage2 rage3 rage4 suspect trollface}
7
+ EMOJI = %w{bowtie smile blush smiley relaxed smirk heart_eyes kissing_heart kissing_face flushed relieved satisfied grin wink wink2 tongue unamused sweat pensive disappointed confounded fearful cold_sweat persevere cry sob joy astonished scream angry rage sleepy mask imp alien yellow_heart blue_heart purple_heart heart green_heart broken_heart heartbeat heartpulse cupid sparkles star star2 anger exclamation question grey_exclamation grey_question zzz dash sweat_drops notes musical_note fire hankey poop shit +1 thumbsup -1 thumbsdown ok_hand punch fist v wave hand open_hands point_up point_down point_left point_right raised_hands pray point_up_2 clap muscle metal walking runner couple dancer dancers ok_woman no_good information_desk_person bow couplekiss couple_with_heart massage haircut nail_care boy girl woman man baby older_woman older_man person_with_blond_hair man_with_gua_pi_mao man_with_turban construction_worker cop angel princess guardsman skull feet lips kiss ear eyes nose feelsgood finnadie goberserk godmode hurtrealbad rage1 rage2 rage3 rage4 suspect trollface}
8
8
  # Nature
9
9
  EMOJI += %w{sunny umbrella cloud snowman moon zap cyclone ocean cat dog mouse hamster rabbit wolf frog tiger koala bear pig cow boar monkey_face monkey horse racehorse camel sheep elephant snake bird baby_chick chicken penguin bug octopus tropical_fish fish whale dolphin bouquet cherry_blossom tulip four_leaf_clover rose sunflower hibiscus maple_leaf leaves fallen_leaf palm_tree cactus ear_of_rice shell octocat squirrel}
10
10
  # Objects
@@ -13,9 +13,13 @@ module RailsEmoji
13
13
  emoji_code = emoji
14
14
  emoji = emoji_code.gsub(":", "")
15
15
 
16
- %{<img src="#{ host }/assets/emojis/#{ emoji.gsub('+', 'plus') }.png" } +
17
- %{width="#{ size }" height="#{ size }" } +
18
- %{title="#{ emoji_code }" alt="#{ emoji_code }" class="#{ class_name }" />}
16
+ if RailsEmoji::EMOJI.include?(emoji)
17
+ %{<img src="#{ host }/assets/emojis/#{ emoji.gsub('+', 'plus') }.png" } +
18
+ %{width="#{ size }" height="#{ size }" } +
19
+ %{title="#{ emoji_code }" alt="#{ emoji_code }" class="#{ class_name }" />}
20
+ else
21
+ emoji_code
22
+ end
19
23
  end
20
24
  end
21
25
 
@@ -1,3 +1,3 @@
1
1
  module RailsEmoji
2
- VERSION = "1.1"
2
+ VERSION = "1.2"
3
3
  end
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_emoji
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 1
9
- version: "1.1"
8
+ - 2
9
+ version: "1.2"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jay-Jay.Zhang (http://MrZhang.me/)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-05-29 00:00:00 Z
17
+ date: 2012-05-30 00:00:00 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails