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 +4 -4
- data/app/assets/javascripts/savagery/ember.js +17 -9
- data/lib/savagery/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d728c0670ef167ce440cefcca400ed63460618d2
|
4
|
+
data.tar.gz: 4a6943833fd27ce61c6ebaa7403489647ea4636f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
23
|
-
|
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
|
-
|
29
|
-
|
30
|
-
|
36
|
+
initialize: function(container, application) {
|
37
|
+
application.register("helper:svg-sprite-use", Savagery.emberHelper);
|
38
|
+
}
|
31
39
|
});
|
32
40
|
|
data/lib/savagery/version.rb
CHANGED
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.
|
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:
|
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.
|
151
|
+
rubygems_version: 2.4.6
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Ruthlessly sprites SVGs
|