
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
WARNING: This is just a big hack right now. If you are interested in using this project but I haven't removed this warning yet, please bug me to lessen the hackiness and make it more usable.
rspec-process-mocks is an addon to rspec-mocks that provides support for method stubs, fakes, and message expectations within child processes.
Gemfile
gem 'rspec-process-mocks', :git => 'git://github.com/thoughtless/rspec-process-mocks.git'
bundle install
spec/spec_helper.rb
require 'rspec/process_mocks' # This line must be after 'config.mock_with :rspec'
describe "some action" do
context "when bad stuff happens" do
it "logs the error" do
logger = double('logger')
doer = Doer.new(logger)
logger.should_receive_in_child_process(:log)
doer.do_something_with(:bad_data)
sleep 0.1 # Leave time for the child process to run.
end
end
end
class Doer
attr_accessor :logger
def do_something_with(data)
Process.fork { logger.log(data) }
end
end
See http://github.com/thoughtless/rspec-process-mocks
FAQs
Unknown package
We found that rspec-process-mocks 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.