
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
XlsReporter lets you to export a collection of data to an Excel file, in a Ruby or Ruby on Rails project. Only need to specify the way to show data in the report.
Add this line to your application's Gemfile:
gem 'xls_reporter'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install xls_reporter
To export data:
# create instance of reporter class
table_reporter = XlsReporter::DataExport.new
# generate report file
table_reporter.generate_excel(collection, header_params, body_params,
filename, filepath, batch_iteration, retry_methods)
with the follow parameters:
ActiveRecord::Relation
, Array
of objects, etc.).Array
of hashes, indicate the title of each column: header_params = [
{:index => 0, :title => "SKU"},
{:index => 1, :title => "Event"},
{:index => 2, :title => I18n.t(model.attribute)},
]
Array
of hashes, indicate the methods (and their params) to apply in each element of collection to show in report: body_params = [
# one method
{:index => 0, :object_methods => :get_sku },
# one method with one param
{:index => 1, :object_methods => {:get_event => Time.now } },
# method chaining with params
{:index => 2, :object_methods => [
# one method with multiple params
{:method_name=>:values_by_ids, :params_values => [1,2,4]},
# one method
:get_color ,
#one method with one param
{:method_name =>:set_size, :params_values => "large"}
]
},
]
String
with the name of the exported file (ie: report.xlsx).String
with the path for save the report file.boolean
option permit iterate data in batches if you use ActiveRecord
. Default is true.boolean
option is used to manage exceptions when calling methods in data elements, and retry them. Default is true.Write tests and validate code.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that xls_reporter 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.