cyborg 0.5.17 → 0.5.18

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: d776f9abceda0bd53460b5d13f99ce467a96d0a9
4
- data.tar.gz: 9bdce401f1c32154bca9180ede6ff74942d7434f
3
+ metadata.gz: 60a1134fc18d219fdafcf49b874374b6738bb045
4
+ data.tar.gz: 3e69ba9f4668e26019a6f34ce72e026f608ba90b
5
5
  SHA512:
6
- metadata.gz: eb850b40be39bc1e9bfce8a0bcf17672b0706e73fec5c4303cb9f4fc0b0c08c3d8c18c1760995d960e5246fbe0f43fb4abe7d1a34c218e48ed2362677f4288f1
7
- data.tar.gz: 209b0b53027061bb74ff37bcfe2f96e850fbb44582710d8ef8c6bd5f9a0a4cb1bcadc044ed6e8050761c751081276f610e8d5eb510f59a287a14ea069c5a8082
6
+ metadata.gz: af30ab530c5bfca37bb755d71c5df79075f5c87e35f71f88110ec4686f77c028e725c87de8740cc7a9b8c4fd63371f730cb63c9663ce29c42c13f09af5d6d6ed
7
+ data.tar.gz: 775bb1cc42a5a3b9fcf72e234aaf871ea67c956195bdd9fd1e37e8ee57b1629e81eadb5bbf0832b977d09e4ec4511172c64a17920ab863980b2033b7cd8e1d5d
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_runtime_dependency 'sass', '~> 3.4'
22
- spec.add_runtime_dependency 'esvg', '~> 2.9'
22
+ spec.add_runtime_dependency 'esvg', '~> 3.0'
23
23
  spec.add_runtime_dependency 'listen', '~> 3.0.0'
24
24
  spec.add_runtime_dependency 'block_helpers', '~> 0.3'
25
25
  spec.add_runtime_dependency 'colorize', '~> 0.8'
@@ -7,15 +7,14 @@ module Cyborg
7
7
  @plugin = plugin
8
8
  @base = path
9
9
 
10
- return if find_files.empty?
11
-
12
10
  @svg = Esvg.new({
13
11
  config_file: File.join(plugin.root, 'config', 'esvg.yml'),
14
12
  path: path,
15
13
  tmp_path: Cyborg.rails_path('tmp/cache/assets'),
16
- js_path: File.join(plugin.paths[:javascripts], '_svg.js'),
14
+ js_path: File.join(plugin.paths[:javascripts], '_icons.js'),
17
15
  optimize: true
18
16
  })
17
+
19
18
  end
20
19
 
21
20
  def icons
@@ -26,14 +25,19 @@ module Cyborg
26
25
  "svg"
27
26
  end
28
27
 
28
+ def local_path(path)
29
+ File.expand_path(path).sub(plugin.paths[:javascripts], '').sub(/^\//,'')
30
+ end
31
+
29
32
  def build
30
- return if find_files.empty?
31
33
 
32
34
  begin
33
35
  @svg.read_files
34
36
 
35
- if file = @svg.write
36
- puts build_success(file)
37
+ return if @svg.files.empty?
38
+
39
+ if files = @svg.write
40
+ files.each { |file| puts build_success(file) }
37
41
  else
38
42
  log_error "FAILED TO BUILD SVGs"
39
43
  end
@@ -1,3 +1,3 @@
1
1
  module Cyborg
2
- VERSION = "0.5.17"
2
+ VERSION = "0.5.18"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cyborg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.17
4
+ version: 0.5.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-15 00:00:00.000000000 Z
11
+ date: 2017-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.9'
33
+ version: '3.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.9'
40
+ version: '3.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: listen
43
43
  requirement: !ruby/object:Gem::Requirement