rails_emoji 1.0 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -4,13 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- Download the [rails_emoji-1.0.gem](https://github.com/jsw0528/rails_emoji/blob/master/rails_emoji-1.0.gem), then `$ gem install ./rails_emoji-1.0.gem --no-ri --no-rdoc`.
7
+ * Add to your Gemfile: `gem "rails_emoji"`, then: `$ bundle`.
8
+
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`.
8
10
 
9
11
  ## Usage
10
12
 
11
13
  ```ruby
12
- require 'rails_emoji'
13
-
14
14
  ":smile:".emoji_to_html
15
15
  # output: "<img src="/assets/emojis/smile.png" width="20" height="20" title=":smile:" alt=":smile:" class="emoji" />"
16
16
 
@@ -9,7 +9,7 @@ module RailsEmoji
9
9
  class_name = options[:class] || "emoji"
10
10
 
11
11
  # Replace
12
- text.gsub(/:([^:]+):/) do |emoji|
12
+ text.gsub(/:([a-z0-9_\-\+]+):/) do |emoji|
13
13
  emoji_code = emoji
14
14
  emoji = emoji_code.gsub(":", "")
15
15
 
@@ -1,3 +1,3 @@
1
1
  module RailsEmoji
2
- VERSION = "1.0"
2
+ VERSION = "1.1"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_emoji
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 0
9
- version: "1.0"
8
+ - 1
9
+ version: "1.1"
10
10
  platform: ruby
11
11
  authors:
12
- - "w\xC7\x92_is\xE7\xA5\x9E\xE4\xBB\x99(http://MrZhang.me/)"
12
+ - Jay-Jay.Zhang (http://MrZhang.me/)
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
@@ -575,6 +575,6 @@ rubyforge_project:
575
575
  rubygems_version: 1.8.24
576
576
  signing_key:
577
577
  specification_version: 3
578
- summary: Emoji for Rails
578
+ summary: Emoji for Ruby on Rails
579
579
  test_files: []
580
580