Skip to content

Commit

Permalink
Fix Log Info Bug in Index#search. Test more log levels for bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvc committed Feb 25, 2013
1 parent 37eccbd commit dc79860
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ test/version_tmp
tmp
\#*#
.\#*#
.#*
.#*
test_logs
2 changes: 1 addition & 1 deletion lib/stretcher/index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def search(generic_opts={}, explicit_body=nil)
body = generic_opts
end

logger.info { "Stretcher Search: curl -XGET '#{uri}' -d '#{body.to_json}'" }
logger.info { "Stretcher Search: curl -XGET '#{uri_str}' -d '#{body.to_json}'" }
response = @server.request(:get, path_uri(uri_str)) do |req|
req.body = body
end
Expand Down
2 changes: 1 addition & 1 deletion lib/stretcher/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Stretcher
VERSION = "1.3.1"
VERSION = "1.3.2"
end
4 changes: 3 additions & 1 deletion spec/lib/stretcher_index_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
require 'spec_helper'

describe Stretcher::Index do
let(:server) { Stretcher::Server.new(ES_URL) }
let(:server) {
Stretcher::Server.new(ES_URL, logger: DEBUG_LOGGER)
}
let(:index) { server.index('foo') }
let(:corpus) {
[
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require 'rspec'
require 'stretcher'

DEBUG_LOGGER = Logger.new('test_logs')
DEBUG_LOGGER.level = Logger::DEBUG
ES_URL = 'http://localhost:9200'
require File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib stretcher]))

0 comments on commit dc79860

Please sign in to comment.