restis-client 0.0.0 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  .rvmrc
2
2
  .bundle
3
+ pkg/
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.1.0
data/lib/restis/client.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  module Restis
2
2
  class Client
3
3
  attr_accessor :redis
4
- def initialize
5
- @redis = Redis.new(:timeout => 0)
4
+ def initialize(args = {})
5
+ @redis = Redis.new(args)
6
6
  end
7
7
 
8
8
  def publish(channel, message)
@@ -1,6 +1,14 @@
1
1
  require "spec_helper"
2
2
 
3
3
  describe Restis::Client do
4
+
5
+ context "on setup" do
6
+ it "should pass connection parameters to redis" do
7
+ args = {:host => "1.1.1.1"}
8
+ Redis.stub!(:new).with(args)
9
+ Restis::Client.new(args)
10
+ end
11
+ end
4
12
  context "when publishing" do
5
13
  it "should keep published items on backlog" do
6
14
  redis = Redis.new
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restis-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 0
10
- version: 0.0.0
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Douglas Campos