rqrcode 0.10.1 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ruby.yml +28 -0
  3. data/.gitignore +13 -0
  4. data/.rspec +2 -0
  5. data/CHANGELOG.md +79 -0
  6. data/Gemfile +4 -0
  7. data/Gemfile.lock +72 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +223 -135
  10. data/Rakefile +10 -0
  11. data/_config.yml +1 -0
  12. data/bin/console +14 -0
  13. data/images/ansi-screen-shot.png +0 -0
  14. data/images/github-qrcode.png +0 -0
  15. data/images/github-qrcode.svg +32 -0
  16. data/lib/rqrcode/export/ansi.rb +22 -25
  17. data/lib/rqrcode/export/html.rb +8 -10
  18. data/lib/rqrcode/export/png.rb +62 -46
  19. data/lib/rqrcode/export/svg.rb +180 -24
  20. data/lib/rqrcode/export.rb +6 -0
  21. data/lib/rqrcode/qrcode/qrcode.rb +17 -0
  22. data/lib/rqrcode/qrcode.rb +3 -4
  23. data/lib/rqrcode/version.rb +3 -1
  24. data/lib/rqrcode.rb +8 -19
  25. data/rqrcode.gemspec +39 -0
  26. metadata +90 -60
  27. data/CHANGELOG +0 -97
  28. data/LICENSE +0 -19
  29. data/lib/rqrcode/core_ext/array/behavior.rb +0 -12
  30. data/lib/rqrcode/core_ext/array.rb +0 -5
  31. data/lib/rqrcode/core_ext/integer/bitwise.rb +0 -13
  32. data/lib/rqrcode/core_ext/integer.rb +0 -5
  33. data/lib/rqrcode/core_ext.rb +0 -5
  34. data/lib/rqrcode/qrcode/qr_8bit_byte.rb +0 -36
  35. data/lib/rqrcode/qrcode/qr_alphanumeric.rb +0 -47
  36. data/lib/rqrcode/qrcode/qr_bit_buffer.rb +0 -99
  37. data/lib/rqrcode/qrcode/qr_code.rb +0 -585
  38. data/lib/rqrcode/qrcode/qr_math.rb +0 -63
  39. data/lib/rqrcode/qrcode/qr_numeric.rb +0 -57
  40. data/lib/rqrcode/qrcode/qr_polynomial.rb +0 -78
  41. data/lib/rqrcode/qrcode/qr_rs_block.rb +0 -314
  42. data/lib/rqrcode/qrcode/qr_util.rb +0 -272
  43. data/test/data.rb +0 -25
  44. data/test/test_helper.rb +0 -5
  45. data/test/test_regresions.rb +0 -10
  46. data/test/test_rqrcode.rb +0 -155
  47. data/test/test_rqrcode_export.rb +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 26f31be7d65a2c99f43c5f32b04624dd6ccf214e
4
- data.tar.gz: 4e102fa21c4509cd243bc175cb0d4f0093e4a009
2
+ SHA256:
3
+ metadata.gz: 46c752f56b2f26a71997009f105896a93874304e47b5453f6d399790ec5d67ee
4
+ data.tar.gz: 3a32e1b77c24d1118510084ad0b0f700ff54c8605c5e5cf77aca2c5efc782438
5
5
  SHA512:
6
- metadata.gz: dd864e4980b78fcfcc4b3c142fea0ee5205599eabfc74f3c9b16023b9c3d7505131dcfe78c4067e59672ffd0bfadd53db1a29a0b57eab6bd953e0c7f309a1cb3
7
- data.tar.gz: 10404efce4d90af63ab2f302f65243ceca285e736350d032acd5d48cf9b9fb768b67d5bf574e31a267f3b214cf0419cbfde6987fc12505282970628bf23da0cc
6
+ metadata.gz: 28ae604413d674f2c8fe6aac337aab7253874357d6d0e4e656c7e3cf743c8a65d102a5eeb8790601678d4c65172bbdd882cf1a51766d23df99b4253f0801a11d
7
+ data.tar.gz: 34fbe27e846970fe5b8571c446d6bee7327d46c3b645aaf07b141cf96d98c7beb918f6cc929408fd612940d260a0258c5656937f7283acbcf6cab0d00e09c082
@@ -0,0 +1,28 @@
1
+ name: rqrcode
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
10
+
11
+ jobs:
12
+ Build:
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ os: [ubuntu-latest, macos-latest]
17
+ ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
18
+ runs-on: ${{ matrix.os }}
19
+ steps:
20
+ - uses: actions/checkout@v3
21
+ - uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
25
+ - name: Run Tests for Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
26
+ run: bundle exec rake spec
27
+ - name: StandardRB check for Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
28
+ run: bundle exec standardrb --format progress
data/.gitignore ADDED
@@ -0,0 +1,13 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ /.devcontainer/
10
+ .rvmrc
11
+ *.sublime-project
12
+ *.sublime-workspace
13
+ *.gem
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/CHANGELOG.md ADDED
@@ -0,0 +1,79 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [2.2.0] - 2023-06-17
11
+
12
+ ### Changed
13
+
14
+ * Allow all ChunkyPNG::Color options to be passed into `fill` and `color` on `as_png` [#135]
15
+ * Add 3.2 to CI [@petergoldstein](https://github.com/petergoldstein) [#133]
16
+ * Development dependency upgrades. Minimum Ruby change [#130]
17
+ * README updates
18
+
19
+ ## [2.1.2] - 2022-07-26
20
+
21
+ ### Changed
22
+
23
+ * Remove setup script as it just calls bundle install [#128]
24
+ * Change inline styles to the fill property to allow for strict CSP style-src directive [#127]
25
+
26
+ ## [2.1.1] - 2022-02-11
27
+
28
+ ### Added
29
+
30
+ - 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]
31
+
32
+ ## [2.1.0] - 2021-08-26
33
+
34
+ ### Changed
35
+
36
+ - Sync Gemfile.lock with `rqrcode_core.1.2.0` [Adds Multimode Support](https://github.com/whomwah/rqrcode_core#multiple-encoding-support)
37
+
38
+ ### Added
39
+
40
+ - Add badge for Standard linting
41
+
42
+ ### Changed
43
+
44
+ - Corrected method name referred to in CHANGELOG.
45
+
46
+ ## [2.0.0] - 2021-05-06
47
+
48
+ ### Added
49
+
50
+ - A new `use_path:` option on `.as_svg`. This uses a `<path>` node to greatly reduce the final SVG size. [#108]
51
+ - A new `viewbox:` option on `.as_svg`. Replaces the `svg.width` and `svg.height` attribute with `svg.viewBox` to allow CSS scaling. [#112]
52
+ - A new `svg_attributes:` option on `.as_svg`. Allows you to pass in custom SVG attributes to be used in the `<svg>` tag. [#113]
53
+
54
+ ### Changed
55
+
56
+ - README updated
57
+ - Rakefile cleaned up. You can now just run `rake` which will run specs and fix linting using `standardrb`
58
+ - Small documentation clarification [@smnscp](https://github.com/smnscp)
59
+ - Bump `rqrcode_core` to `~> 1.0`
60
+
61
+ ### Breaking Change
62
+
63
+ - The dependency `rqrcode_core-1.0.0` has a tiny breaking change to the `to_s` public method. https://github.com/whomwah/rqrcode_core/blob/master/CHANGELOG.md#breaking-changes
64
+
65
+ ## [1.2.0] - 2020-12-26
66
+
67
+ ### Changed
68
+
69
+ - README updated
70
+ - bump dependencies
71
+ - fix `required_ruby_version` for Ruby 3 support
72
+
73
+ [unreleased]: https://github.com/whomwah/rqrcode/compare/v2.2.0...HEAD
74
+ [2.2.0]: https://github.com/whomwah/rqrcode/compare/v2.1.2...v2.2.0
75
+ [2.1.2]: https://github.com/whomwah/rqrcode/compare/v2.1.1...v2.1.2
76
+ [2.1.1]: https://github.com/whomwah/rqrcode/compare/v2.1.0...v2.1.1
77
+ [2.1.0]: https://github.com/whomwah/rqrcode/compare/v2.0.0...v2.1.0
78
+ [2.0.0]: https://github.com/whomwah/rqrcode/compare/v1.2.0...v2.0.0
79
+ [1.2.0]: https://github.com/whomwah/rqrcode/compare/v1.1.1...v1.2.0
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in rqrcode-base.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,72 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rqrcode (2.2.0)
5
+ chunky_png (~> 1.0)
6
+ rqrcode_core (~> 1.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ast (2.4.2)
12
+ chunky_png (1.4.0)
13
+ diff-lcs (1.5.0)
14
+ json (2.6.3)
15
+ language_server-protocol (3.17.0.2)
16
+ parallel (1.22.1)
17
+ parser (3.1.3.0)
18
+ ast (~> 2.4.1)
19
+ rainbow (3.1.1)
20
+ rake (13.0.6)
21
+ regexp_parser (2.6.1)
22
+ rexml (3.2.5)
23
+ rqrcode_core (1.2.0)
24
+ rspec (3.12.0)
25
+ rspec-core (~> 3.12.0)
26
+ rspec-expectations (~> 3.12.0)
27
+ rspec-mocks (~> 3.12.0)
28
+ rspec-core (3.12.0)
29
+ rspec-support (~> 3.12.0)
30
+ rspec-expectations (3.12.1)
31
+ diff-lcs (>= 1.2.0, < 2.0)
32
+ rspec-support (~> 3.12.0)
33
+ rspec-mocks (3.12.1)
34
+ diff-lcs (>= 1.2.0, < 2.0)
35
+ rspec-support (~> 3.12.0)
36
+ rspec-support (3.12.0)
37
+ rubocop (1.40.0)
38
+ json (~> 2.3)
39
+ parallel (~> 1.10)
40
+ parser (>= 3.1.2.1)
41
+ rainbow (>= 2.2.2, < 4.0)
42
+ regexp_parser (>= 1.8, < 3.0)
43
+ rexml (>= 3.2.5, < 4.0)
44
+ rubocop-ast (>= 1.23.0, < 2.0)
45
+ ruby-progressbar (~> 1.7)
46
+ unicode-display_width (>= 1.4.0, < 3.0)
47
+ rubocop-ast (1.24.0)
48
+ parser (>= 3.1.1.0)
49
+ rubocop-performance (1.15.1)
50
+ rubocop (>= 1.7.0, < 2.0)
51
+ rubocop-ast (>= 0.4.0)
52
+ ruby-progressbar (1.11.0)
53
+ standard (1.20.0)
54
+ language_server-protocol (~> 3.17.0.2)
55
+ rubocop (= 1.40.0)
56
+ rubocop-performance (= 1.15.1)
57
+ standardrb (1.0.1)
58
+ standard
59
+ unicode-display_width (2.3.0)
60
+
61
+ PLATFORMS
62
+ ruby
63
+
64
+ DEPENDENCIES
65
+ bundler (~> 2.0)
66
+ rake (~> 13.0)
67
+ rqrcode!
68
+ rspec (~> 3.5)
69
+ standardrb (~> 1.0)
70
+
71
+ BUNDLED WITH
72
+ 2.3.26
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2008 Duncan Robertson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.