Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Document-like ORM based on Redis key value store - uses Redis Re-JSON for full json manipulation
Add to your gemfile:
gem 'redijson_models', '~> 0.8.1'
Or without bundler, run in your shell:
gem i redijson_models
Model.get 1 #=> returns an object instance (gets it from redis)
Model.all #=> returns an array of Model object instances
Model.create({}) #=> creates an entry in redis
Model.update(1, {}) #=> updates a record in redis
class Document
extend RediJsonModelLib
include RediJsonModelMixin
include Virtus.model
attribute :id, Integer
attribute :name, String
attribute :contents, String
def antani
# "..."
end
end
doc = Document.new name: "Foo", contents: "Bar123"
puts doc.name #=> "foo"
puts doc.antani #=> "..."
doc.save # saves the record, gives an auto increment id (example: 1)
doc = Document.get doc.id
puts doc.name #=> "foo"
puts doc.antani #=> "..."
in this repo run:
docker-compose up
Which use the docker-compose.yml to start your redis.
# sample environment setup
require 'bundler'
Bundler.require :default
# setup redis
R = Redis.new
# load and configure redis with rejson models
include RediJsonModels
RJ.configure redis: R
class Document
# ...
end
(you need to run a local redis + rejson service - explained above)
Run:
rake spec
Enjoy!
@makevoid
FAQs
Unknown package
We found that redijson_models 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.