esvg 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/esvg/svg.rb +13 -4
  3. data/lib/esvg/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba9eff2466177493f9b6fbfcf2986422e2760edc
4
- data.tar.gz: 4cc3286214cf2f60ae8b256365e2ada919d96288
3
+ metadata.gz: 01212e0dd22ac81b0551cbd8c036adc6dae5649f
4
+ data.tar.gz: 32dad04ed7e7252fdab0e0b4895cf03e994e5aea
5
5
  SHA512:
6
- metadata.gz: 642fc2ecce236255aaed03baf2e23128fd2976112d44ee4537abe06cb57bc353df6fd84faabdbbbc43f4df6dff76cde3ef5ec4fa162c391ff4a601aea208a8b0
7
- data.tar.gz: 565a3b3b5c172dc953ffb69225022dc2f8e3d79e76e6e8e502625527c71c64fc8ef0c00a4c7a8b400345f0847f8032d62e0b161043b3ea0aa2248bcedb5d797f
6
+ metadata.gz: f45c6bacd67ebc6e96b2f3902799e4c9695a744e049af01ed481769631d7f050dbba371d89f02c9deb0a3fa35638dadef4d72683fde895d8acac5ba0ebaf92ef
7
+ data.tar.gz: 56084715013ffea7f4ef6c28d99358fc3d4e04b1441a466ff50c65162db351e510aae34d307bf986db9dfd978069198bfd3d33dd11cdf1eedc6c10970fc298e6
@@ -355,11 +355,20 @@ module Esvg
355
355
  end
356
356
 
357
357
  def write_path(path, key)
358
- if key == "."
359
- config[path]
360
- else
361
- config[path].sub(/[^\/]+?\./, key+'.')
358
+ # Write esvg-core.js
359
+ return config[path] if key == "."
360
+
361
+ if !key.start_with?('_') && path.to_s.start_with?('js')
362
+ if config[:js_build_version]
363
+ key = "#{key}-#{config[:js_build_version]}"
364
+ end
365
+
366
+ if config[:js_build_dir]
367
+ return File.join(config[:js_build_dir], key+'.js')
368
+ end
362
369
  end
370
+
371
+ config[path].sub(/[^\/]+?\./, key+'.')
363
372
  end
364
373
 
365
374
  def prep_svg(file, content)
@@ -1,3 +1,3 @@
1
1
  module Esvg
2
- VERSION = "3.0.0"
2
+ VERSION = "3.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: esvg
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis