qr4r 0.6.0 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +24 -0
- data/Gemfile.lock +29 -27
- data/examples/generate_qr4r.rb +12 -6
- data/lib/qr4r/version.rb +1 -1
- data/qr4r.gemspec +5 -5
- data/test/qr4r_test.rb +2 -2
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a74426b25620e205b5ca9cca37692501ccec993672452e56d091a82a8b571355
|
4
|
+
data.tar.gz: 9d7c281ee19813164899e8e523f8e45a288e7a2a1c0fa4a954bf347c52b79d9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eef8e66397b8708b30fe7c26ec977fddec52e10932e28e458cc9d28c618a21d3d5d02af62e0056d0d0ad7c8e898c12bb210977532cad2162d6d7f47151eed3c
|
7
|
+
data.tar.gz: 12f0888de8bf13a4ed858e607c0d371210920229486d8410eca59dbb4a8640307ab5ed7f4d528d2c245fe141127650f5bcbe9a6fd557c86d65b177bdcfa235bd
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub. They are
|
2
|
+
# provided by a third-party and are governed by separate terms of service,
|
3
|
+
# privacy policy, and support documentation.
|
4
|
+
#
|
5
|
+
# This workflow will install a prebuilt Ruby version, install dependencies, and
|
6
|
+
# run tests and linters.
|
7
|
+
name: "Ruby CI"
|
8
|
+
on:
|
9
|
+
push:
|
10
|
+
branches: [ '**' ]
|
11
|
+
jobs:
|
12
|
+
ruby-test:
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
steps:
|
15
|
+
- name: Checkout code
|
16
|
+
uses: actions/checkout@v3
|
17
|
+
- name: Ruby setup
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
bundler-cache: true
|
21
|
+
- name: Lint
|
22
|
+
run: bundle exec rubocop
|
23
|
+
- name: Test
|
24
|
+
run: bundle exec rake test
|
data/Gemfile.lock
CHANGED
@@ -1,40 +1,42 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
qr4r (0.6.
|
5
|
-
mojo_magick (~> 0.5)
|
6
|
-
rqrcode_core (~> 0
|
4
|
+
qr4r (0.6.2)
|
5
|
+
mojo_magick (~> 0.6.5)
|
6
|
+
rqrcode_core (~> 1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
ast (2.4.
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
ast (2.4.2)
|
12
|
+
json (2.6.3)
|
13
|
+
minitest (5.18.0)
|
14
|
+
mojo_magick (0.6.7)
|
15
|
+
parallel (1.23.0)
|
16
|
+
parser (3.2.2.0)
|
16
17
|
ast (~> 2.4.1)
|
17
|
-
rainbow (3.
|
18
|
-
rake (13.0.
|
19
|
-
regexp_parser (
|
20
|
-
rexml (3.2.
|
21
|
-
rqrcode_core (
|
22
|
-
rubocop (
|
18
|
+
rainbow (3.1.1)
|
19
|
+
rake (13.0.6)
|
20
|
+
regexp_parser (2.8.0)
|
21
|
+
rexml (3.2.5)
|
22
|
+
rqrcode_core (1.2.0)
|
23
|
+
rubocop (1.50.2)
|
24
|
+
json (~> 2.3)
|
23
25
|
parallel (~> 1.10)
|
24
|
-
parser (>= 2.
|
26
|
+
parser (>= 3.2.0.0)
|
25
27
|
rainbow (>= 2.2.2, < 4.0)
|
26
|
-
regexp_parser (>= 1.8)
|
27
|
-
rexml
|
28
|
-
rubocop-ast (>=
|
28
|
+
regexp_parser (>= 1.8, < 3.0)
|
29
|
+
rexml (>= 3.2.5, < 4.0)
|
30
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
29
31
|
ruby-progressbar (~> 1.7)
|
30
|
-
unicode-display_width (>=
|
31
|
-
rubocop-ast (
|
32
|
-
parser (>= 2.
|
33
|
-
rubocop-performance (1.
|
34
|
-
rubocop (>=
|
32
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
33
|
+
rubocop-ast (1.28.0)
|
34
|
+
parser (>= 3.2.1.0)
|
35
|
+
rubocop-performance (1.17.1)
|
36
|
+
rubocop (>= 1.7.0, < 2.0)
|
35
37
|
rubocop-ast (>= 0.4.0)
|
36
|
-
ruby-progressbar (1.
|
37
|
-
unicode-display_width (
|
38
|
+
ruby-progressbar (1.13.0)
|
39
|
+
unicode-display_width (2.4.2)
|
38
40
|
|
39
41
|
PLATFORMS
|
40
42
|
ruby
|
@@ -43,8 +45,8 @@ DEPENDENCIES
|
|
43
45
|
minitest (~> 5.14)
|
44
46
|
qr4r!
|
45
47
|
rake (~> 13.0)
|
46
|
-
rubocop (~> 0
|
48
|
+
rubocop (~> 1.0)
|
47
49
|
rubocop-performance (~> 1.8)
|
48
50
|
|
49
51
|
BUNDLED WITH
|
50
|
-
2.
|
52
|
+
2.2.33
|
data/examples/generate_qr4r.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
2
|
require "qr4r"
|
4
3
|
require "optparse"
|
5
|
-
require "ostruct"
|
6
4
|
|
7
5
|
class CmdlineOpts
|
8
6
|
@opts = nil
|
@@ -11,8 +9,16 @@ class CmdlineOpts
|
|
11
9
|
|
12
10
|
attr_reader :options
|
13
11
|
|
12
|
+
class Options
|
13
|
+
attr_accessor :format, :border, :pixel_size, :verbose
|
14
|
+
|
15
|
+
def to_h
|
16
|
+
{ format: format, border: border, pixel_size: pixel_size, verbose: verbose }
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
14
20
|
def initialize(args)
|
15
|
-
@options =
|
21
|
+
@options = Options.new
|
16
22
|
@options.format = "gif"
|
17
23
|
@options.border = 0
|
18
24
|
@options.pixel_size = 10
|
@@ -46,8 +52,8 @@ class CmdlineOpts
|
|
46
52
|
"Size for each qrcode pixel") do |px|
|
47
53
|
@options.pixel_size = px.to_i
|
48
54
|
end
|
49
|
-
opts.on("-v", "--[no-]verbose", "Be verbose") do |
|
50
|
-
@options.verbose =
|
55
|
+
opts.on("-v", "--[no-]verbose", "Be verbose") do |v|
|
56
|
+
@options.verbose = v
|
51
57
|
end
|
52
58
|
|
53
59
|
# No argument, shows at tail. This will print an options summary.
|
@@ -82,5 +88,5 @@ else
|
|
82
88
|
puts " and format #{options.format}"
|
83
89
|
end
|
84
90
|
|
85
|
-
Qr4r.encode(to_encode, outfile, cmd_options.options.
|
91
|
+
Qr4r.encode(to_encode, outfile, cmd_options.options.to_h)
|
86
92
|
end
|
data/lib/qr4r/version.rb
CHANGED
data/qr4r.gemspec
CHANGED
@@ -4,7 +4,7 @@ require "qr4r/version"
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.required_ruby_version = ">= 2.5.0"
|
6
6
|
s.name = "qr4r"
|
7
|
-
s.licenses = [
|
7
|
+
s.licenses = ["WTFPL"]
|
8
8
|
s.version = Qr4r::VERSION
|
9
9
|
s.platform = Gem::Platform::RUBY
|
10
10
|
s.authors = ["Jon Rogers"]
|
@@ -16,13 +16,13 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.rubyforge_project = "qr4r"
|
17
17
|
|
18
18
|
s.files = `git ls-files`.split("\n")
|
19
|
-
s.test_files = `git ls-files -- {test,features}/*`.split("\n")
|
20
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
21
20
|
s.require_paths = ["lib"]
|
22
|
-
s.add_dependency("mojo_magick",
|
23
|
-
s.add_dependency("rqrcode_core",
|
21
|
+
s.add_dependency("mojo_magick", "~> 0.6.5")
|
22
|
+
s.add_dependency("rqrcode_core", "~> 1.0")
|
24
23
|
s.add_development_dependency("minitest", "~> 5.14")
|
25
24
|
s.add_development_dependency("rake", "~> 13.0")
|
26
|
-
s.add_development_dependency("rubocop", "~> 0
|
25
|
+
s.add_development_dependency("rubocop", "~> 1.0")
|
27
26
|
s.add_development_dependency("rubocop-performance", "~> 1.8")
|
27
|
+
s.metadata["rubygems_mfa_required"] = "true"
|
28
28
|
end
|
data/test/qr4r_test.rb
CHANGED
@@ -31,8 +31,8 @@ class Qr4rTest < MiniTest::Test
|
|
31
31
|
# assert that it worked
|
32
32
|
assert File.exist?(f)
|
33
33
|
r = MojoMagick.get_image_size(f.path)
|
34
|
-
assert r[:height] == 33 * 3 + 20
|
35
|
-
assert r[:width] == 33 * 3 + 20
|
34
|
+
assert r[:height] == (33 * 3) + 20
|
35
|
+
assert r[:width] == (33 * 3) + 20
|
36
36
|
end
|
37
37
|
|
38
38
|
def test_encode_with_pixel_size
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qr4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Rogers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mojo_magick
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.6.5
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.6.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rqrcode_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0
|
75
|
+
version: '1.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0
|
82
|
+
version: '1.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rubocop-performance
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,6 +101,7 @@ executables: []
|
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
|
+
- ".github/workflows/ruby.yml"
|
104
105
|
- ".gitignore"
|
105
106
|
- ".rubocop-common.yml"
|
106
107
|
- ".rubocop-performance.yml"
|
@@ -123,7 +124,8 @@ files:
|
|
123
124
|
homepage: http://github.com/rcode5/qr4r
|
124
125
|
licenses:
|
125
126
|
- WTFPL
|
126
|
-
metadata:
|
127
|
+
metadata:
|
128
|
+
rubygems_mfa_required: 'true'
|
127
129
|
post_install_message:
|
128
130
|
rdoc_options: []
|
129
131
|
require_paths:
|
@@ -142,6 +144,5 @@ requirements: []
|
|
142
144
|
rubygems_version: 3.0.3
|
143
145
|
signing_key:
|
144
146
|
specification_version: 4
|
145
|
-
summary: qr4r-0.6.
|
146
|
-
test_files:
|
147
|
-
- test/qr4r_test.rb
|
147
|
+
summary: qr4r-0.6.2
|
148
|
+
test_files: []
|