rqrcode_core 2.0.1 → 2.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2b3d3813d020071319ff634841d068c5aad6d6371b0afbf9da9938b58ef64a3
4
- data.tar.gz: dfe04f683151122b8e5cb594dcc77ff439d4179fff88354e9476eae6686f49f1
3
+ metadata.gz: 8ae36b5e8654fbcb84247c8c60287e33f2104efa558e5eef0cd085fed1e51394
4
+ data.tar.gz: 462b3b44d61bde0d1a9e50eb617a8bd06f61297450339399f6db6377c0b9f61e
5
5
  SHA512:
6
- metadata.gz: 73bb2ade0334e78a235456e010f5f3f08467e2639601cc7e93ac6d5b43e61710dafa2627b4e1637d4d9815f5bd8b3dd7975a0e8c5bcc4feb98585614fc17dbfe
7
- data.tar.gz: a8b56be6fea7c29f528a00d9511c0a653438d4cfc426d676258ff66f4d8ff24462ae2757d9bec6544071d8ca689245692b4fe6a3dcaf6b3401eb7fd5334dd18d
6
+ metadata.gz: ca381a1dab19720731900ee4610053959fce0d2ddaa5132df2bda496d7b1d3a183e4413343d3ca48cd64b383aba15516200557ea1ae4af1cbe947e66822623f7
7
+ data.tar.gz: 75f36956b5f61f6762be2cbdd63409fd3d7b9df243cab6b8d25c7e8e64241ad148d496a386e446637518a872f9e21ca563b9df1d51819140f99bb9767fbcfc57
data/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ - Add comprehensive tests for QR code boundaries and encoding
11
+ - Performance optimisations: 80-90% faster QR code generation across all sizes
12
+ - Optimised demerit calculation functions (`demerit_points_1_same_color`, `demerit_points_2_full_blocks`, `demerit_points_3_dangerous_patterns`)
13
+ - Eliminated nested Range objects and redundant array lookups in hot paths
14
+ - Pre-computed frequently accessed values to reduce calculation overhead
15
+ - Large QR codes (v20) now generate in ~85ms vs ~154ms previously
16
+ - Memory optimisation: 70-76% reduction when using `RQRCODE_CORE_ARCH_BITS=32`
17
+ - Single large QR (v24): 8.53 MB → 2.92 MB
18
+ - Batch generation (100x v1): 37.91 MB → 9.10 MB
19
+ - Also provides 2-4% speed improvement due to better cache locality
20
+ - Add comprehensive benchmarking infrastructure with memory and performance profiling tools
21
+
10
22
  ## [2.0.1] - 2025-11-25
11
23
 
12
24
  - Update required_ruby_version to support >= rather than ~> ready for Ruby 4
data/README.md CHANGED
@@ -3,15 +3,15 @@
3
3
 
4
4
  # RQRCodeCore
5
5
 
