inline_svg 1.0.0 → 1.0.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.
Potentially problematic release.
This version of inline_svg might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/README.md +14 -9
- data/lib/inline_svg/railtie.rb +5 -1
- data/lib/inline_svg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77ff506f63b6e109b845e36bcdd8ae0d5bfc7fde
|
4
|
+
data.tar.gz: 5e04e93613735cfec49fffa88570c875a21db5a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78b2163354a33b8110d466bff371a79a461d421f3904ba65013844863d591977f3da663391abaa07729cc853bdd295df5c7d63451a9d3735c42a1b7894d2c54e
|
7
|
+
data.tar.gz: 52569d02594958e9007964965175bfe3d9b313d6ec37c679eadf91fa035aba6984e15a7b8e229ba194084aadd1614399731f6c36d4f55cd3c7a105b1aa99d847
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
## [Unreleased][unreleased]
|
6
6
|
- Nothing
|
7
7
|
|
8
|
+
## [1.0.1] - 2017-04-10
|
9
|
+
### Fixed
|
10
|
+
- Don't override custom asset finders in Railtie
|
11
|
+
|
8
12
|
## [1.0.0] - 2017-04-7
|
9
13
|
### Added
|
10
14
|
- Remove dependency on `Loofah` while maintaining basic `nocomment` transform
|
@@ -140,7 +144,8 @@ transformations](https://github.com/jamesmartin/inline_svg/blob/master/README.md
|
|
140
144
|
### Added
|
141
145
|
- Basic Railtie and view helper to inline SVG documents to Rails views.
|
142
146
|
|
143
|
-
[unreleased]: https://github.com/jamesmartin/inline_svg/compare/v1.0.
|
147
|
+
[unreleased]: https://github.com/jamesmartin/inline_svg/compare/v1.0.1...HEAD
|
148
|
+
[1.0.1]: https://github.com/jamesmartin/inline_svg/compare/v1.0.0...v1.0.1
|
144
149
|
[1.0.0]: https://github.com/jamesmartin/inline_svg/compare/v0.12.1...v1.0.0
|
145
150
|
[0.12.1]: https://github.com/jamesmartin/inline_svg/compare/v0.12.0...v0.12.1
|
146
151
|
[0.12.0]: https://github.com/jamesmartin/inline_svg/compare/v0.11.1...v0.12.0
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Inline SVG
|
2
2
|
|
3
|
+
[](https://circleci.com/gh/jamesmartin/inline_svg)
|
4
|
+
|
3
5
|
Styling a SVG document with CSS for use on the web is most reliably achieved by
|
4
6
|
[adding classes to the document and
|
5
7
|
embedding](http://css-tricks.com/using-svg/) it inline in the HTML.
|
@@ -43,15 +45,18 @@ This means you can pre-process and fingerprint your SVG files like other Rails a
|
|
43
45
|
Here's an example of embedding an SVG document and applying a 'class' attribute in
|
44
46
|
HAML:
|
45
47
|
|
46
|
-
```
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
48
|
+
```erb
|
49
|
+
<html>
|
50
|
+
<head>
|
51
|
+
<title>Embedded SVG Documents<title>
|
52
|
+
</head>
|
53
|
+
<body>
|
54
|
+
<h1>Embedded SVG Documents</h1>
|
55
|
+
<div>
|
56
|
+
<%= inline_svg "some-document.svg", class: 'some-class' %>
|
57
|
+
</div>
|
58
|
+
</body>
|
59
|
+
</html>
|
55
60
|
```
|
56
61
|
|
57
62
|
Here's some CSS to target the SVG, resize it and turn it an attractive shade of
|
data/lib/inline_svg/railtie.rb
CHANGED
@@ -12,7 +12,11 @@ module InlineSvg
|
|
12
12
|
InlineSvg.configure do |config|
|
13
13
|
# In default Rails apps, this will be a fully operational
|
14
14
|
# Sprockets::Environment instance
|
15
|
-
|
15
|
+
# Only set this when a user-configured asset finder has not been
|
16
|
+
# configured already.
|
17
|
+
if config.asset_finder.nil?
|
18
|
+
config.asset_finder = app.instance_variable_get(:@assets)
|
19
|
+
end
|
16
20
|
end
|
17
21
|
end
|
18
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.0.
|
4
|
+
version: 1.0.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: 2017-04-
|
11
|
+
date: 2017-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|