
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
sixarm_ruby_active_record_mock
Advanced tools
= SixArm.com » Ruby » ActiveRecord mock object for testing Rails
Author:: Joel Parker Henderson, joel@joelparkerhenderson.com Copyright:: Copyright (c) 2006-2011 Joel Parker Henderson License:: See LICENSE.txt file
A simple mock object that provides the ActiveRecord method signatures read_attribute(key) and write_attribute(key,val), and simple record finder signatures find(id) and find(:all).
This provides some of the ActiveRecord method signatures we use:
Example: mock = ActiveRecordMock.new mock.write_attribute('foo','bar') mock.read_attribute('foo') => 'bar'
Example of initialize with attributes: mock = ActiveRecordMock.new(:foo => 'bar', :goo => 'car', :hoo => 'dar') mock.read_attribute(:foo') => 'bar' mock.read_attribute(:goo') => 'car' mock.read_attribute(:hoo') => 'dar'
Example of creating mock users: anne = ActiveRecordMock.new(:id => 123, :name => 'Anne') beth = ActiveRecordMock.new(:id => 456, :name => 'Beth') cate = ActiveRecordMock.new(:id => 789, :name => 'Cate')
Example of mock finder creation: ActiveRecordMock.find=[anne,beth,cate]
Example of mock finder retrieval of records by id: ActiveRecordMock.find(123) => anne ActiveRecordMock.find(456) => beth ActiveRecordMock.find(789) => cate
Example of mock finder retrieval of all records: ActiveRecordMock.find(:all) => [anne,beth,cate]
FAQs
Unknown package
We found that sixarm_ruby_active_record_mock 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
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.