6
- `rqrcode_core` is a library for encoding QR Codes in pure Ruby. It has a simple interface with all the standard qrcode options. It was originally adapted in 2008 from a Javascript library by [Kazuhiko Arase](https://github.com/kazuhikoarase).
6
+ `rqrcode_core` is a library for encoding QR Codes in pure Ruby. It has a simple interface with all the standard QR Code options. It was originally adapted in 2008 from a Javascript library by [Kazuhiko Arase](https://github.com/kazuhikoarase).
7
7
 
8
8
  Features:
9
9
 
10
10
  - `rqrcode_core` is a Ruby only library. It requires no 3rd party libraries. Just Ruby!
11
11
  - It is an encoding library. You can't decode QR Codes with it.
12
12
  - The interface is simple and assumes you just want to encode a string into a QR Code, but also allows for encoding multiple segments.
13
- - QR Code is trademarked by Denso Wave inc.
14
- - Minimum Ruby version is `>= 3.0.0`
13
+ - QR Code is trade marked by Denso Wave inc.
14
+ - Minimum Ruby version is `>= 3.2.0`
15
15
 
16
16
  `rqrcode_core` is the basis of the popular `rqrcode` gem [https://github.com/whomwah/rqrcode]. This gem allows you to generate different renderings of your QR Code, including `png`, `svg` and `ansi`.
17
17
 
@@ -132,9 +132,48 @@ $ rake standard # check
132
132
  $ rake standard:fix # fix
133
133
  ```
134
134
 
135
- ## Experimental
135
+ ## Performance Optimisation
136
136
 
137
- On 64 bit systems when generating lots of QR Codes the lib will consume more memory than on a 32 bit systems during the internal "right shift zero fill" steps (this is expected). In tests though, it's shown that by forcing the lib to think you're on a 32 systems greatly reduces the memory footprint. This could of course have undesired consequences too! but if you're happy to try, you can use the `RQRCODE_CORE_ARCH_BITS` ENV to make this change. e.g `RQRCODE_CORE_ARCH_BITS=32`.
137
+ ### Reduce Memory Usage by 70-76%
138
+
139
+ **If you're running on a 64-bit system, you can dramatically reduce memory consumption by setting:**
140
+
141
+ ```ruby
142
+ ENV['RQRCODE_CORE_ARCH_BITS'] = '32'
143
+ ```
144
+
145
+ Or from the command line:
146
+
147
+ ```bash
148
+ RQRCODE_CORE_ARCH_BITS=32 ruby your_script.rb
149
+ ```
150
+
151
+ #### Benchmark Results (64-bit vs 32-bit on 64-bit systems)
152
+
153
+ **Memory Savings:**
154
+ - Single small QR code: 0.38 MB → 0.10 MB (**74% reduction**)
155
+ - Single large QR code: 8.53 MB → 2.92 MB (**66% reduction**)
156
+ - 100 small QR codes: 37.91 MB → 9.10 MB (**76% reduction**)
157
+ - 10 large QR codes: 85.32 MB → 29.19 MB (**66% reduction**)
158
+
159
+ **Speed Improvement:**
160
+ - 2-4% faster across all scenarios (better cache utilization, reduced GC pressure)
161
+
162
+ **Object Allocation:**
163
+ - 85-87% fewer objects allocated
164
+ - Integer allocations nearly eliminated (from 70-76% to ~0%)
165
+
166
+ #### Why This Works
167
+
168
+ The QR code algorithm doesn't require 64-bit integers for its bit manipulation operations—32-bit is sufficient for all calculations. By default, Ruby on 64-bit systems uses 64-bit integers, which causes unnecessary memory allocation during the internal "right shift zero fill" operations.
169
+
170
+ **Recommendation:** Use `RQRCODE_CORE_ARCH_BITS=32` for production workloads, especially when:
171
+ - Generating QR codes in batch
172
+ - Running in memory-constrained environments
173
+ - Handling high-concurrency web requests
174
+ - Processing large QR codes (version 10+)
175
+
176
+ See `test/benchmarks/ARCH_BITS_ANALYSIS.md` for detailed benchmark data and analysis.
138
177
 
139
178
  ## Contributing
140
179
 
@@ -155,6 +155,7 @@ module RQRCodeCore
155
155
  end
156
156
  alias_method :dark?, :checked?
157
157
  extend Gem::Deprecate
158
+
158
159
  deprecate :dark?, :checked?, 2020, 1
159
160
 
160
161
  # This is a public method that returns the QR Code you have
@@ -60,12 +60,20 @@ module RQRCodeCore
60
60
  QRMODE[:mode_8bit_byte] => [8, 16, 16]
61
61
  }.freeze
62
62
 
63
- # This value is used during the right shift zero fill step. It is
64
- # auto set to 32 or 64 depending on the arch of your system running.
65
- # 64 consumes a LOT more memory. In tests it's shown changing it to 32
66
- # on 64 bit systems greatly reduces the memory footprint. You can use
67
- # RQRCODE_CORE_ARCH_BITS to make this change but beware it may also
68
- # have unintended consequences so use at your own risk.
63
+ # This value is used during the right shift zero fill step (rszf method).
64
+ # Auto-set to 32 or 64 depending on system architecture (1.size * 8).
65
+ #
66
+ # PERFORMANCE IMPACT (64-bit vs 32-bit on 64-bit systems):
67
+ # - Memory: 70-76% reduction (e.g., 37.91 MB 9.10 MB for 100 small QR codes)
68
+ # - Speed: 2-4% faster with 32-bit
69
+ # - Objects: 85-87% fewer allocations
70
+ # - All tests pass with ARCH_BITS=32
71
+ #
72
+ # RECOMMENDATION: Use RQRCODE_CORE_ARCH_BITS=32 even on 64-bit systems
73
+ # for dramatic memory savings with no downsides. The QR code algorithm
74
+ # doesn't require 64-bit integers—32-bit is sufficient for all operations.
75
+ #
76
+ # See test/benchmarks/ARCH_BITS_ANALYSIS.md for detailed benchmark data.
69
77
  ARCH_BITS = ENV.fetch("RQRCODE_CORE_ARCH_BITS", nil)&.to_i || 1.size * 8
70
78
 
71
79
  def self.max_size
@@ -109,9 +117,7 @@ module RQRCodeCore
109
117
  end
110
118
 
111
119
  def self.get_mask(mask_pattern, i, j)
112
- if mask_pattern > QRMASKCOMPUTATIONS.size
113
- raise QRCodeRunTimeError, "bad mask_pattern: #{mask_pattern}"
114
- end
120
+ raise QRCodeRunTimeError, "bad mask_pattern: #{mask_pattern}" if mask_pattern > QRMASKCOMPUTATIONS.size
115
121
 
116
122
  QRMASKCOMPUTATIONS[mask_pattern].call(i, j)
117
123
  end
@@ -127,13 +133,9 @@ module RQRCodeCore
127
133
  end
128
134
 
129
135
  def self.get_length_in_bits(mode, version)
130
- if !QRMODE.value?(mode)
131
- raise QRCodeRunTimeError, "Unknown mode: #{mode}"
132
- end
136
+ raise QRCodeRunTimeError, "Unknown mode: #{mode}" unless QRMODE.value?(mode)
133
137
 
134
- if version > 40
135
- raise QRCodeRunTimeError, "Unknown version: #{version}"
136
- end
138
+ raise QRCodeRunTimeError, "Unknown version: #{version}" if version > 40
137
139
 
138
140
  if version.between?(1, 9)
139
141
  # 1 - 9
@@ -163,28 +165,40 @@ module RQRCodeCore
163
165
  def self.demerit_points_1_same_color(modules)
164
166
  demerit_points = 0
165
167
  module_count = modules.size
168
+ max_index = module_count - 1
166
169
 
167
170
  # level1
168
- (0...module_count).each do |row|
169
- (0...module_count).each do |col|
171
+ module_count.times do |row|
172
+ modules_row = modules[row]
173
+
174
+ module_count.times do |col|
170
175
  same_count = 0
171
- dark = modules[row][col]
172
-
173
- (-1..1).each do |r|
174
- next if row + r < 0 || module_count <= row + r
175
-
176
- (-1..1).each do |c|
177
- next if col + c < 0 || module_count <= col + c
178
- next if r == 0 && c == 0
179
- if dark == modules[row + r][col + c]
180
- same_count += 1
181
- end
182
- end
176
+ dark = modules_row[col]
177
+
178
+ # Check 3x3 neighborhood, but skip center cell
179
+ # Unroll loops and eliminate range objects for performance
180
+
181
+ # Row above (row - 1)
182
+ if row > 0
183
+ row_above = modules[row - 1]
184
+ same_count += 1 if col > 0 && dark == row_above[col - 1]
185
+ same_count += 1 if dark == row_above[col]
186
+ same_count += 1 if col < max_index && dark == row_above[col + 1]
183
187
  end
184
188
 
185
- if same_count > 5
186
- demerit_points += (DEMERIT_POINTS_1 + same_count - 5)
189
+ # Same row
190
+ same_count += 1 if col > 0 && dark == modules_row[col - 1]
191
+ same_count += 1 if col < max_index && dark == modules_row[col + 1]
192
+
193
+ # Row below (row + 1)
194
+ if row < max_index
195
+ row_below = modules[row + 1]
196
+ same_count += 1 if col > 0 && dark == row_below[col - 1]
197
+ same_count += 1 if dark == row_below[col]
198
+ same_count += 1 if col < max_index && dark == row_below[col + 1]
187
199
  end
200
+
201
+ demerit_points += (DEMERIT_POINTS_1 + same_count - 5) if same_count > 5
188
202
  end
189
203
  end
190
204
 
@@ -194,16 +208,19 @@ module RQRCodeCore
194
208
  def self.demerit_points_2_full_blocks(modules)
195
209
  demerit_points = 0
196
210
  module_count = modules.size
197
-
198
- # level 2
199
- (0...(module_count - 1)).each do |row|
200
- (0...(module_count - 1)).each do |col|
201
- count = 0
202
- count += 1 if modules[row][col]
203
- count += 1 if modules[row + 1][col]
204
- count += 1 if modules[row][col + 1]
205
- count += 1 if modules[row + 1][col + 1]
206
- if count == 0 || count == 4
211
+ max_row = module_count - 1
212
+
213
+ # level 2: Check for 2x2 blocks of same color
214
+ # Only need to check (module_count - 1) x (module_count - 1) positions
215
+ max_row.times do |row|
216
+ row_curr = modules[row]
217
+ row_next = modules[row + 1]
218
+
219
+ max_row.times do |col|
220
+ # Check if all 4 modules in 2x2 block have same color
221
+ # (count == 0: all false, count == 4: all true)
222
+ val = row_curr[col]
223
+ if val == row_next[col] && val == row_curr[col + 1] && val == row_next[col + 1]
207
224
  demerit_points += DEMERIT_POINTS_2
208
225
  end
209
226
  end
@@ -215,31 +232,27 @@ module RQRCodeCore
215
232
  def self.demerit_points_3_dangerous_patterns(modules)
216
233
  demerit_points = 0
217
234
  module_count = modules.size
235
+ pattern_len = 7
236
+ max_start = module_count - pattern_len + 1
237
+
238
+ # level 3: Check for dangerous pattern [dark, light, dark, dark, dark, light, dark]
239
+ # Pattern: true, false, true, true, true, false, true (1:1:3:1:1 ratio)
218
240
 
219
- # level 3
241
+ # Check rows
220
242
  modules.each do |row|
221
- (module_count - 6).times do |col_idx|
222
- if row[col_idx] &&
223
- !row[col_idx + 1] &&
224
- row[col_idx + 2] &&
225
- row[col_idx + 3] &&
226
- row[col_idx + 4] &&
227
- !row[col_idx + 5] &&
228
- row[col_idx + 6]
243
+ max_start.times do |col|
244
+ if row[col] && !row[col + 1] && row[col + 2] &&
245
+ row[col + 3] && row[col + 4] && !row[col + 5] && row[col + 6]
229
246
  demerit_points += DEMERIT_POINTS_3
230
247
  end
231
248
  end
232
249
  end
233
250
 
234
- (0...module_count).each do |col|
235
- (0...(module_count - 6)).each do |row|
236
- if modules[row][col] &&
237
- !modules[row + 1][col] &&
238
- modules[row + 2][col] &&
239
- modules[row + 3][col] &&
240
- modules[row + 4][col] &&
241
- !modules[row + 5][col] &&
242
- modules[row + 6][col]
251
+ # Check columns
252
+ module_count.times do |col|
253
+ max_start.times do |row|
254
+ if modules[row][col] && !modules[row + 1][col] && modules[row + 2][col] &&
255
+ modules[row + 3][col] && modules[row + 4][col] && !modules[row + 5][col] && modules[row + 6][col]
243
256
  demerit_points += DEMERIT_POINTS_3
244
257
  end
245
258
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RQRCodeCore
4
- VERSION = "2.0.1"
4
+ VERSION = "2.1.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rqrcode_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Duncan Robertson
@@ -10,7 +10,7 @@ cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
- name: bundler
13
+ name: benchmark-ips
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - "~>"
@@ -24,33 +24,75 @@ dependencies:
24
24
  - !ruby/object:Gem::Version
25
25
  version: '2.0'
26
26
  - !ruby/object:Gem::Dependency
27
- name: rake
27
+ name: bundler
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '13.0'
32
+ version: '4.0'
33
33
  type: :development
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '13.0'
39
+ version: '4.0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: memory_profiler
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.0'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.0'
40
54
  - !ruby/object:Gem::Dependency
41
55
  name: minitest
42
56
  requirement: !ruby/object:Gem::Requirement
43
57
  requirements:
44
58
  - - "~>"
45
59
  - !ruby/object:Gem::Version
46
- version: '5.0'
60
+ version: '6.0'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '6.0'
68
+ - !ruby/object:Gem::Dependency
69
+ name: rake
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '13.3'
75
+ type: :development
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '13.3'
82
+ - !ruby/object:Gem::Dependency
83
+ name: stackprof
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '0.2'
47
89
  type: :development
48
90
  prerelease: false
49
91
  version_requirements: !ruby/object:Gem::Requirement
50
92
  requirements:
51
93
  - - "~>"
52
94
  - !ruby/object:Gem::Version
53
- version: '5.0'
95
+ version: '0.2'
54
96
  - !ruby/object:Gem::Dependency
55
97
  name: standard
56
98
  requirement: !ruby/object:Gem::Requirement
@@ -74,17 +116,9 @@ executables: []
74
116
  extensions: []
75
117
  extra_rdoc_files: []
76
118
  files:
77
- - ".github/FUNDING.yml"
78
- - ".github/workflows/ruby.yml"
79
- - ".gitignore"
80
119
  - CHANGELOG.md
81
- - Gemfile
82
- - Gemfile.lock
83
120
  - LICENSE.txt
84
121
  - README.md
85
- - Rakefile
86
- - bin/console
87
- - bin/setup
88
122
  - lib/rqrcode_core.rb
89
123
  - lib/rqrcode_core/qrcode.rb
90
124
  - lib/rqrcode_core/qrcode/qr_8bit_byte.rb
@@ -99,7 +133,6 @@ files:
99
133
  - lib/rqrcode_core/qrcode/qr_segment.rb
100
134
  - lib/rqrcode_core/qrcode/qr_util.rb
101
135
  - lib/rqrcode_core/version.rb
102
- - rqrcode_core.gemspec
103
136
  homepage: https://github.com/whomwah/rqrcode_core
104
137
  licenses:
105
138
  - MIT
@@ -113,14 +146,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
146
  requirements:
114
147
  - - ">="
115
148
  - !ruby/object:Gem::Version
116
- version: '3.0'
149
+ version: '3.2'
117
150
  required_rubygems_version: !ruby/object:Gem::Requirement
118
151
  requirements:
119
152
  - - ">="
120
153
  - !ruby/object:Gem::Version
121
154
  version: '0'
122
155
  requirements: []
123
- rubygems_version: 3.7.2
156
+ rubygems_version: 4.0.3
124
157
  specification_version: 4
125
158
  summary: A library to encode QR Codes
126
159
  test_files: []
data/.github/FUNDING.yml DELETED
@@ -1,4 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: whomwah
4
- buy_me_a_coffee: duncanrobertson
@@ -1,28 +0,0 @@
1
- name: rqrcode_core
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- - release
8
- pull_request: # Runs on any PR regardless of target branch
9
- workflow_dispatch:
10
-
11
- jobs:
12
- Build:
13
- strategy:
14
- fail-fast: false
15
- matrix:
16
- os: [ubuntu-latest, macos-latest]
17
- ruby: ["3.0", "3.1", "3.2", "3.3", "3.4"]
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
26
- run: bundle exec rake test
27
- - name: StandardRB Check
28
- run: bundle exec standardrb --format progress
data/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- /.devcontainer/
10
- *.gem
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in rqrcode-base.gemspec
4
- gemspec
data/Gemfile.lock DELETED
@@ -1,64 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rqrcode_core (2.0.1)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- ast (2.4.2)
10
- json (2.7.2)
11
- language_server-protocol (3.17.0.3)
12
- lint_roller (1.1.0)
13
- minitest (5.25.1)
14
- parallel (1.26.3)
15
- parser (3.3.5.0)
16
- ast (~> 2.4.1)
17
- racc
18
- racc (1.8.1)
19
- rainbow (3.1.1)
20
- rake (13.2.1)
21
- regexp_parser (2.9.2)
22
- rubocop (1.66.1)
23
- json (~> 2.3)
24
- language_server-protocol (>= 3.17.0)
25
- parallel (~> 1.10)
26
- parser (>= 3.3.0.2)
27
- rainbow (>= 2.2.2, < 4.0)
28
- regexp_parser (>= 2.4, < 3.0)
29
- rubocop-ast (>= 1.32.2, < 2.0)
30
- ruby-progressbar (~> 1.7)
31
- unicode-display_width (>= 2.4.0, < 3.0)
32
- rubocop-ast (1.32.3)
33
- parser (>= 3.3.1.0)
34
- rubocop-performance (1.22.1)
35
- rubocop (>= 1.48.1, < 2.0)
36
- rubocop-ast (>= 1.31.1, < 2.0)
37
- ruby-progressbar (1.13.0)
38
- standard (1.41.0)
39
- language_server-protocol (~> 3.17.0.2)
40
- lint_roller (~> 1.0)
41
- rubocop (~> 1.66.0)
42
- standard-custom (~> 1.0.0)
43
- standard-performance (~> 1.5)
44
- standard-custom (1.0.2)
45
- lint_roller (~> 1.0)
46
- rubocop (~> 1.50)
47
- standard-performance (1.5.0)
48
- lint_roller (~> 1.1)
49
- rubocop-performance (~> 1.22.0)
50
- unicode-display_width (2.6.0)
51
-
52
- PLATFORMS
53
- aarch64-linux
54
- ruby
55
-
56
- DEPENDENCIES
57
- bundler (~> 2.0)
58
- minitest (~> 5.0)
59
- rake (~> 13.0)
60
- rqrcode_core!
61
- standard (~> 1.41)
62
-
63
- BUNDLED WITH
64
- 2.5.16
data/Rakefile DELETED
@@ -1,19 +0,0 @@
1
- begin
2
- require "rake/testtask"
3
- require "standard/rake"
4
-
5
- Rake::TestTask.new(:test) do |t|
6
- t.libs << "test"
7
- t.libs << "lib"
8
- t.test_files = FileList["test/**/*_test.rb"]
9
- end
10
-
11
- task default: [:test, "standard:fix"]
12
-
13
- desc "Run a simple benchmark (x1000)"
14
- task :benchmark do
15
- ruby "test/benchmark.rb"
16
- end
17
- rescue LoadError
18
- # no standard/rspec available
19
- end
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "rqrcode_core"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/rqrcode_core.gemspec DELETED
@@ -1,36 +0,0 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require "rqrcode_core/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "rqrcode_core"
7
- spec.version = RQRCodeCore::VERSION
8
- spec.platform = Gem::Platform::RUBY
9
- spec.authors = ["Duncan Robertson"]
10
- spec.email = ["duncan@whomwah.com"]
11
-
12
- spec.summary = "A library to encode QR Codes"
13
- spec.description = <<~EOF
14
- rqrcode_core is a Ruby library for encoding QR Codes. The simple
15
- interface (with no runtime dependencies) allows you to create QR Code data structures.
16
- EOF
17
- spec.homepage = "https://github.com/whomwah/rqrcode_core"
18
- spec.license = "MIT"
19
- spec.metadata = {
20
- "bug_tracker_uri" => "https://github.com/whomwah/rqrcode_core/issues",
21
- "changelog_uri" => "https://github.com/whomwah/rqrcode_core/blob/main/CHANGELOG.md"
22
- }
23
-
24
- spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
25
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
- end
27
- spec.bindir = "exe"
28
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
- spec.require_paths = ["lib"]
30
-
31
- spec.required_ruby_version = ">= 3.0"
32
- spec.add_development_dependency "bundler", "~> 2.0"
33
- spec.add_development_dependency "rake", "~> 13.0"
34
- spec.add_development_dependency "minitest", "~> 5.0"
35
- spec.add_development_dependency "standard", "~> 1.41"
36
- end