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.
= Keymap
{}[http://travis-ci.org/rbuck/keymap] {}[https://gemnasium.com/rbuck/keymap] {}[https://codeclimate.com/github/rbuck/keymap]
Helping Ruby developers and their companies, unlock their key-value store data, through associative and sequential based access, providing unprecedented support for map reduce behaviors, native to the Ruby language.
Keymap provides a natural Ruby integration with NoSQL database, allowing direct use of Enumerable operations on returned values (implying returned values are always lists or hashes, or are manipulated to be represented in these forms).
== Installation
Add this line to your application's Gemfile:
gem 'keymap'
And then execute:
$ bundle
Or install it yourself as:
$ gem install keymap
== Usage
Here is a simple example of how to use keymap:
Keymap::Base.establish_connection 'test'
connection = Keymap::Base.connection
list = connection.list :what
(0..10).each do |value|
list << value
end
sum = list.inject(0) do |result, item|
result + item.to_i
end
The key observation here is this: no key-value store specific API, its plain ordinary Ruby. One more example on how to use keymap, this time with a hash:
accounting = @connection.hash :accounting
salaries = {
Bob: 82000,
Jim: 94000,
Billy: 58000
}
accounting.merge! salaries
total = 0
accounting.each_value do |value|
total = total + value.to_i
end
total => # 234000
== Contributing
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)== Writing New Adapters
== Configure databases
Copy spec/support/config.example.yml to spec/support/config.yml and edit as needed. Or just run the tests for the first time, which will do the copy automatically and use the default (redis).
You can set up redis using the redis:start_server rake tasks.
== Running the tests
You can run a particular test file from the command line, e.g.
$ ruby -Itest spec/functional/adapter_spec.rb
To run a specific test:
$ ruby -Itest spec/functional/adapter_spec.rb -n test_something_works
You can run with a database other than the default you set in spec/support/config.yml, using the KEYCONN environment variable:
$ KEYCONN=redis ruby -Itest spec/functional/adapter_spec.rb
You can run all the tests for a given database via rake:
$ rake test_redis
The 'rake test' task will run all the tests for redis, couchdb, and riak,
== Config file
By default, the config file is expected to be at the path spec/support/config.yml. You can specify a custom location with the KEYCONFIG environment variable.
FAQs
Unknown package
We found that keymap 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.