inline_svg 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of inline_svg might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7e8c4d03d15f0fdd876912e329fca61646c3dc917c3745a0f862dde2490ea2e
4
- data.tar.gz: 606861334da0b46952d84ea19b3779405e26f411cedad03bf9dbe1973e387b3a
3
+ metadata.gz: a99965e52653f93e240ebb18b14f297cc4b5aecc57c6e197ada33ce84302093f
4
+ data.tar.gz: 1c5d9383f1306f5ca3bbd68f632b1f21bb9fb1ed91098adc4b117b128b585ace
5
5
  SHA512:
6
- metadata.gz: 05bb315a0a78041729e04f1860b0399e38acfcdec6729b49646b52c2a532721484b23ec6f005ade488570e057987f0761eee31d9fca541a09c712e073a4ae2c6
7
- data.tar.gz: 0da8510891479fd88bf32e6f4a46fe001c861b64fba136609e5756b893fb86d4ebaaef40c048b132a745c954d9ddcb7f938ba218d7d94277ee61140b6d5529f6
6
+ metadata.gz: 33248af239e80b6baa859cbca95d74e5cc9a677a7538714e502ae8c8e7bd4686e734a60c65c72e14fdd88bfbfc33ddf8a1700cf47c5bbc13741baa620cf6ef07
7
+ data.tar.gz: 72fac7ad8976f22a3842bbb1cf845539744e7d242ad243c19ae572b10206a43efacb483ffd5749a8a2b8167caccee482b4e0f21418aa87c142810091c78645cb
@@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
5
  ## [Unreleased][unreleased]
6
+ - Nothing
7
+
8
+ ## [1.5.1] - 2019-06-18
9
+ ### Fixed
10
+ - Prevent nil asset finder when neither Sprockets or Webpacker are available
11
+ [#97](https://github.com/jamesmartin/inline_svg/issues/97)
12
+
13
+ ## [1.5.0] - 2019-06-17
6
14
  ### Added
7
15
  - Support for finding assets bundled by Webpacker
8
16
  [#96](https://github.com/jamesmartin/inline_svg/pull/96)
@@ -201,7 +209,10 @@ transformations](https://github.com/jamesmartin/inline_svg/blob/master/README.md
201
209
  ### Added
202
210
  - Basic Railtie and view helper to inline SVG documents to Rails views.
203
211
 
204
- [unreleased]: https://github.com/jamesmartin/inline_svg/compare/v1.3.1...HEAD
212
+ [unreleased]: https://github.com/jamesmartin/inline_svg/compare/v1.5.1...HEAD
213
+ [1.5.1]: https://github.com/jamesmartin/inline_svg/compare/v1.5.0...v1.5.1
214
+ [1.5.0]: https://github.com/jamesmartin/inline_svg/compare/v1.4.0...v1.5.0
215
+ [1.4.0]: https://github.com/jamesmartin/inline_svg/compare/v1.3.1...v1.4.0
205
216
  [1.3.1]: https://github.com/jamesmartin/inline_svg/compare/v1.3.0...v1.3.1
206
217
  [1.3.0]: https://github.com/jamesmartin/inline_svg/compare/v1.2.3...v1.3.0
207
218
  [1.2.3]: https://github.com/jamesmartin/inline_svg/compare/v1.2.2...v1.2.3
data/README.md CHANGED
@@ -9,7 +9,12 @@ embedding](http://css-tricks.com/using-svg/) it inline in the HTML.
9
9
  This gem adds a Rails helper method (`inline_svg`) that reads an SVG document (via Sprockets or Webpacker, so works with the Rails Asset Pipeline), applies a CSS class attribute to the root of the document and
10
10
  then embeds it into a view.
11
11
 
12
- Inline SVG supports [Rails 3](http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-done/) (from [v0.12.0](https://github.com/jamesmartin/inline_svg/releases/tag/v0.12.0)), [Rails 4](http://weblog.rubyonrails.org/2013/6/25/Rails-4-0-final/) and [Rails 5](http://weblog.rubyonrails.org/2016/6/30/Rails-5-0-final/) (from [v0.10.0](https://github.com/jamesmartin/inline_svg/releases/tag/v0.10.0)).
12
+ Inline SVG supports:
13
+
14
+ - [Rails 3](http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-done/) (from [v0.12.0](https://github.com/jamesmartin/inline_svg/releases/tag/v0.12.0))
15
+ - [Rails 4](http://weblog.rubyonrails.org/2013/6/25/Rails-4-0-final/)
16
+ - [Rails 5](http://weblog.rubyonrails.org/2016/6/30/Rails-5-0-final/) (from [v0.10.0](https://github.com/jamesmartin/inline_svg/releases/tag/v0.10.0))
17
+ - [Rails 6](https://weblog.rubyonrails.org/2019/4/24/Rails-6-0-rc1-released/) with Sprockets or Webpacker (from [v1.5.0](https://github.com/jamesmartin/inline_svg/releases/tag/v1.5.0)).
13
18
 
14
19
  ## Changelog
15
20
 
@@ -10,15 +10,22 @@ module InlineSvg
10
10
 
11
11
  config.after_initialize do |app|
12
12
  InlineSvg.configure do |config|
13
- # In default Rails apps, this will be a fully operational
14
- # Sprockets::Environment instance
13
+ # Configure the asset_finder:
15
14
  # Only set this when a user-configured asset finder has not been
16
15
  # configured already.
17
16
  if config.asset_finder.nil?
18
17
  if assets = app.instance_variable_get(:@assets)
18
+ # In default Rails apps, this will be a fully operational
19
+ # Sprockets::Environment instance
19
20
  config.asset_finder = assets
20
21
  elsif defined?(Webpacker)
22
+ # Use Webpacker when it's available
21
23
  config.asset_finder = InlineSvg::WebpackAssetFinder
24
+ else
25
+ # Fallback to the StaticAssetFinder if all else fails.
26
+ # This will be used in cases where assets are precompiled and other
27
+ # production settings.
28
+ config.asset_finder = InlineSvg::StaticAssetFinder
22
29
  end
23
30
  end
24
31
  end
@@ -1,3 +1,3 @@
1
1
  module InlineSvg
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_svg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-16 00:00:00.000000000 Z
11
+ date: 2019-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler