Navigation Menu

Skip to content

Commit

Permalink
Dumper's arguments is not optional
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 10, 2015
1 parent 782d368 commit 3bb61df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/drndump/command.rb
Expand Up @@ -105,7 +105,7 @@ def create_option_parser
parser
end

def dumper_options
def dumper_params
{
:host => @host,
:port => @port,
Expand All @@ -116,7 +116,7 @@ def dumper_options
end

def dump
@dumper = Dumper.new(dumper_options)
@dumper = Dumper.new(dumper_params)
client_options = {
:backend => :coolio,
:loop => @loop,
Expand Down
12 changes: 6 additions & 6 deletions lib/drndump/dumper.rb
Expand Up @@ -22,13 +22,13 @@ class Dumper
attr_reader :error_message

def initialize(params)
@host = params[:host] || "localhost"
@port = params[:port] || 10031
@tag = params[:tag] || "droonga"
@dataset = params[:dataset] || "Default"
@host = params[:host]
@port = params[:port]
@tag = params[:tag]
@dataset = params[:dataset]

@receiver_host = params[:receiver_host] || Socket.gethostname
@receiver_port = params[:receiver_port] || 0
@receiver_host = params[:receiver_host]
@receiver_port = params[:receiver_port]

@error_message = nil
end
Expand Down

0 comments on commit 3bb61df

Please sign in to comment.