Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

first cut

  • Loading branch information...
commit f1f3237e095d475a455a230f4ac5f49160e55534 1 parent 0915d24
Lincoln Stoll authored
Showing with 50 additions and 0 deletions.
  1. +4 −0 Gemfile
  2. +23 −0 Gemfile.lock
  3. +15 −0 README.md
  4. +8 −0 cli.rb
4 Gemfile
View
@@ -0,0 +1,4 @@
+source :rubygems
+
+gem 'redis'
+gem 'pry'
23 Gemfile.lock
View
@@ -0,0 +1,23 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ coderay (0.9.8)
+ method_source (0.6.0)
+ ruby_parser (>= 2.0.5)
+ pry (0.9.3)
+ coderay (>= 0.9.8)
+ method_source (>= 0.6.0)
+ ruby_parser (>= 2.0.5)
+ slop (~> 1.9.0)
+ redis (2.2.2)
+ ruby_parser (2.2.0)
+ sexp_processor (~> 3.0)
+ sexp_processor (3.0.6)
+ slop (1.9.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ pry
+ redis
15 README.md
View
@@ -0,0 +1,15 @@
+# rediscli
+
+A really basic, hacked together redis cli in ruby. Not even a proper gem or interface, but it's enough to get me by
+
+## Using
+
+Make sure you've run bundle install. Then,
+
+ REDIS_URI=redis://user:pass@host:port/ bundle exec ruby cli.rb
+
+You will then have a console with the connection defined under REDIS
+
+ pry(main)> REDIS.set 'abc', 'def'
+ pry(main)> REDIS.get 'abc'
+ => 'def'
8 cli.rb
View
@@ -0,0 +1,8 @@
+#!/usr/bin/env ruby
+require 'bundler'
+Bundler.require
+
+uri = URI.parse(ENV["REDIS_URI"])
+REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
+
+binding.pry
Please sign in to comment.
Something went wrong with that request. Please try again.