savagery 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 008e3024378013a5d7cf1693f6f5976308fb8382
4
- data.tar.gz: 7e90df10db182dd4044803554513509d911d6f58
3
+ metadata.gz: d728c0670ef167ce440cefcca400ed63460618d2
4
+ data.tar.gz: 4a6943833fd27ce61c6ebaa7403489647ea4636f
5
5
  SHA512:
6
- metadata.gz: 9142ae4bbf3b6751fad1c0e343ba89bda20d367c6111c956cbe5a446c8e29c60aaf6dd2cd286a08a5eee07200d120382250f8cab3658a2ffbaa839fc4ab15f14
7
- data.tar.gz: 9247e391fb81b8c83f96ec56ed83318dcefc1d23ccf4af302a9156b9d03054167ea9ac79eeb212cb2a6e39d7c55ba49a3aad1024fe885972d5619ab579077a58
6
+ metadata.gz: 82fbc2957b9456c2271fce9d6de5c38691c5b1b95a6faa5fd169970575ad4aa2a362044495649148ff29ce61fb34b6f4ec7481378c63ab709e4e939b48a5e1f9
7
+ data.tar.gz: dbd549d244ca7a00bf57ce1c45c01dfe1f1cb37e9e258021ec10fbcb6ed73634d00462997cd20dbfa3fd5006e3dbe8076c85c786420759d51e6c065bf9a3f6e2
@@ -16,17 +16,25 @@ Savagery = {
16
16
  return '<svg class="' + cssClass + '"><use xlink:href="#' + basename + '"></use></svg>';
17
17
  },
18
18
 
19
- _svgSpritesIncluded: {}
19
+ _svgSpritesIncluded: {},
20
+
21
+ emberHelper: function(name, options) {
22
+ var names = name.split("/");
23
+ var dirname = names[0];
24
+ var basename = names[1];
25
+ Savagery.svgSpriteInclude(dirname);
26
+
27
+ var cssClass = options.hash["class"];
28
+ var html = Savagery.svgSpriteUse(basename, cssClass);
29
+ return new Ember.Handlebars.SafeString(html);
30
+ }
20
31
  };
21
32
 
22
- Ember.Handlebars.helper("svg-sprite-use", function(name, options) {
23
- var names = name.split("/");
24
- var dirname = names[0];
25
- var basename = names[1];
26
- Savagery.svgSpriteInclude(dirname);
33
+ Ember.Application.initializer({
34
+ name: "savagery-helpers",
27
35
 
28
- var cssClass = options.hash["class"];
29
- var html = Savagery.svgSpriteUse(basename, cssClass);
30
- return new Ember.Handlebars.SafeString(html);
36
+ initialize: function(container, application) {
37
+ application.register("helper:svg-sprite-use", Savagery.emberHelper);
38
+ }
31
39
  });
32
40
 
@@ -1,3 +1,3 @@
1
1
  module Savagery
2
- VERSION = "0.3.3"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: savagery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-05 00:00:00.000000000 Z
11
+ date: 2015-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ember-rails-assets
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  requirements: []
150
150
  rubyforge_project:
151
- rubygems_version: 2.2.2
151
+ rubygems_version: 2.4.6
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Ruthlessly sprites SVGs