ruby-zint 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,87 @@
1
+ module Zint
2
+ module Native
3
+ extend FFI::Library
4
+
5
+ root_path = File.expand_path("../../..", __FILE__)
6
+ prefix = FFI::Platform::LIBPREFIX.empty? ? "lib" : FFI::Platform::LIBPREFIX
7
+ bundled_dll = File.join(root_path, "lib/#{prefix}zint.#{FFI::Platform::LIBSUFFIX}")
8
+ ffi_lib [bundled_dll, "libzint.so.2.10", "libzint", "zint"]
9
+
10
+ # Error codes (API return values)
11
+ enum :error_code, [Constants::Warnings::WARNINGS, Constants::Errors::ERRORS].map { |h| h.to_a }.flatten
12
+
13
+ # Aliases for better method signatures
14
+ typedef Structs::Symbol.by_ref, :zint_symbol
15
+ typedef :pointer, :filename
16
+ typedef :int32, :length
17
+ typedef :int32, :rotate_angle
18
+ typedef :int32, :symbol_id
19
+ typedef :uint32, :cap_flag
20
+ typedef :string, :source
21
+
22
+ # Create and initialize a symbol structure
23
+ attach_function(:ZBarcode_Create, [], :zint_symbol)
24
+
25
+ # Free any output buffers that may have been created and initialize output fields
26
+ attach_function(:ZBarcode_Clear, [:zint_symbol], :void)
27
+
28
+ # Free a symbol structure, including any output buffers
29
+ #
30
+ # For use with ruby's garbage collector ZBarcode_Delete must be called with a plain :pointer and not an :zint_symbol.
31
+ attach_function(:ZBarcode_Delete, [:pointer], :void)
32
+
33
+ # Encode a barcode. If `length` is 0, `source` must be NUL-terminated.
34
+ attach_function(:ZBarcode_Encode, [:zint_symbol, :source, :length], :error_code)
35
+
36
+ # Encode a barcode using input data from file `filename`
37
+ attach_function(:ZBarcode_Encode_File, [:zint_symbol, :filename], :error_code)
38
+
39
+ # Output a previously encoded symbol to file `symbol->outfile`
40
+ attach_function(:ZBarcode_Print, [:zint_symbol, :rotate_angle], :error_code)
41
+
42
+ # Encode and output a symbol to file `symbol->outfile`
43
+ attach_function(:ZBarcode_Encode_and_Print, [:zint_symbol, :source, :length, :rotate_angle], :error_code)
44
+
45
+ # Encode a symbol using input data from file `filename` and output to file `symbol->outfile`
46
+ attach_function(:ZBarcode_Encode_File_and_Print, [:zint_symbol, :filename, :rotate_angle], :error_code)
47
+
48
+ # Output a previously encoded symbol to memory as raster (`symbol->bitmap`)
49
+ attach_function(:ZBarcode_Buffer, [:zint_symbol, :rotate_angle], :error_code)
50
+
51
+ # Encode and output a symbol to memory as raster (`symbol->bitmap`)
52
+ attach_function(:ZBarcode_Encode_and_Buffer, [:zint_symbol, :source, :length, :rotate_angle], :error_code)
53
+
54
+ # Encode a symbol using input data from file `filename` and output to memory as raster (`symbol->bitmap`)
55
+ attach_function(:ZBarcode_Encode_File_and_Buffer, [:zint_symbol, :filename, :rotate_angle], :error_code)
56
+
57
+ # Output a previously encoded symbol to memory as vector (`symbol->vector`)
58
+ attach_function(:ZBarcode_Buffer_Vector, [:zint_symbol, :rotate_angle], :error_code)
59
+
60
+ # Encode and output a symbol to memory as vector (`symbol->vector`)
61
+ attach_function(:ZBarcode_Encode_and_Buffer_Vector, [:zint_symbol, :source, :length, :rotate_angle], :error_code)
62
+
63
+ # Encode a symbol using input data from file `filename` and output to memory as vector (`symbol->vector`)
64
+ attach_function(:ZBarcode_Encode_File_and_Buffer_Vector, [:zint_symbol, :filename, :rotate_angle], :error_code)
65
+
66
+ # Is `symbol_id` a recognized symbology?
67
+ attach_function(:ZBarcode_ValidID, [:symbol_id], :bool)
68
+
69
+ # Return the capability flags for symbology `symbol_id` that match `cap_flag`
70
+ attach_function(:ZBarcode_Cap, [:symbol_id, :cap_flag], :uint32)
71
+
72
+ # Return the version of Zint linked to
73
+ attach_function(:ZBarcode_Version, [], :int32)
74
+
75
+ # Raises specific error for API return code
76
+ #
77
+ # @param res [Symbol, Integer] API return code
78
+ # @param text [String] error text
79
+ # @raise [Error]
80
+ def self.raise_error(res, text)
81
+ klass = ERROR_CLASS_FOR_RESULT[res.is_a?(Symbol) ? Zint::ERRORS[res] : res]
82
+ raise klass, text
83
+ end
84
+ end
85
+
86
+ private_constant :Native
87
+ end
@@ -1,6 +1,6 @@
1
1
  module Zint
2
2
  module Structs
3
- class Symbol < FFI::Struct
3
+ class Symbol < FFI::ManagedStruct
4
4
  layout :symbology, :int,
5
5
  :height, :float,
6
6
  :whitespace_width, :int,
@@ -33,9 +33,14 @@ module Zint
33
33
  :alphamap, :pointer,
34
34
  :bitmap_byte_length, :uchar,
35
35
  :dot_size, :float,
36
- :vector, :pointer,
36
+ :vector, Vector.by_ref,
37
37
  :debug, :int,
38
38
  :warn_level, :int
39
+
40
+ # @private
41
+ def self.release(ptr)
42
+ Native.ZBarcode_Delete(ptr)
43
+ end
39
44
  end
40
45
  end
41
46
  end
@@ -1,12 +1,54 @@
1
1
  module Zint
2
2
  module Structs
3
3
  class Vector < FFI::Struct
4
- layout :width, :float,
4
+ layout :width, :float, # Width, height of barcode image (including text, whitespace)
5
5
  :height, :float,
6
- :rectangles, :pointer,
7
- :hexagons, :pointer,
8
- :strings, :pointer,
9
- :circles, :pointer
6
+ :rectangles, VectorRect.by_ref, # Pointer to first rectangle
7
+ :hexagons, VectorHexagon.by_ref, # Pointer to first hexagon
8
+ :strings, VectorString.by_ref, # Pointer to first string
9
+ :circles, VectorCircle.by_ref # Pointer to first circle
10
+
11
+ # Height of barcode image (including text, whitespace)
12
+ def height
13
+ self[:height]
14
+ end
15
+
16
+ # Width of barcode image (including text, whitespace)
17
+ def width
18
+ self[:width]
19
+ end
20
+
21
+ # Calls the given block and passes a VectorRect object for each rectangle to be printed.
22
+ def each_rectangle(&block)
23
+ each_vector(:rectangles, &block)
24
+ end
25
+
26
+ # Calls the given block and passes a VectorHexagon object for each hexagon to be printed.
27
+ def each_hexagon(&block)
28
+ each_vector(:hexagons, &block)
29
+ end
30
+
31
+ # Calls the given block and passes a VectorString object for each text string to be printed.
32
+ def each_string(&block)
33
+ each_vector(:strings, &block)
34
+ end
35
+
36
+ # Calls the given block and passes a VectorCircle object for each circle to be printed.
37
+ def each_circle(&block)
38
+ each_vector(:circles, &block)
39
+ end
40
+
41
+ private def each_vector(attr)
42
+ return to_enum(:each_vector, attr) unless block_given?
43
+
44
+ o = self[attr]
45
+ until o.null?
46
+ # Avoid garbage collection of Vector (and hence Barcode) before Vector*, since all memory is freed by ZBarcode_Delete()
47
+ o.instance_variable_set(:@vector, self)
48
+ yield o
49
+ o = o[:next]
50
+ end
51
+ end
10
52
  end
11
53
  end
12
54
  end
@@ -0,0 +1,31 @@
1
+ module Zint
2
+ module Structs
3
+ class VectorCircle < FFI::Struct
4
+ layout :x, :float,
5
+ :y, :float,
6
+ :diameter, :float,
7
+ :colour, :int, # Non-zero for draw with background colour
8
+ :next, VectorCircle.by_ref # Pointer to next circle
9
+
10
+ # x position
11
+ def x
12
+ self[:x]
13
+ end
14
+
15
+ # y position
16
+ def y
17
+ self[:y]
18
+ end
19
+
20
+ # diameter
21
+ def diameter
22
+ self[:diameter]
23
+ end
24
+
25
+ # Non-zero for draw with background colour
26
+ def colour
27
+ self[:colour]
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,31 @@
1
+ module Zint
2
+ module Structs
3
+ class VectorHexagon < FFI::Struct
4
+ layout :x, :float,
5
+ :y, :float,
6
+ :diameter, :float,
7
+ :rotation, :int, # 0, 90, 180, 270 degrees
8
+ :next, VectorHexagon.by_ref # Pointer to next hexagon
9
+
10
+ # x position
11
+ def x
12
+ self[:x]
13
+ end
14
+
15
+ # y position
16
+ def y
17
+ self[:y]
18
+ end
19
+
20
+ # diameter
21
+ def diameter
22
+ self[:diameter]
23
+ end
24
+
25
+ # 0, 90, 180, 270 degrees
26
+ def rotation
27
+ self[:rotation]
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,37 @@
1
+ module Zint
2
+ module Structs
3
+ class VectorRect < FFI::Struct
4
+ layout :x, :float,
5
+ :y, :float,
6
+ :height, :float,
7
+ :width, :float,
8
+ :colour, :int, # -1 for foreground, 1-8 for Cyan, Blue, Magenta, Red, Yellow, Green, Black, White
9
+ :next, VectorRect.by_ref # Pointer to next rectangle
10
+
11
+ # x position
12
+ def x
13
+ self[:x]
14
+ end
15
+
16
+ # y position
17
+ def y
18
+ self[:y]
19
+ end
20
+
21
+ # height
22
+ def height
23
+ self[:height]
24
+ end
25
+
26
+ # width
27
+ def width
28
+ self[:width]
29
+ end
30
+
31
+ # -1 for foreground, 1-8 for Cyan, Blue, Magenta, Red, Yellow, Green, Black, White
32
+ def colour
33
+ self[:colour]
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,15 +1,50 @@
1
1
  module Zint
2
2
  module Structs
3
3
  class VectorString < FFI::Struct
4
- layout :x, :float,
4
+ layout :x, :float, # x, y position relative to halign
5
5
  :y, :float,
6
- :fsize, :float,
7
- :width, :float,
8
- :length, :int,
9
- :rotation, :int,
10
- :halign, :int,
11
- :text, :pointer,
12
- :next, :pointer
6
+ :fsize, :float, # font size
7
+ :width, :float, # Suggested string width, may be 0 if none recommended
8
+ :length, :int, # Number of characters
9
+ :rotation, :int, # 0, 90, 180, 270 degrees
10
+ :halign, :int, # Horizontal alignment: 0 for centre, 1 for left, 2 for right (end)
11
+ :text, :pointer, # the text string to be printed
12
+ :next, VectorString.by_ref # Pointer to next string
13
+
14
+ # x position relative to halign
15
+ def x
16
+ self[:x]
17
+ end
18
+
19
+ # y position
20
+ def y
21
+ self[:y]
22
+ end
23
+
24
+ # font size
25
+ def fsize
26
+ self[:fsize]
27
+ end
28
+
29
+ # Suggested string width, may be 0 if none recommended
30
+ def width
31
+ self[:width]
32
+ end
33
+
34
+ # 0, 90, 180, 270 degrees
35
+ def rotation
36
+ self[:rotation]
37
+ end
38
+
39
+ # Horizontal alignment: 0 for centre, 1 for left, 2 for right (end)
40
+ def halign
41
+ self[:halign]
42
+ end
43
+
44
+ # the text string to be printed
45
+ def text
46
+ self[:text].read_bytes(self[:length])
47
+ end
13
48
  end
14
49
  end
15
50
  end
data/lib/zint/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Zint
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -0,0 +1,27 @@
1
+ require_relative "dependencies"
2
+ require "rubygems"
3
+ # Keep the version constraint in sync with libusb.gemspec
4
+ gem "mini_portile2", Zint::MINI_PORTILE_VERSION
5
+ require "mini_portile2"
6
+
7
+ module Zint
8
+ class ZintRecipe < MiniPortileCMake
9
+ ROOT = File.expand_path("../../..", __FILE__)
10
+
11
+ def initialize
12
+ super("libzint", ZINT_VERSION)
13
+ self.target = File.join(ROOT, "ports")
14
+ self.files = [url: ZINT_SOURCE_URI, sha1: ZINT_SOURCE_SHA1]
15
+ end
16
+
17
+ def cook_and_activate
18
+ checkpoint = File.join(target, "#{name}-#{version}-#{host}.installed")
19
+ unless File.exist?(checkpoint)
20
+ cook
21
+ FileUtils.touch checkpoint
22
+ end
23
+ activate
24
+ self
25
+ end
26
+ end
27
+ end
data/lib/zint.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "ffi"
2
2
 
3
3
  require "zint/version"
4
+ require "zint/dependencies"
4
5
 
5
6
  # Zint constants
6
7
  require "zint/constants/capability_flags"
@@ -14,12 +15,13 @@ require "zint/constants/warn_levels"
14
15
  require "zint/constants/warnings"
15
16
 
16
17
  # Zint structs
17
- require "zint/structs/circle"
18
- require "zint/structs/hexagon"
19
- require "zint/structs/rect"
20
- require "zint/structs/symbol"
18
+ require "zint/structs/vector_circle"
19
+ require "zint/structs/vector_hexagon"
20
+ require "zint/structs/vector_rect"
21
21
  require "zint/structs/vector_string"
22
22
  require "zint/structs/vector"
23
+ require "zint/structs/symbol"
24
+ require "zint/native"
23
25
 
24
26
  module Zint
25
27
  # Zint constants
@@ -137,8 +139,6 @@ module Zint
137
139
  autoload :UspsImail, "zint/uspsimail"
138
140
  autoload :Vin, "zint/vin"
139
141
 
140
- extend FFI::Library
141
-
142
142
  class Error < StandardError; end
143
143
 
144
144
  ERROR_CLASS_FOR_RESULT = {}
@@ -152,85 +152,10 @@ module Zint
152
152
  ERROR_CLASS_FOR_RESULT[v] = klass
153
153
  end
154
154
 
155
- # Raises specific error for API return code
156
- #
157
- # @param res [Symbol, Integer] API return code
158
- # @param text [String] error text
159
- # @raise [Error]
160
- def self.raise_error(res, text)
161
- klass = ERROR_CLASS_FOR_RESULT[res.is_a?(Symbol) ? Zint::ERRORS[res] : res]
162
- raise klass, text
163
- end
164
-
165
- ffi_lib %w[libzint.so.2.10 libzint zint]
166
-
167
- # Error codes (API return values)
168
- enum :error_code, [Zint::WARNINGS, Zint::ERRORS].map { |h| h.to_a }.flatten
169
-
170
- # Aliases for better method signatures
171
- typedef :pointer, :zint_symbol
172
- typedef :pointer, :filename
173
- typedef :int32, :length
174
- typedef :int32, :rotate_angle
175
- typedef :int32, :symbol_id
176
- typedef :uint32, :cap_flag
177
- typedef :string, :source
178
-
179
- # Create and initialize a symbol structure
180
- attach_function(:ZBarcode_Create, :ZBarcode_Create, [], :zint_symbol)
181
-
182
- # Free any output buffers that may have been created and initialize output fields
183
- attach_function(:ZBarcode_Clear, :ZBarcode_Clear, [:zint_symbol], :void)
184
-
185
- # Free a symbol structure, including any output buffers
186
- attach_function(:ZBarcode_Delete, :ZBarcode_Delete, [:zint_symbol], :void)
187
-
188
- # Encode a barcode. If `length` is 0, `source` must be NUL-terminated.
189
- attach_function(:ZBarcode_Encode, :ZBarcode_Encode, [:zint_symbol, :source, :length], :error_code)
190
-
191
- # Encode a barcode using input data from file `filename`
192
- attach_function(:ZBarcode_Encode_File, :ZBarcode_Encode_File, [:zint_symbol, :filename], :error_code)
193
-
194
- # Output a previously encoded symbol to file `symbol->outfile`
195
- attach_function(:ZBarcode_Print, :ZBarcode_Print, [:zint_symbol, :rotate_angle], :error_code)
196
-
197
- # Encode and output a symbol to file `symbol->outfile`
198
- attach_function(:ZBarcode_Encode_and_Print, :ZBarcode_Encode_and_Print, [:zint_symbol, :source, :length, :rotate_angle], :error_code)
199
-
200
- # Encode a symbol using input data from file `filename` and output to file `symbol->outfile`
201
- attach_function(:ZBarcode_Encode_File_and_Print, :ZBarcode_Encode_File_and_Print, [:zint_symbol, :filename, :rotate_angle], :error_code)
202
-
203
- # Output a previously encoded symbol to memory as raster (`symbol->bitmap`)
204
- attach_function(:ZBarcode_Buffer, :ZBarcode_Buffer, [:zint_symbol, :rotate_angle], :error_code)
205
-
206
- # Encode and output a symbol to memory as raster (`symbol->bitmap`)
207
- attach_function(:ZBarcode_Encode_and_Buffer, :ZBarcode_Encode_and_Buffer, [:zint_symbol, :source, :length, :rotate_angle], :error_code)
208
-
209
- # Encode a symbol using input data from file `filename` and output to memory as raster (`symbol->bitmap`)
210
- attach_function(:ZBarcode_Encode_File_and_Buffer, :ZBarcode_Encode_File_and_Buffer, [:zint_symbol, :filename, :rotate_angle], :error_code)
211
-
212
- # Output a previously encoded symbol to memory as vector (`symbol->vector`)
213
- attach_function(:ZBarcode_Buffer_Vector, :ZBarcode_Buffer_Vector, [:zint_symbol, :rotate_angle], :error_code)
214
-
215
- # Encode and output a symbol to memory as vector (`symbol->vector`)
216
- attach_function(:ZBarcode_Encode_and_Buffer_Vector, :ZBarcode_Encode_and_Buffer_Vector, [:zint_symbol, :source, :length, :rotate_angle], :error_code)
217
-
218
- # Encode a symbol using input data from file `filename` and output to memory as vector (`symbol->vector`)
219
- attach_function(:ZBarcode_Encode_File_and_Buffer_Vector, :ZBarcode_Encode_File_and_Buffer_Vector, [:zint_symbol, :filename, :rotate_angle], :error_code)
220
-
221
- # Is `symbol_id` a recognized symbology?
222
- attach_function(:ZBarcode_ValidID, :ZBarcode_ValidID, [:symbol_id], :bool)
223
-
224
- # Return the capability flags for symbology `symbol_id` that match `cap_flag`
225
- attach_function(:ZBarcode_Cap, :ZBarcode_Cap, [:symbol_id, :cap_flag], :uint32)
226
-
227
- # Return the version of Zint linked to
228
- attach_function(:ZBarcode_Version, :ZBarcode_Version, [], :int32)
229
-
230
155
  # Returns library version of the current zint
231
156
  #
232
157
  # @return [Integer] library version
233
158
  def self.library_version
234
- Zint.ZBarcode_Version
159
+ Native.ZBarcode_Version
235
160
  end
236
161
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-zint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elias Fröhner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-04 00:00:00.000000000 Z
11
+ date: 2023-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -24,20 +24,35 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.15'
27
+ - !ruby/object:Gem::Dependency
28
+ name: mini_portile2
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.1'
27
41
  description:
28
42
  email:
29
43
  - apiwalker96@gmail.com
30
44
  executables: []
31
- extensions: []
45
+ extensions:
46
+ - ext/ruby-zint/extconf.rb
32
47
  extra_rdoc_files: []
33
48
  files:
34
49
  - ".rspec"
35
50
  - ".standard.yml"
36
51
  - Gemfile
37
- - Gemfile.lock
38
52
  - LICENSE.txt
39
53
  - README.md
40
54
  - Rakefile
55
+ - ext/ruby-zint/extconf.rb
41
56
  - lib/ruby-zint.rb
42
57
  - lib/zint.rb
43
58
  - lib/zint/aus_post.rb
@@ -86,6 +101,7 @@ files:
86
101
  - lib/zint/dbaromn.rb
87
102
  - lib/zint/dbaromnstk.rb
88
103
  - lib/zint/dbarstk.rb
104
+ - lib/zint/dependencies.rb
89
105
  - lib/zint/dot_code.rb
90
106
  - lib/zint/dotty_mode.rb
91
107
  - lib/zint/dpd.rb
@@ -120,6 +136,7 @@ files:
120
136
  - lib/zint/micro_pdf417.rb
121
137
  - lib/zint/micro_qr.rb
122
138
  - lib/zint/msiplessey.rb
139
+ - lib/zint/native.rb
123
140
  - lib/zint/noascii.rb
124
141
  - lib/zint/nve18.rb
125
142
  - lib/zint/one_code.rb
@@ -141,11 +158,11 @@ files:
141
158
  - lib/zint/rssexpstack.rb
142
159
  - lib/zint/rssltd.rb
143
160
  - lib/zint/stdout.rb
144
- - lib/zint/structs/circle.rb
145
- - lib/zint/structs/hexagon.rb
146
- - lib/zint/structs/rect.rb
147
161
  - lib/zint/structs/symbol.rb
148
162
  - lib/zint/structs/vector.rb
163
+ - lib/zint/structs/vector_circle.rb
164
+ - lib/zint/structs/vector_hexagon.rb
165
+ - lib/zint/structs/vector_rect.rb
149
166
  - lib/zint/structs/vector_string.rb
