Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

A bit of refactoring and address issue #17 #18

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--color
--format documentation
--backtrace
--default_path spec
--tty
--require spec_helper
21 changes: 14 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
language: ruby
bundler_args: --jobs=3 --retry=3
cache: bundler
sudo: false

services:
- redis-server

rvm:
- 1.9.3
- 2.0.0
- 2.1.4
- 2.2.2
- ruby-head
- jruby-19mode
- rbx-19mode
- jruby-head
- jruby
- rbx-2

matrix:
allow_failures:
- rvm: 2.0.0
- rvm: ruby-head
- rvm: jruby-head
- rvm: rbx-19mode
- rvm: jruby
- rvm: rbx-2

notifications:
irc: "irc.freenode.org#celluloid"
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ source 'https://rubygems.org'
gemspec

gem 'coveralls', require: false
gem 'celluloid', github: 'celluloid/celluloid'
gem 'celluloid-io', github: 'celluloid/celluloid-io'
gem 'transpec', require: false
12 changes: 5 additions & 7 deletions celluloid-redis.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require 'celluloid/redis/version'

Gem::Specification.new do |spec|
spec.name = "celluloid-redis"
spec.version = Celluloid::Redis::VERSION
spec.version = CELLULOID_REDIS_VERSION
spec.authors = ["Tony Arcieri"]
spec.email = ["[email protected]"]
spec.description = "Celluloid::IO support for the redis-rb library"
Expand All @@ -18,11 +18,9 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_runtime_dependency "redis"
spec.add_runtime_dependency "celluloid-io", ">= 0.13.0.pre"
spec.add_runtime_dependency "redis", "~> 3.2"
spec.add_runtime_dependency "celluloid-io", "~> 0.16"

spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec"
spec.add_development_dependency "guard-rspec"
spec.add_development_dependency "rake", "~> 10.4"
spec.add_development_dependency "rspec", "~> 3.0"
end
1 change: 0 additions & 1 deletion lib/celluloid/redis.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require "redis"

require "celluloid/redis/version"
require "celluloid/redis/redis_ext"
28 changes: 0 additions & 28 deletions lib/celluloid/redis/redis_ext.rb

This file was deleted.

6 changes: 1 addition & 5 deletions lib/celluloid/redis/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
module Celluloid
module Redis
VERSION = "0.0.2"
end
end
CELLULOID_REDIS_VERSION = "0.0.2"
8 changes: 3 additions & 5 deletions spec/redis/connection/celluloid_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
require "spec_helper"

describe Redis::Connection::Celluloid do
RSpec.describe Redis::Connection::Celluloid do
let(:example_key) { 'foobar' }
let(:example_value) { 'baz' }

Expand All @@ -9,10 +7,10 @@

# FIXME: perhaps some better tests are in order here?
redis.set(example_key, '')
redis.get(example_key).should eq ''
expect(redis.get(example_key)).to eq('')

redis.set(example_key, example_value)
redis.get(example_key).should eq example_value
expect(redis.get(example_key)).to eq(example_value)
end

it "cleanly shuts down an instance" do
Expand Down
8 changes: 7 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
require "celluloid/redis"
require "redis/connection/celluloid"

require "redis_instance"
require "coveralls"
Coveralls.wear!

RSpec.configure(&:disable_monkey_patching!)

# Trick to test new redis-rb connection driver
# that must load redis/connection/celluloid
Redis.new(driver: :celluloid)

def with_new_instance(opts = {})
begin
instance = RedisInstance.new(opts)
Expand Down