From b3b3f5fdfce28f8c75690a2f7d45659859be0ff6 Mon Sep 17 00:00:00 2001 From: Ryan Festag Date: Thu, 20 Apr 2017 21:56:54 -0600 Subject: [PATCH 1/3] Removed unnceessary files, update tests to not throw deprecation warnings with rspec --- .rspec | 4 ---- Gemfile | 4 ++-- lib/celluloid/redis.rb | 2 +- lib/celluloid/redis/redis_ext.rb | 28 ------------------------- spec/redis/connection/celluloid_spec.rb | 4 ++-- 5 files changed, 5 insertions(+), 37 deletions(-) delete mode 100644 .rspec delete mode 100644 lib/celluloid/redis/redis_ext.rb diff --git a/.rspec b/.rspec deleted file mode 100644 index 675313d..0000000 --- a/.rspec +++ /dev/null @@ -1,4 +0,0 @@ ---color ---format documentation ---backtrace ---default_path spec diff --git a/Gemfile b/Gemfile index 4737819..7e43b16 100644 --- a/Gemfile +++ b/Gemfile @@ -2,5 +2,5 @@ source 'https://rubygems.org' gemspec gem 'coveralls', require: false -gem 'celluloid', github: 'celluloid/celluloid' -gem 'celluloid-io', github: 'celluloid/celluloid-io' +gem 'celluloid' +gem 'celluloid-io' diff --git a/lib/celluloid/redis.rb b/lib/celluloid/redis.rb index e0ec131..3655ae6 100644 --- a/lib/celluloid/redis.rb +++ b/lib/celluloid/redis.rb @@ -1,4 +1,4 @@ require "redis" require "celluloid/redis/version" -require "celluloid/redis/redis_ext" \ No newline at end of file +require "redis/connection/celluloid" diff --git a/lib/celluloid/redis/redis_ext.rb b/lib/celluloid/redis/redis_ext.rb deleted file mode 100644 index 76a72f4..0000000 --- a/lib/celluloid/redis/redis_ext.rb +++ /dev/null @@ -1,28 +0,0 @@ -class Redis - class Client - # Well this is really sad. redis-rb does not provide extensible driver - # support. Instead they couple everything together though this method. - # This leaves us no choice but to monkeypatch - def _parse_driver(driver) - driver = driver.to_s if driver.is_a?(Symbol) - - if driver.kind_of?(String) - case driver - when "ruby" - require "redis/connection/ruby" - driver = Connection::Ruby - when "celluloid" - require "redis/connection/celluloid" - driver = Connection::Celluloid - when "hiredis" - require "redis/connection/hiredis" - driver = Connection::Hiredis - else - raise "Unknown driver: #{driver}" - end - end - - driver - end - end -end \ No newline at end of file diff --git a/spec/redis/connection/celluloid_spec.rb b/spec/redis/connection/celluloid_spec.rb index 7aa3ada..569a83c 100644 --- a/spec/redis/connection/celluloid_spec.rb +++ b/spec/redis/connection/celluloid_spec.rb @@ -9,10 +9,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 From 285f1ac4b7c944ea840f26d855077fe57ea2c187 Mon Sep 17 00:00:00 2001 From: Ryan Festag Date: Thu, 20 Apr 2017 22:18:24 -0600 Subject: [PATCH 2/3] Renamed Celluloid::Redis to CelluloidRedis to avoid namespace collision with Redis within actors --- celluloid-redis.gemspec | 2 +- lib/celluloid/redis/version.rb | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/celluloid-redis.gemspec b/celluloid-redis.gemspec index a086127..8af80d5 100644 --- a/celluloid-redis.gemspec +++ b/celluloid-redis.gemspec @@ -5,7 +5,7 @@ require 'celluloid/redis/version' Gem::Specification.new do |spec| spec.name = "celluloid-redis" - spec.version = Celluloid::Redis::VERSION + spec.version = CelluloidRedis::VERSION spec.authors = ["Tony Arcieri"] spec.email = ["tony.arcieri@gmail.com"] spec.description = "Celluloid::IO support for the redis-rb library" diff --git a/lib/celluloid/redis/version.rb b/lib/celluloid/redis/version.rb index 19d8a7a..d302296 100644 --- a/lib/celluloid/redis/version.rb +++ b/lib/celluloid/redis/version.rb @@ -1,5 +1,3 @@ -module Celluloid - module Redis - VERSION = "0.0.2" - end +module CelluloidRedis + VERSION = "0.0.2" end From 863612c1c41e43062faa72eb4c71bfd7f2f7f1e0 Mon Sep 17 00:00:00 2001 From: Ryan Festag Date: Sun, 23 Apr 2017 07:24:02 -0600 Subject: [PATCH 3/3] Revert "Renamed Celluloid::Redis to CelluloidRedis to avoid namespace collision with Redis within actors" This reverts commit 285f1ac4b7c944ea840f26d855077fe57ea2c187. --- celluloid-redis.gemspec | 2 +- lib/celluloid/redis/version.rb | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/celluloid-redis.gemspec b/celluloid-redis.gemspec index 8af80d5..a086127 100644 --- a/celluloid-redis.gemspec +++ b/celluloid-redis.gemspec @@ -5,7 +5,7 @@ require 'celluloid/redis/version' Gem::Specification.new do |spec| spec.name = "celluloid-redis" - spec.version = CelluloidRedis::VERSION + spec.version = Celluloid::Redis::VERSION spec.authors = ["Tony Arcieri"] spec.email = ["tony.arcieri@gmail.com"] spec.description = "Celluloid::IO support for the redis-rb library" diff --git a/lib/celluloid/redis/version.rb b/lib/celluloid/redis/version.rb index d302296..19d8a7a 100644 --- a/lib/celluloid/redis/version.rb +++ b/lib/celluloid/redis/version.rb @@ -1,3 +1,5 @@ -module CelluloidRedis - VERSION = "0.0.2" +module Celluloid + module Redis + VERSION = "0.0.2" + end end