Skip to content

barcoo/redis_rds

Repository files navigation

RedisRds

GitHub release Build Status Coverage Status

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

Installation

Add to your gemfile:

gem 'redis_rds', git: '[email protected]:barcoo/redis_rds.git'

Usage

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'

Contributing

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:

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. 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.

Release

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

License

The gem is available as open source under the terms of the MIT License.