savagery 0.5.0 → 0.6.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: 9f4b4df0b64f3c16e8f0360e06487c503dd46801
4
- data.tar.gz: 1109e5be39b0b83df68cd7ff2e295244b21e4c5a
3
+ metadata.gz: f09acf766c43a2eb5a25ae92741e2d144452692d
4
+ data.tar.gz: 1fbd5c476c83a43ec56bde5d951b97eb215c121f
5
5
  SHA512:
6
- metadata.gz: 40faf0e88229a9236b18d69201e10f0becf7b9a591f57602911add25688aeaf6aa5cd78ec35a0e42b5743bb0ac943ee1f4b26a0762a343c5d66ddddb1e5be2d0
7
- data.tar.gz: 3382127d0727c26a8c97c7f20d4dfb0a7eb29c9b6d93154ae6d61e77db386cc76ea889b64b524ac4629fb67b6a2dd591bdff3c27271cccb90f7c25f6371aebbd
6
+ metadata.gz: e17b009b3eebfe7500157b0a90ffd0e5dc87c974adedeb20825ef701d4509996cdf8655df8da9787ced71976a2ea38b4ee03658d690ca5ed5e9622ceb93e42d3
7
+ data.tar.gz: f8c3db9cc20e65a02cd640009e6d0985ec4baf68da94db70348dd31e9e4bfe4cc4fe0ba9bb32b9ddf0af4002c8762dc80bc377f47941f8b1de426d7221e72872
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Savagery
2
2
 
3
- Ruthlessly sprite SVGs in your Rails app. Includes Ember helpers, too!
3
+ Ruthlessly sprite SVGs in your Rails app.
4
4
 
5
5
  ## Installation
6
6
 
@@ -29,14 +29,6 @@ Rails: Use the `svg_sprite_use` helper in your view:
29
29
  <%= svg_sprite_use "dogs/chihuahua" %>
30
30
  ```
31
31
 
32
- Ember: Require `savagery/ember` anywhere, then use the 'svg-sprite-use` helper in your template:
33
-
34
- ```javascript
35
- // app/assets/javascripts/templates/application.hbs
36
- //= require savagery/ember
37
- {{svg-sprite-use "dogs/chihuahua"}}
38
- ```
39
-
40
32
  And Savagery will do all the hard work of spriting and embedding. A new .svg
41
33
  sprite file will appear in the `app/assets/svgs` directory, named after the directory
42
34
  containing the sprites:
@@ -54,7 +46,7 @@ Make sure you check this file into version control.
54
46
 
55
47
  ## Contributing
56
48
 
57
- 1. Fork it ( https://github.com/[my-github-username]/savagery/fork )
49
+ 1. Fork it ( https://github.com/botandrose/savagery/fork )
58
50
  2. Create your feature branch (`git checkout -b my-new-feature`)
59
51
  3. Commit your changes (`git commit -am 'Add some feature'`)
60
52
  4. Push to the branch (`git push origin my-new-feature`)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -1,3 +1,3 @@
1
1
  module Savagery
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
data/lib/savagery.rb CHANGED
@@ -3,7 +3,6 @@ require "savagery/spriter"
3
3
 
4
4
  if defined?(Rails)
5
5
  require "savagery/engine"
6
- require "ember-rails-assets"
7
6
  end
8
7
 
9
8
  module Savagery
data/savagery.gemspec CHANGED
@@ -18,9 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "ember-rails-assets"
22
-
23
- spec.add_development_dependency "bundler", "~> 1.6"
21
+ spec.add_development_dependency "bundler"
24
22
  spec.add_development_dependency "actionview"
25
23
  spec.add_development_dependency "rake"
26
24
  spec.add_development_dependency "rspec"
metadata CHANGED
@@ -1,43 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: savagery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.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: 2016-04-19 00:00:00.000000000 Z
11
+ date: 2019-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: ember-rails-assets
14
+ name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
- type: :runtime
20
+ type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.6'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '1.6'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: actionview
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -97,7 +83,8 @@ dependencies:
97
83
  description: Ruthlessly sprites SVGs
98
84
  email:
99
85
  - micah@botandrose.com
100
- executables: []
86
+ executables:
87
+ - setup
101
88
  extensions: []
102
89
  extra_rdoc_files: []
103
90
  files:
@@ -107,7 +94,7 @@ files:
107
94
  - LICENSE.txt
108
95
  - README.md
109
96
  - Rakefile
110
- - app/assets/javascripts/savagery/ember.js
97
+ - bin/setup
111
98
  - lib/savagery.rb
112
99
  - lib/savagery/engine.rb
113
100
  - lib/savagery/helpers.rb
@@ -148,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
135
  version: '0'
149
136
  requirements: []
150
137
  rubyforge_project:
151
- rubygems_version: 2.4.6
138
+ rubygems_version: 2.6.14
152
139
  signing_key:
153
140
  specification_version: 4
154
141
  summary: Ruthlessly sprites SVGs
@@ -1,52 +0,0 @@
1
- //= require ember-rails-assets
2
-
3
- Savagery = {
4
- svgSpriteInclude: function(name) {
5
- var path = window.ASSETS.path(name + ".svg")
6
- if($("[data-savagery-path='" + path.split("/assets/").reverse()[0] + "']").length > 0) { return; }
7
- $.get(path, function(data) {
8
- $("body").prepend(data);
9
- }, "text");
10
- },
11
-
12
- svgSpriteUse: function(basename, cssClass) {
13
- cssClass = cssClass || basename;
14
- var absolutePath = window.location.href
15
- absolutePath = absolutePath.replace(window.location.hash, '');
16
- absolutePath = absolutePath + "#" + basename;
17
- return '<svg class="' + cssClass + '"><use xlink:href="' + absolutePath + '"></use></svg>';
18
- },
19
- };
20
-
21
- Ember.Application.initializer({
22
- name: "savagery-helpers",
23
-
24
- initialize: function(application) {
25
- application.register("helper:svg-sprite-use", Ember.Helper.helper(this.svgSpriteUseHelper));
26
- },
27
-
28
- svgSpriteUseHelper: function(params, hash) {
29
- var name = params[0];
30
- var names = name.split("/");
31
- var dirname = names[0];
32
- var basename = names[1];
33
- Savagery.svgSpriteInclude(dirname);
34
-
35
- var cssClass = hash["class"];
36
- var html = Savagery.svgSpriteUse(basename, cssClass);
37
- return new Ember.Handlebars.SafeString(html);
38
- }
39
- });
40
-
41
- Ember.Application.initializer({
42
- name: "ember-rails-assets-helpers",
43
-
44
- initialize: function(application) {
45
- application.register("helper:asset-path", Ember.Helper.helper(function(params, hash) {
46
- var name = params[0];
47
- var path = window.ASSETS.path(name);
48
- return new Ember.Handlebars.SafeString(path);
49
- }));
50
- }
51
- });
52
-