diff --git a/README.md b/README.md index 14905ef..5506ffb 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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 @@ -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. diff --git a/bin/console b/bin/console index 627ef53..4eaddb5 100644 --- a/bin/console +++ b/bin/console @@ -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. diff --git a/lib/replit/database.rb b/lib/replit/database.rb index 4c47280..383e67c 100644 --- a/lib/replit/database.rb +++ b/lib/replit/database.rb @@ -6,6 +6,9 @@ module Replit # # Replit Database module. # + # @author Jan Lindblom + # @version 0.1.0 + # module Database # # Thrown if there is a syntax error. diff --git a/lib/replit/database/version.rb b/lib/replit/database/version.rb index c3b917a..fc5f0c0 100644 --- a/lib/replit/database/version.rb +++ b/lib/replit/database/version.rb @@ -3,6 +3,6 @@ module Replit module Database # @return [String] Current version. - VERSION = "0.0.1" + VERSION = "0.1.0" end end