
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
This adds methods to numeric class to returns bytes from filesize and reverse.
Install the gem and add to the application's Gemfile by executing:
bundle add numeric-filesize
If bundler is not being used to manage dependencies, install the gem by executing:
gem install numeric-filesize
In Ruby do:
require 'numeric/filesize'
Enjoy filesize in Ruby:
1.b #=> 1
1.kb #=> 1000
1.mb #=> 1000_000
1.gb #=> 1000_000_000
1.tb #=> 1000_000_000_000
1.pb #=> 1000_000_000_000_000
1.eb #=> 1000_000_000_000_000_000
1.kib #=> 1024
1.mib #=> 1048_576
1.gib #=> 1073_741_824
1.tib #=> 1099_511_627_776
1.pib #=> 1125_899_906_842_624
1.eib #=> 1152_921_504_606_846_976
1.to_b #=> 1
1000.to_kb #=> 1
1000_000.to_mb #=> 1
1000_000_000.to_gb #=> 1
1000_000_000_000.to_tb #=> 1
1000_000_000_000_000.to_pb #=> 1
1000_000_000_000_000_000.to_eb #=> 1
1024.to_kib #=> 1
1048_576.to_mib #=> 1
1073_741_824.to_gib #=> 1
1099_511_627_776.to_tib #=> 1
1125_899_906_842_624.to_pib #=> 1
1152_921_504_606_846_976.to_eib #=> 1
FAQs
Unknown package
We found that numeric-filesize 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.