
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
a framework for writing functional helpers in ruby
gem 'transmute'
require 'transmute'
# Transmute provides a very light weight framework for definining
# helpers in a functional, chainable manner
#
# To define a function, simply add an instance method to Transmute::Definition
Transmute::Definition.module_eval do
def increment(value, n = 1)
value + n
end
end
# The methods you add to Transmute::Definition can then be used via the Transmute
# module
[1, 2, 3].map(&Transmute.increment)
#=> [2, 3, 4]
[1, 2, 3].map(&Transmute.increment).map(&Transmute.increment)
#=> [3, 4, 5]
[1, 2, 3].map(&Transmute.increment(2))
#=> [3, 4, 5]
on Integer
def increment(value, n = 1)
value + n
end
on String
def increment(value, n = 1)
value.to_i + n
end
on -> (value) { value.is_a?(Array) && value.all? { |v| v.is_a?(Integer) } }
def increment(value, n = 1)
# Should recurse into other patterns
value.map(&Transmute.increment(n))
end
)
FAQs
Unknown package
We found that transmute 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.