elasticsearch-extensions 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.add_dependency "ansi"
23
23
 
24
24
  if defined?(RUBY_VERSION) && RUBY_VERSION > '1.9'
25
- s.add_dependency "ruby-prof"
25
+ s.add_dependency "ruby-prof" unless defined? JRUBY_VERSION
26
26
  end
27
27
 
28
28
  s.add_development_dependency "bundler", "> 1"
@@ -139,7 +139,12 @@ module Elasticsearch
139
139
  def stop(arguments={})
140
140
  arguments[:port] ||= (ENV['TEST_CLUSTER_PORT'] || 9250).to_i
141
141
 
142
- nodes = JSON.parse(Net::HTTP.get(URI("http://localhost:#{arguments[:port]}/_nodes/?process"))) rescue nil
142
+ nodes = begin
143
+ JSON.parse(Net::HTTP.get(URI("http://localhost:#{arguments[:port]}/_nodes/?process")))
144
+ rescue Exception => e
145
+ STDERR.puts "[!] Exception raised when stopping the cluster: #{e.inspect}".ansi(:red)
146
+ nil
147
+ end
143
148
 
144
149
  return false if nodes.nil? or nodes.empty?
145
150
 
@@ -1,5 +1,5 @@
1
1
  module Elasticsearch
2
2
  module Extensions
3
- VERSION = "0.0.13"
3
+ VERSION = "0.0.14"
4
4
  end
5
5
  end
@@ -1,6 +1,10 @@
1
1
  RUBY_1_8 = defined?(RUBY_VERSION) && RUBY_VERSION < '1.9'
2
+ JRUBY = defined?(JRUBY_VERSION)
2
3
 
3
- exit(0) if RUBY_1_8
4
+ if RUBY_1_8
5
+ puts "Tests for '#{File.expand_path('../..', __FILE__).split('/').last}' not supported on Ruby #{RUBY_VERSION}"
6
+ exit(0)
7
+ end
4
8
 
5
9
  if ENV['COVERAGE'] && ENV['CI'].nil? && !RUBY_1_8
6
10
  require 'simplecov'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-28 00:00:00.000000000 Z
12
+ date: 2014-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: elasticsearch