inline_svg 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/README.md +6 -1
- data/lib/inline_svg/railtie.rb +9 -2
- 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: a99965e52653f93e240ebb18b14f297cc4b5aecc57c6e197ada33ce84302093f
|
|
4
|
+
data.tar.gz: 1c5d9383f1306f5ca3bbd68f632b1f21bb9fb1ed91098adc4b117b128b585ace
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 33248af239e80b6baa859cbca95d74e5cc9a677a7538714e502ae8c8e7bd4686e734a60c65c72e14fdd88bfbfc33ddf8a1700cf47c5bbc13741baa620cf6ef07
|
|
7
|
+
data.tar.gz: 72fac7ad8976f22a3842bbb1cf845539744e7d242ad243c19ae572b10206a43efacb483ffd5749a8a2b8167caccee482b4e0f21418aa87c142810091c78645cb
|
data/CHANGELOG.md
CHANGED
|
@@ -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.
|
|
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
|
|
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
|
|
data/lib/inline_svg/railtie.rb
CHANGED
|
@@ -10,15 +10,22 @@ module InlineSvg
|
|
|
10
10
|
|
|
11
11
|
config.after_initialize do |app|
|
|
12
12
|
InlineSvg.configure do |config|
|
|
13
|
-
#
|
|
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
|
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.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-
|
|
11
|
+
date: 2019-06-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|