gemojione 2.2.0 → 2.2.1

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.
data/README.md CHANGED
@@ -72,6 +72,14 @@ Gemojione.asset_host = "emoji.cdn.com"
72
72
  Gemojione.asset_path = '/assets/emoji'
73
73
  ```
74
74
 
75
+ You can also serve the assets directly from the gem in your rails app:
76
+
77
+ ```ruby
78
+ # config/application.rb
79
+ config.assets.paths << Gemojione::Index.images_path
80
+ config.assets.precompile << "emoji/*.png"
81
+ ```
82
+
75
83
  String Helper Methods:
76
84
 
77
85
  You can also
@@ -37,5 +37,9 @@ module Gemojione
37
37
  def unicode_moji_regex
38
38
  @emoji_moji_regex
39
39
  end
40
+
41
+ def images_path
42
+ File.expand_path("../../assets/images", File.dirname(__FILE__))
43
+ end
40
44
  end
41
45
  end
@@ -1,3 +1,3 @@
1
1
  module Gemojione
2
- VERSION = "2.2.0"
2
+ VERSION = "2.2.1"
3
3
  end
@@ -24,4 +24,12 @@ describe Gemojione::Index do
24
24
  assert "🌀".match(regex)
25
25
  end
26
26
  end
27
+
28
+ describe "images_path" do
29
+ it "returns a valid path" do
30
+ path = index.images_path
31
+
32
+ assert Dir.exist?(path)
33
+ end
34
+ end
27
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemojione
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: