qr4r 0.6.1 → 0.6.2

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: 7aa78673d39ee4d055a6fb629f57748305e9465ae6448155b8b9c7c37c30450f
4
- data.tar.gz: 27d52de34743e9d6d5e775b97d1bfd5c15cb8e9640d60621c242fba54fed3a2c
3
+ metadata.gz: a74426b25620e205b5ca9cca37692501ccec993672452e56d091a82a8b571355
4
+ data.tar.gz: 9d7c281ee19813164899e8e523f8e45a288e7a2a1c0fa4a954bf347c52b79d9c
5
5
  SHA512:
6
- metadata.gz: b2a47b28faf09f801b787bbedafb01da0c997a57bf1d43be8895afcf654aa2f06a5d4400662088fbbb0373029b0f977813788ee1a5ba7fce98d521a9eccfc1ad
7
- data.tar.gz: ae6d88740bb47720ba565b2413f3a1480f0dd6c10dfe34252e30d01311d70a6f2513024d09adc4c8b1f627d64b4dcc63ffcfdda222386db8615ed8b725af5113
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.1)
4
+ qr4r (0.6.2)
5
5
  mojo_magick (~> 0.6.5)
6
- rqrcode_core (~> 0.1)
6
+ rqrcode_core (~> 1.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  ast (2.4.2)
12
- minitest (5.14.4)
13
- mojo_magick (0.6.5)
14
- parallel (1.20.1)
15
- parser (3.0.1.0)
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.0.0)
18
- rake (13.0.3)
19
- regexp_parser (2.1.1)
18
+ rainbow (3.1.1)
19
+ rake (13.0.6)
20
+ regexp_parser (2.8.0)
20
21
  rexml (3.2.5)
21
- rqrcode_core (0.2.0)
22
- rubocop (0.93.1)
22
+ rqrcode_core (1.2.0)
23
+ rubocop (1.50.2)
24
+ json (~> 2.3)
23
25
  parallel (~> 1.10)
24
- parser (>= 2.7.1.5)
26
+ parser (>= 3.2.0.0)
25
27
  rainbow (>= 2.2.2, < 4.0)
26
- regexp_parser (>= 1.8)
27
- rexml
28
- rubocop-ast (>= 0.6.0)
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 (>= 1.4.0, < 2.0)
31
- rubocop-ast (1.4.1)
32
- parser (>= 2.7.1.5)
33
- rubocop-performance (1.10.2)
34
- rubocop (>= 0.90.0, < 2.0)
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.11.0)
37
- unicode-display_width (1.7.0)
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.93)
48
+ rubocop (~> 1.0)
47
49
  rubocop-performance (~> 1.8)
48
50
 
49
51
  BUNDLED WITH
50
- 2.1.4
52
+ 2.2.33
@@ -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 = OpenStruct.new
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 |_v|
50
- @options.verbose = V
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.marshal_dump)
91
+ Qr4r.encode(to_encode, outfile, cmd_options.options.to_h)
86
92
  end
data/lib/qr4r/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Qr4r
2
- VERSION = "0.6.1".freeze
2
+ VERSION = "0.6.2".freeze
3
3
  end
data/qr4r.gemspec CHANGED
@@ -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
21
  s.add_dependency("mojo_magick", "~> 0.6.5")
23
- s.add_dependency("rqrcode_core", "~> 0.1")
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.93")
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.1
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: 2021-05-01 00:00:00.000000000 Z
11
+ date: 2023-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mojo_magick
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.1'
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.1'
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.93'
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.93'
82
+ version: '1.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop-performance
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -101,7 +101,7 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - ".circleci/config.yml"
104
+ - ".github/workflows/ruby.yml"
105
105
  - ".gitignore"
106
106
  - ".rubocop-common.yml"
107
107
  - ".rubocop-performance.yml"
@@ -124,7 +124,8 @@ files:
124
124
  homepage: http://github.com/rcode5/qr4r
125
125
  licenses:
126
126
  - WTFPL
127
- metadata: {}
127
+ metadata:
128
+ rubygems_mfa_required: 'true'
128
129
  post_install_message:
129
130
  rdoc_options: []
130
131
  require_paths:
@@ -143,6 +144,5 @@ requirements: []
143
144
  rubygems_version: 3.0.3
144
145
  signing_key:
145
146
  specification_version: 4
146
- summary: qr4r-0.6.1
147
- test_files:
148
- - test/qr4r_test.rb
147
+ summary: qr4r-0.6.2
148
+ test_files: []
data/.circleci/config.yml DELETED
@@ -1,18 +0,0 @@
1
- version: 2.1
2
- orbs:
3
- ruby: circleci/ruby@1.1.2
4
-
5
- jobs:
6
- build:
7
- docker:
8
- - image: circleci/ruby:2.6.3-stretch-node
9
- executor: ruby/default
10
- steps:
11
- - checkout
12
- - ruby/install-deps
13
- - run:
14
- name: Run unit tests using Rake
15
- command: |
16
- RAILS_ENV=test bundle exec rake test
17
- - store_test_results:
18
- path: test/reports