Skip to content

Commit

Permalink
Updated: README and gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
vachhanihpavan committed Dec 24, 2019
1 parent 099e19e commit 37beff8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,35 @@ Or install it yourself as:

$ gem install rejson-rb

## Usage

Make sure you have loaded rejson module in `redis.conf`
```ruby
require 'rejson'

rcl = Redis.new # Get a redis client

# Get/Set keys
rcl.json_set "test", ".", "{:foo => 'bar', :baz => 'qux'}"
# => "OK"
rcl.json_get "test", Rejson::Path.root_path
# => "{:foo => 'bar', :baz => 'qux'}"
rcl.json_del "test"
# => 0

# Use similar to redis-rb client
rj = rcl.pipelined do
rcl.set "foo", "bar"
rcl.json_set "test", ".", "{:foo => 'bar', :baz => 'qux'}"
end
# => ["OK", "OK"]
```
## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/vachhanihpavan/rejson-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/vachhanihpavan/rejson-rb/blob/master/CODE_OF_CONDUCT.md).

For complete documentation about ReJSON's commands, refer to ReJSON's website.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
Expand Down
16 changes: 8 additions & 8 deletions rejson-rb.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
spec.authors = ["Pavan Vachhani"]
spec.email = ["[email protected]"]

spec.summary = "Redis JSON Ruby Adapter"
spec.description = "Redis JSON Ruby Adapter"
spec.summary = "Redis JSON Ruby Client"
spec.description = "rejson-rb is a package that allows storing, updating and querying objects as JSON documents in Redis database that is intended with RedisJSON module."
spec.homepage = "https://github.com/vachhanihpavan/rejson-rb"
spec.license = "MIT"
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
Expand All @@ -27,9 +27,9 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_runtime_dependency "redis", "~> 3.0"
spec.add_runtime_dependency "json"
spec.add_development_dependency "bundler", "~> 2.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "simplecov"
end
spec.add_runtime_dependency "redis", "~> 3.0"
spec.add_runtime_dependency "json", "~> 2.0"
spec.add_development_dependency "bundler", "~> 2.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "simplecov","~> 0.17"
end

0 comments on commit 37beff8

Please sign in to comment.