150
167
  - lib/zint/telepen.rb
151
168
  - lib/zint/telepennum.rb
@@ -158,12 +175,15 @@ files:
158
175
  - lib/zint/uspsimail.rb
159
176
  - lib/zint/version.rb
160
177
  - lib/zint/vin.rb
178
+ - lib/zint/zint_recipe.rb
179
+ - ports/archives/zint-2.10.0-src.tar.gz
161
180
  homepage: https://github.com/api-walker/ruby-zint
162
181
  licenses:
163
182
  - MIT
164
183
  metadata:
165
184
  homepage_uri: https://github.com/api-walker/ruby-zint
166
185
  source_code_uri: https://github.com/api-walker/ruby-zint
186
+ msys2_mingw_dependencies: cmake libpng
167
187
  post_install_message:
168
188
  rdoc_options: []
169
189
  require_paths:
data/Gemfile.lock DELETED
@@ -1,79 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- ruby-zint (1.0.0)
5
- ffi (~> 1.15)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- ast (2.4.2)
11
- byebug (11.1.3)
12
- chunky_png (1.4.0)
13
- diff-lcs (1.5.0)
14
- docile (1.4.0)
15
- ffi (1.15.5)
16
- json (2.6.3)
17
- language_server-protocol (3.17.0.3)
18
- parallel (1.22.1)
19
- parser (3.2.1.1)
20
- ast (~> 2.4.1)
21
- rainbow (3.1.1)
22
- rake (13.0.6)
23
- regexp_parser (2.7.0)
24
- rexml (3.2.5)
25
- rspec (3.12.0)
26
- rspec-core (~> 3.12.0)
27
- rspec-expectations (~> 3.12.0)
28
- rspec-mocks (~> 3.12.0)
29
- rspec-core (3.12.1)
30
- rspec-support (~> 3.12.0)
31
- rspec-expectations (3.12.2)
32
- diff-lcs (>= 1.2.0, < 2.0)
33
- rspec-support (~> 3.12.0)
34
- rspec-mocks (3.12.5)
35
- diff-lcs (>= 1.2.0, < 2.0)
36
- rspec-support (~> 3.12.0)
37
- rspec-support (3.12.0)
38
- rubocop (1.48.1)
39
- json (~> 2.3)
40
- parallel (~> 1.10)
41
- parser (>= 3.2.0.0)
42
- rainbow (>= 2.2.2, < 4.0)
43
- regexp_parser (>= 1.8, < 3.0)
44
- rexml (>= 3.2.5, < 4.0)
45
- rubocop-ast (>= 1.26.0, < 2.0)
46
- ruby-progressbar (~> 1.7)
47
- unicode-display_width (>= 2.4.0, < 3.0)
48
- rubocop-ast (1.28.0)
49
- parser (>= 3.2.1.0)
50
- rubocop-performance (1.16.0)
51
- rubocop (>= 1.7.0, < 2.0)
52
- rubocop-ast (>= 0.4.0)
53
- ruby-progressbar (1.13.0)
54
- simplecov (0.21.2)
55
- docile (~> 1.1)
56
- simplecov-html (~> 0.11)
57
- simplecov_json_formatter (~> 0.1)
58
- simplecov-html (0.12.3)
59
- simplecov_json_formatter (0.1.4)
60
- standard (1.25.3)
61
- language_server-protocol (~> 3.17.0.2)
62
- rubocop (~> 1.48.1)
63
- rubocop-performance (~> 1.16.0)
64
- unicode-display_width (2.4.2)
65
-
66
- PLATFORMS
67
- x86_64-linux
68
-
69
- DEPENDENCIES
70
- byebug
71
- chunky_png
72
- rake (~> 13.0)
73
- rspec (~> 3.0)
74
- ruby-zint!
75
- simplecov
76
- standard (~> 1.3)
77
-
78
- BUNDLED WITH
79
- 2.4.8
@@ -1,11 +0,0 @@
1
- module Zint
2
- module Structs
3
- class Circle < FFI::Struct
4
- layout :x, :float,
5
- :y, :float,
6
- :diameter, :float,
7
- :colour, :int,
8
- :next, :pointer
9
- end
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- module Zint
2
- module Structs
3
- class Hexagon < FFI::Struct
4
- layout :x, :float,
5
- :y, :float,
6
- :diameter, :float,
7
- :rotation, :int,
8
- :next, :pointer
9
- end
10
- end
11
- end