Ruby data structures stored in Redis.
RedisRds provides Redis-backed Ruby interfaces for the following data structures:
- String
- Hash
- ExpirableHash
- NestedHash
- List
- Mutex
- Set
- SortedSet
- SortedStringSet
Add to your gemfile:
gem 'redis_rds', git: 'git@github.com:barcoo/redis_rds.git'
Best is to check the tests to see how to use the data structures. Here is one example, for String:
# configure RedisRds by passing either a connection
RedisRds.configure(connection: my_redis_connection, namespace: 'my_app')
# or connection parameters
RedisRds.configure(
host: 'localhost',
db: 1,
port: 6379,
namespace: 'my_app',
)
string_a = RedisRds::String.new('some_key')
string_a = 'hello'
string_b = RedisRds::String.new('some_key')
puts string_b
# 'hello'
Take a look at the Roadmap and lint your code using rubocop and our rubocop.yml file.
To run the tests, start a Redis server on localhost and run bundle exec rake test
.
To contribute:
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Note: eventually use one of the popular git release scripts to tag, create tag notes, etc., based on git changelog.
When you want to create a new release, use the rake task cim:release
(in the main Rakefile)
bundle exec rake cim:release
The gem is available as open source under the terms of the MIT License.