Skip to content

Commit

Permalink
rename blocking connection to dumb
Browse files Browse the repository at this point in the history
  • Loading branch information
funny-falcon committed Jan 25, 2015
1 parent ef28bed commit 6c8a1f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/tarantool16.rb
Expand Up @@ -2,14 +2,14 @@
require "tarantool16/db"

module Tarantool16
autoload :BlockingDB, 'tarantool16/blocking_db'
autoload :DumbDB, 'tarantool16/dumb_db'
def self.new(opts = {})
opts = opts.dup
hosts = opts[:host]
type = opts[:type] && opts[:type].to_s || 'blocking'
type = opts[:type] && opts[:type].to_s || 'dumb'
case type
when 'blocking'
BlockingDB.new hosts, opts
when 'dumb'
DumbDB.new hosts, opts
else
raise "Unknown DB type"
end
Expand Down
Expand Up @@ -2,7 +2,7 @@
require_relative 'common'
module Tarantool16
module Connection
class Blocking
class Dumb
include Common

def initialize(host, opts = {})
Expand Down
6 changes: 3 additions & 3 deletions lib/tarantool16/blocking_db.rb → lib/tarantool16/dumb_db.rb
@@ -1,9 +1,9 @@
require_relative 'db'
require_relative 'connection/blocking'
require_relative 'connection/dumb'

module Tarantool16
class BlockingDB < DB
Connection = Tarantool16::Connection::Blocking
class DumbDB < DB
Connection = Tarantool16::Connection::Dumb

RETURN_OR_RAISE = lambda{|r|
raise r.error unless r.ok?
Expand Down

0 comments on commit 6c8a1f1

Please sign in to comment.