inline_svg 1.0.0 → 1.0.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
  SHA1:
3
- metadata.gz: 7004d185bef2b924f18a066874654c38df4def32
4
- data.tar.gz: b88ad5893b28740772c3561c2ec10b49f16354e8
3
+ metadata.gz: 77ff506f63b6e109b845e36bcdd8ae0d5bfc7fde
4
+ data.tar.gz: 5e04e93613735cfec49fffa88570c875a21db5a2
5
5
  SHA512:
6
- metadata.gz: d2cd936da88bd368aa88e7da0ef68791523c3c386d746e094c7e8f3df4b8b9dd3dc2293529d10ee80a42273a82f45ae69c356d55c2ada0ead4c59fcdfe64ed33
7
- data.tar.gz: efdcb9cdbd557a06a0b689563b469df1fb1d7e8d78b62cc7cad97f70e26fb6f0c2d72f624ae7b36301a45298326ee043c401cc34b8e3bded752a886a14d62def
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.0...HEAD
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
+ [![CircleCI](https://circleci.com/gh/jamesmartin/inline_svg.svg?style=svg)](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
- ```haml
47
- !!! 5
48
- %html
49
- %head
50
- %title Embedded SVG Documents
51
- %body
52
- %h1 Embedded SVG Documents
53
- %div
54
- = inline_svg "some-document.svg", class: 'some-class'
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
@@ -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
- config.asset_finder = app.instance_variable_get(:@assets)
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
@@ -1,3 +1,3 @@
1
1
  module InlineSvg
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.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.0.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-07 00:00:00.000000000 Z
11
+ date: 2017-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler