Skip to content

Commit

Permalink
Satisfy latest standardrb
Browse files Browse the repository at this point in the history
  • Loading branch information
larskanis committed Jun 27, 2024
1 parent ca8a48f commit a1c2b19
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/zint/barcode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def initialize(value: nil, input_file: nil, symbology: Zint::BARCODE_CODE128, **
@zint_symbol = Native.ZBarcode_Create
self.symbology = symbology
kwargs.each do |k, v|
send("#{k}=", v)
send(:"#{k}=", v)
end

@value = value
Expand All @@ -39,7 +39,7 @@ def initialize(value: nil, input_file: nil, symbology: Zint::BARCODE_CODE128, **
# Must end in .png, .gif, .bmp, .emf, .eps, .pcx, .svg, .tif or .txt
# @param rotate_angle [Integer] Rotate angle in degrees (0, 90, 180, 270)
def to_file(path:, rotate_angle: 0)
unless outfile == 'out.png'
unless outfile == "out.png"
raise AlreadyGenerated, "to_file was already executed"
end
@zint_symbol[:outfile] = path
Expand Down
8 changes: 4 additions & 4 deletions ruby-zint.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Gem::Specification.new do |spec|
spec.add_dependency "mini_portile2", Zint::MINI_PORTILE_VERSION

yardopts = File.read(".yardopts")
spec.rdoc_options = ["--main", "README.md",
"--title", "Ruby FFI binding for libzint",
"--exclude", "/ext.ruby-zint/"]
docfiles = yardopts.lines.map(&:strip).select{|r| r=~/^[^-]/ }
spec.rdoc_options = ["--main", "README.md",
"--title", "Ruby FFI binding for libzint",
"--exclude", "/ext.ruby-zint/"]
docfiles = yardopts.lines.map(&:strip).select { |r| r =~ /^[^-]/ }
spec.extra_rdoc_files = `git ls-files -z #{docfiles.join(" ")}`.split("\x0")
end
6 changes: 3 additions & 3 deletions spec/zint/barcode_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module Zint

it "exports barcode to bitmap only once" do
barcode.to_bitmap
expect{ barcode.to_bitmap }.to raise_error(Zint::Barcode::AlreadyGenerated)
expect { barcode.to_bitmap }.to raise_error(Zint::Barcode::AlreadyGenerated)
end

it "exports barcode to bitmap object from input file" do
Expand Down Expand Up @@ -136,7 +136,7 @@ module Zint

it "exports barcode to buffer only once" do
barcode.to_buffer
expect{ barcode.to_buffer }.to raise_error(Zint::Barcode::AlreadyGenerated)
expect { barcode.to_buffer }.to raise_error(Zint::Barcode::AlreadyGenerated)
end

it "exports barcode as vector from given value" do
Expand All @@ -147,7 +147,7 @@ module Zint

it "exports barcode to vector only once" do
barcode.to_vector
expect{ barcode.to_vector }.to raise_error(Zint::Barcode::AlreadyGenerated)
expect { barcode.to_vector }.to raise_error(Zint::Barcode::AlreadyGenerated)
end

it "exports barcode as vector from input file" do
Expand Down

0 comments on commit a1c2b19

Please sign in to comment.