
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
A ruby wrapper of the awesome postscriptbarcode library.
Note: currently only PNG images are supported.
gs
command in your PATH.mogrify
command in your PATH, which is part of the imagemagick library.Add it to your Gemfile
gem 'strokes'
or install the gem directly
gem install strokes
require 'strokes'
code = Strokes::Barcode.new(:qrcode, 'http://github.com/larskuhnt/strokes')
code.save('/tmp/test.png')
# if you want to resize the image to a width of 200 pixels
code.save('/tmp/test.png', :width => 200)
Barcodes including text will be a bit blurry after resizing (if you have an idea how to fix that, I will be glad for your input)
It's as easy as:
require 'strokes'
require 'strokes/active_record'
class Barcode < ActiveRecord::Base
include Strokes::ActiveRecord
has_barcode :isbn, :isbn_number, { :small => 200, :medium => 400 }
end
It will generate three ISBN barcode images in the directory
#{Rails.root}/barcodes/#{self.class.to_s.tableize}
,
the original sized image and the specified versions with 200 and 400 pixels width.
The parameters for the has_barcode
method are:
{ :small => 200, :medium => 400 }
FAQs
Unknown package
We found that strokes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.