rqrcode 2.1.1 → 2.1.2
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 +7 -1
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/rqrcode/export/svg.rb +3 -3
- data/lib/rqrcode/version.rb +1 -1
- metadata +3 -4
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7f00d7af65a23ac1eeebda231f79607353d52c8b6b83072b53642fbcf5c4b88
|
4
|
+
data.tar.gz: a7cc3db7028ab710f6b325cbd76a91db4da23b889f65252f1faa99cfc319512f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 328a1114929797f4a47e0101055afe1e73f7fc9b015ca8435069aecdecff29699f9c694e158bca0aff52003b8b0cb8072a1296fee48a93bea00c55a1d0c565ba
|
7
|
+
data.tar.gz: e6b0bbdc6e99265e6d9b00260bb55a4c92669cadff5720d93fca5d2f450002d3f885772377eeb8191468853b17fde9c834db6d27aafd20609b3dd2c95c4ec958
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [2.1.2] - 2022-07-26
|
11
|
+
|
12
|
+
* Remove setup script as it just calls bundle install [#128]
|
13
|
+
* Change inline styles to the fill property to allow for strict CSP style-src directive [#127]
|
14
|
+
|
10
15
|
## [2.1.1] - 2022-02-11
|
11
16
|
|
12
17
|
- Added in a handler for when color arguments are passed in as symbols e.g `color: :yellow`. This also allows for the use of the `:currentColor` keyword. [#122]
|
@@ -47,7 +52,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
47
52
|
- bump dependencies
|
48
53
|
- fix `required_ruby_version` for Ruby 3 support
|
49
54
|
|
50
|
-
[unreleased]: https://github.com/whomwah/rqrcode/compare/v2.1.
|
55
|
+
[unreleased]: https://github.com/whomwah/rqrcode/compare/v2.1.2...HEAD
|
56
|
+
[2.1.2]: https://github.com/whomwah/rqrcode/compare/v2.1.1...v2.1.2
|
51
57
|
[2.1.1]: https://github.com/whomwah/rqrcode/compare/v2.1.0...v2.1.1
|
52
58
|
[2.1.0]: https://github.com/whomwah/rqrcode/compare/v2.0.0...v2.1.0
|
53
59
|
[2.0.0]: https://github.com/whomwah/rqrcode/compare/v1.2.0...v2.0.0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -251,7 +251,7 @@ svg = qrcode.as_ansi(
|
|
251
251
|
You can run the test suite using:
|
252
252
|
|
253
253
|
```
|
254
|
-
$
|
254
|
+
$ bundle install
|
255
255
|
$ rake # runs specs and standard:fix
|
256
256
|
$ rake spec # just runs the specs
|
257
257
|
```
|
@@ -267,7 +267,7 @@ $ ./bin/console
|
|
267
267
|
The project uses [standardrb](https://github.com/testdouble/standard) and can be used with:
|
268
268
|
|
269
269
|
```
|
270
|
-
$
|
270
|
+
$ bundle install
|
271
271
|
$ rake standard # checks
|
272
272
|
$ rake standard:fix # fixes
|
273
273
|
```
|
data/lib/rqrcode/export/svg.rb
CHANGED
@@ -79,7 +79,7 @@ module RQRCode
|
|
79
79
|
# Prefix hexadecimal colors unless using a named color (symbol)
|
80
80
|
color = "##{color}" unless color.is_a?(Symbol)
|
81
81
|
|
82
|
-
@result << %{<path d="#{path.join}"
|
82
|
+
@result << %{<path d="#{path.join}" fill="#{color}" transform="translate(#{offset},#{offset}) scale(#{module_size})"/>}
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
@@ -95,7 +95,7 @@ module RQRCode
|
|
95
95
|
x = r * module_size + offset
|
96
96
|
|
97
97
|
next unless @qrcode.checked?(c, r)
|
98
|
-
tmp << %(<rect width="#{module_size}" height="#{module_size}" x="#{x}" y="#{y}"
|
98
|
+
tmp << %(<rect width="#{module_size}" height="#{module_size}" x="#{x}" y="#{y}" fill="#{color}"/>)
|
99
99
|
end
|
100
100
|
|
101
101
|
@result << tmp.join
|
@@ -192,7 +192,7 @@ module RQRCode
|
|
192
192
|
if fill
|
193
193
|
# Prefix hexadecimal colors unless using a named color (symbol)
|
194
194
|
fill = "##{fill}" unless fill.is_a?(Symbol)
|
195
|
-
output_tag.result.unshift %(<rect width="#{dimension}" height="#{dimension}" x="0" y="0"
|
195
|
+
output_tag.result.unshift %(<rect width="#{dimension}" height="#{dimension}" x="0" y="0" fill="#{fill}"/>)
|
196
196
|
end
|
197
197
|
|
198
198
|
if standalone
|
data/lib/rqrcode/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rqrcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Duncan Robertson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rqrcode_core
|
@@ -115,7 +115,6 @@ files:
|
|
115
115
|
- Rakefile
|
116
116
|
- _config.yml
|
117
117
|
- bin/console
|
118
|
-
- bin/setup
|
119
118
|
- images/ansi-screen-shot.png
|
120
119
|
- images/github-qrcode.png
|
121
120
|
- images/github-qrcode.svg
|
@@ -150,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
149
|
- !ruby/object:Gem::Version
|
151
150
|
version: '0'
|
152
151
|
requirements: []
|
153
|
-
rubygems_version: 3.3.
|
152
|
+
rubygems_version: 3.3.7
|
154
153
|
signing_key:
|
155
154
|
specification_version: 4
|
156
155
|
summary: A library to encode QR Codes
|