Skip to content

Commit

Permalink
Bumping version, fixing README.
Browse files Browse the repository at this point in the history
  • Loading branch information
janlindblom committed May 1, 2021
1 parent 2973888 commit 639c176
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Replit Database client is a simple way to use Replit Database in your Ruby repls.

Based on the [Node.js Replit Database client](https://github.com/replit/database-node).

## Installation

Add this line to your application's Gemfile:
Expand All @@ -10,21 +12,13 @@ Add this line to your application's Gemfile:
gem 'replitdb'
```

And then execute:

$ bundle install

Or install it yourself as:

$ gem install replitdb

## Usage

Require it in your code:

```ruby
require 'replit_db'
client = ReplitDb::Client.new
require 'replit'
client = Replit::Database::Client.new
client.set "key", "value"
key = client.get "key"
puts key
Expand All @@ -35,7 +29,7 @@ puts key
#### Constructor

```ruby
ReplitDb::Client.new(custom_url)
Replit::Database::Client.new(custom_url)
```

Constructor takes a custom database URL as an optional argument.
Expand Down
2 changes: 1 addition & 1 deletion bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# frozen_string_literal: true

require "bundler/setup"
require "ruby/replitdb"
require "replit/database"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
Expand Down
3 changes: 3 additions & 0 deletions lib/replit/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ module Replit
#
# Replit Database module.
#
# @author Jan Lindblom <janlindblom@fastmail.fm>
# @version 0.1.0
#
module Database
#
# Thrown if there is a syntax error.
Expand Down
2 changes: 1 addition & 1 deletion lib/replit/database/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
module Replit
module Database
# @return [String] Current version.
VERSION = "0.0.1"
VERSION = "0.1.0"
end
end

0 comments on commit 639c176

Please sign in to comment.