inline_svg 1.5.1 → 1.5.2
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 +4 -4
- data/CHANGELOG.md +7 -1
- data/README.md +13 -24
- data/lib/inline_svg/railtie.rb +3 -13
- data/lib/inline_svg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 555d915ade77dc1d2c18d693d5b0336ecaac627990362c115552904a41e262b3
|
4
|
+
data.tar.gz: 4f02d2b91b2dba08bc704c26abc7819c8c842f66e43a2d52e72d4a81992837da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09cfe90081a06913b29349d270a5328971cced98bdc7b087571f0669b80d3ee70f44e3d471dc879a2a805d6c77138269687280d006133f898cfbaeee65873830'
|
7
|
+
data.tar.gz: 4a2a278a9166cc18934b0745c02f699ceea1db20cbbd132bbe4816d703f424ae058cb9e46d270ad8f3836834cc29b090c2821f0fe8b402e5c0b2135ac4e1c1a8
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
## [Unreleased][unreleased]
|
6
6
|
- Nothing
|
7
7
|
|
8
|
+
## [1.5.2] - 2019-06-20
|
9
|
+
### Fixed
|
10
|
+
- Revert automatic Webpack asset finder behavior. Make Webpack "opt-in".
|
11
|
+
[#98](https://github.com/jamesmartin/inline_svg/issues/98)
|
12
|
+
|
8
13
|
## [1.5.1] - 2019-06-18
|
9
14
|
### Fixed
|
10
15
|
- Prevent nil asset finder when neither Sprockets or Webpacker are available
|
@@ -209,7 +214,8 @@ transformations](https://github.com/jamesmartin/inline_svg/blob/master/README.md
|
|
209
214
|
### Added
|
210
215
|
- Basic Railtie and view helper to inline SVG documents to Rails views.
|
211
216
|
|
212
|
-
[unreleased]: https://github.com/jamesmartin/inline_svg/compare/v1.5.
|
217
|
+
[unreleased]: https://github.com/jamesmartin/inline_svg/compare/v1.5.2...HEAD
|
218
|
+
[1.5.2]: https://github.com/jamesmartin/inline_svg/compare/v1.5.1...v1.5.2
|
213
219
|
[1.5.1]: https://github.com/jamesmartin/inline_svg/compare/v1.5.0...v1.5.1
|
214
220
|
[1.5.0]: https://github.com/jamesmartin/inline_svg/compare/v1.4.0...v1.5.0
|
215
221
|
[1.4.0]: https://github.com/jamesmartin/inline_svg/compare/v1.3.1...v1.4.0
|
data/README.md
CHANGED
@@ -14,7 +14,19 @@ Inline SVG supports:
|
|
14
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
15
|
- [Rails 4](http://weblog.rubyonrails.org/2013/6/25/Rails-4-0-final/)
|
16
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.
|
17
|
+
- [Rails 6](https://weblog.rubyonrails.org/2019/4/24/Rails-6-0-rc1-released/) with Sprockets or Webpacker (from [v1.5.2](https://github.com/jamesmartin/inline_svg/releases/tag/v1.5.2)).
|
18
|
+
|
19
|
+
## Webpacker
|
20
|
+
|
21
|
+
|
22
|
+
Webpacker support is currently "opt-in" and must be manually configured like
|
23
|
+
so:
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
InlineSvg.configure do |config|
|
27
|
+
config.asset_finder = InlineSvg::WebpackAssetFinder
|
28
|
+
end
|
29
|
+
```
|
18
30
|
|
19
31
|
## Changelog
|
20
32
|
|
@@ -308,29 +320,6 @@ InlineSvg.configure do |config|
|
|
308
320
|
end
|
309
321
|
```
|
310
322
|
|
311
|
-
## Sprockets and Webpacker
|
312
|
-
|
313
|
-
Inline SVG supports SVGs bundled by either Sprockets or Webpacker, however, be
|
314
|
-
aware that the gem will *always* attempt to find SVGs using Sprockts if it is
|
315
|
-
enabled.
|
316
|
-
|
317
|
-
By default, Inline SVG will use Sprockets to find SVG files if it is enabled in
|
318
|
-
your Rails project.
|
319
|
-
|
320
|
-
If you have upgraded an older Rails project from Sprockets to Webpacker and you
|
321
|
-
no longer want to use Sprockets at all, you should disable the Asset Pipeline
|
322
|
-
and Inline SVG will use Webpacker automatically.
|
323
|
-
|
324
|
-
If you have both Sprockets *and* Webpacker enabled for some reason and you want
|
325
|
-
Inline SVG to use Webpacker to find SVGs then you should configure the
|
326
|
-
`asset_finder` appropriately:
|
327
|
-
|
328
|
-
```ruby
|
329
|
-
InlineSvg.configure do |config|
|
330
|
-
config.asset_finder = InlineSvg::WebpackAssetFinder
|
331
|
-
end
|
332
|
-
```
|
333
|
-
|
334
323
|
## Contributing
|
335
324
|
|
336
325
|
1. Fork it ( [http://github.com/jamesmartin/inline_svg/fork](http://github.com/jamesmartin/inline_svg/fork) )
|
data/lib/inline_svg/railtie.rb
CHANGED
@@ -14,19 +14,9 @@ module InlineSvg
|
|
14
14
|
# Only set this when a user-configured asset finder has not been
|
15
15
|
# configured already.
|
16
16
|
if config.asset_finder.nil?
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
config.asset_finder = assets
|
21
|
-
elsif defined?(Webpacker)
|
22
|
-
# Use Webpacker when it's available
|
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
|
29
|
-
end
|
17
|
+
# In default Rails apps, this will be a fully operational
|
18
|
+
# Sprockets::Environment instance
|
19
|
+
config.asset_finder = app.instance_variable_get(:@assets)
|
30
20
|
end
|
31
21
|
end
|
32
22
|
end
|
data/lib/inline_svg/version.rb
CHANGED
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.
|
4
|
+
version: 1.5.2
|
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-
|
11
|
+
date: 2019-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|