Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
cherry pick rails3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Sonnek committed Apr 13, 2011
1 parent 0aa8daa commit 025b497
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
2 changes: 2 additions & 0 deletions Gemfile
@@ -1,2 +1,4 @@
source "http://rubygems.org"

gemspec

17 changes: 0 additions & 17 deletions Rakefile
Expand Up @@ -9,22 +9,5 @@ Rake::TestTask.new(:test) do |test|
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end

require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end

task :default => :test

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""

rdoc.rdoc_dir = 'rdoc'
rdoc.title = "elastic_searchable #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
5 changes: 4 additions & 1 deletion lib/elastic_searchable.rb
Expand Up @@ -28,7 +28,10 @@ def logger=(logger)
def logger
@@logger
end
#perform a request to the elasticsearch server
# perform a request to the elasticsearch server
# configuration:
# ElasticSearchable.base_uri 'host:port' controls where to send request to
# ElasticSearchable.debug_output outputs all http traffic to console
def request(method, url, options = {})
response = self.send(method, url, options)
logger.debug "elasticsearch request: #{method} #{url} #{"took #{response['took']}ms" if response['took']}"
Expand Down

0 comments on commit 025b497

Please sign in to comment.