svg_sprite 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe18c6c07ac1ce4d61936ca9aeed70d8de0b8d1803ab87efd7b85638213aa226
4
- data.tar.gz: 1d04666e8320452af0979288eaf388a6b767e564e7659ea9af68096f4fcdb918
3
+ metadata.gz: 102ffaf3f4314cb00bea8e473f8d82a20b598a727c522f36ea0443a9ff9ef089
4
+ data.tar.gz: cd212d62cb0a88314a1f111a6f56de52fbf84a9c5157c706694609fdd7ec8136
5
5
  SHA512:
6
- metadata.gz: e15b6117c8a07d0e7746e21bcddf985ea27cbac7780e678c9e50b6f48236d918c695c0f5f400bf52b3f1730c5f500f9ef09bf3939f8a1f3e3df11aee4c7b3a82
7
- data.tar.gz: 7c2bc3ce04d93443b1f21b29778a04f3b0aca1eb5479d7ee241c92bb2ee71391149a79670a063b1394296fbb1246929712750e3ad4eb0a57974f9346f6796bac
6
+ metadata.gz: e8e0a194d46fd6dbe33ab04c0ea9552a2925d2019e4a62fd5a9f69b9dae07c29b9c7f9f5729dd3c7211664bf2a3b034d663bf6fdc34b33a06425c21bd6815229
7
+ data.tar.gz: c0a0f242c808e663e3a20f4a688116bb042b730de598ff8827efa80dea47770f79d631b07a809139b64f5cbe7d7163f9d6fb45eb4ba9bd8b6417e78faeb34632
@@ -24,9 +24,9 @@ jobs:
24
24
  - Gemfile
25
25
 
26
26
  steps:
27
- - uses: actions/checkout@v2.4.0
27
+ - uses: actions/checkout@v3
28
28
 
29
- - uses: actions/cache@v2
29
+ - uses: actions/cache@v3
30
30
  with:
31
31
  path: vendor/bundle
32
32
  key: >
data/CHANGELOG.md CHANGED
@@ -11,6 +11,13 @@ Prefix your message with one of the following:
11
11
  - [Security] in case of vulnerabilities.
12
12
  -->
13
13
 
14
+ ## v1.0.3
15
+
16
+ - [Changed] SVG sprite won't include `display: none` anymore; instead, a class
17
+ `:name--sprite` is added. This eases the CSP setups, as it won't include a
18
+ inline style. Make sure you hide the sprite with something like
19
+ `.icon--sprite { display: none }`.
20
+
14
21
  ## v1.0.2
15
22
 
16
23
  - [Changed] Remove `<symbol>`'s `width` and `height` property, otherwise Google
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # svg_sprite
2
2
 
3
3
  [![Tests](https://github.com/fnando/svg_sprite/workflows/ruby-tests/badge.svg)](https://github.com/fnando/svg_sprite)
4
- [![Code Climate](https://codeclimate.com/github/fnando/svg_sprite/badges/gpa.svg)](https://codeclimate.com/github/fnando/svg_sprite)
5
4
  [![Gem](https://img.shields.io/gem/v/svg_sprite.svg)](https://rubygems.org/gems/svg_sprite)
6
5
  [![Gem](https://img.shields.io/gem/dt/svg_sprite.svg)](https://rubygems.org/gems/svg_sprite)
7
6
 
@@ -165,18 +164,18 @@ SvgSprite.call(
165
164
 
166
165
  ## Contributors
167
166
 
168
- - https://github.com/fnando/svg_sprite/contributors
167
+ - <https://github.com/fnando/svg_sprite/contributors>
169
168
 
170
169
  ## Contributing
171
170
 
172
171
  For more details about how to contribute, please read
173
- https://github.com/fnando/svg_sprite/blob/main/CONTRIBUTING.md.
172
+ <https://github.com/fnando/svg_sprite/blob/main/CONTRIBUTING.md>.
174
173
 
175
174
  ## License
176
175
 
177
176
  The gem is available as open source under the terms of the
178
177
  [MIT License](https://opensource.org/licenses/MIT). A copy of the license can be
179
- found at https://github.com/fnando/svg_sprite/blob/main/LICENSE.md.
178
+ found at <https://github.com/fnando/svg_sprite/blob/main/LICENSE.md>.
180
179
 
181
180
  ## Code of Conduct
182
181
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class SvgSprite
4
- VERSION = "1.0.2"
4
+ VERSION = "1.0.3"
5
5
  end
data/lib/svg_sprite.rb CHANGED
@@ -134,7 +134,7 @@ class SvgSprite
134
134
  Nokogiri::XML::Builder.new(encoding: "UTF-8") do |xml|
135
135
  xml.svg(
136
136
  xmlns: "http://www.w3.org/2000/svg",
137
- style: "display: none"
137
+ class: "#{name}--sprite"
138
138
  ) do |svg|
139
139
  svg.defs { } # rubocop:disable Lint/EmptyBlock
140
140
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svg_sprite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-12 00:00:00.000000000 Z
11
+ date: 2023-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
227
  - !ruby/object:Gem::Version
228
228
  version: '0'
229
229
  requirements: []
230
- rubygems_version: 3.3.3
230
+ rubygems_version: 3.4.3
231
231
  signing_key:
232
232
  specification_version: 4
233
233
  summary: Create SVG sprites using SVG links.