elasticsearch-api 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -46,12 +46,12 @@ namespace :test do
46
46
 
47
47
  branches = `git --git-dir=#{__current__.join('../support/elasticsearch/.git')} --work-tree=#{__current__.join('../support/elasticsearch')} branch --no-color`
48
48
 
49
- current_branch = branches
50
- .split("\n")
51
- .select { |b| b =~ /^\*/ }
52
- .reject { |b| b =~ /detached/ }
53
- .map { |b| b.gsub(/^\*\s*/, '') }
54
- .first
49
+ current_branch = branches.
50
+ split("\n").
51
+ select { |b| b =~ /^\*/ }.
52
+ reject { |b| b =~ /detached/ }.
53
+ map { |b| b.gsub(/^\*\s*/, '') }.
54
+ first
55
55
 
56
56
  unless current_branch
57
57
  STDERR.puts "[!] Unable to determine current branch, defaulting to 'master'"
@@ -67,7 +67,7 @@ namespace :test do
67
67
 
68
68
  # Check if a test cluster is running
69
69
  begin
70
- client = Elasticsearch::Client.new host: "localhost:#{ENV['TEST_CLUSTER_PORT'] || 9250}"
70
+ client = Elasticsearch::Client.new :host => "localhost:#{ENV['TEST_CLUSTER_PORT'] || 9250}"
71
71
  es_version_info = client.info['version']
72
72
  build_hash = es_version_info['build_hash']
73
73
  cluster_running = true
@@ -27,7 +27,10 @@ Gem::Specification.new do |s|
27
27
 
28
28
  s.add_development_dependency "elasticsearch"
29
29
  s.add_development_dependency "elasticsearch-transport"
30
- s.add_development_dependency "elasticsearch-extensions"
30
+
31
+ if defined?(RUBY_VERSION) && RUBY_VERSION > '1.9'
32
+ s.add_development_dependency "elasticsearch-extensions"
33
+ end
31
34
 
32
35
  s.add_development_dependency "ansi"
33
36
  s.add_development_dependency "shoulda-context"
@@ -38,7 +41,6 @@ Gem::Specification.new do |s|
38
41
  s.add_development_dependency "ci_reporter"
39
42
 
40
43
  # Gems for testing integrations
41
- s.add_development_dependency "jbuilder"
42
44
  s.add_development_dependency "jsonify"
43
45
  s.add_development_dependency "hashie"
44
46
 
@@ -51,6 +53,7 @@ Gem::Specification.new do |s|
51
53
 
52
54
  if defined?(RUBY_VERSION) && RUBY_VERSION > '1.9'
53
55
  s.add_development_dependency "ruby-prof"
56
+ s.add_development_dependency "jbuilder"
54
57
  s.add_development_dependency "escape_utils"
55
58
  s.add_development_dependency "simplecov"
56
59
  s.add_development_dependency "cane"
@@ -1,5 +1,5 @@
1
1
  module Elasticsearch
2
2
  module API
3
- VERSION = "0.4.6"
3
+ VERSION = "0.4.7"
4
4
  end
5
5
  end
data/test/test_helper.rb CHANGED
@@ -24,9 +24,11 @@ require 'require-prof' if ENV["REQUIRE_PROF"]
24
24
  require 'elasticsearch/api'
25
25
  RequireProf.print_timing_infos if ENV["REQUIRE_PROF"]
26
26
 
27
- require 'elasticsearch/extensions/test/cluster'
28
- require 'elasticsearch/extensions/test/startup_shutdown'
29
- require 'elasticsearch/extensions/test/profiling'
27
+ if defined?(RUBY_VERSION) && RUBY_VERSION > '1.9'
28
+ require 'elasticsearch/extensions/test/cluster'
29
+ require 'elasticsearch/extensions/test/startup_shutdown'
30
+ require 'elasticsearch/extensions/test/profiling'
31
+ end
30
32
 
31
33
  module Elasticsearch
32
34
  module Test
@@ -1,6 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
- require 'jbuilder'
3
+ require 'jbuilder' if defined?(RUBY_VERSION) && RUBY_VERSION > '1.9'
4
4
  require 'jsonify'
5
5
 
6
6
  module Elasticsearch
@@ -31,7 +31,7 @@ module Elasticsearch
31
31
 
32
32
  subject.search :body => json
33
33
  end
34
- end
34
+ end if defined?(RUBY_VERSION) && RUBY_VERSION > '1.9'
35
35
 
36
36
  context "Jsonify" do
37
37
  subject { FakeClient.new }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -220,7 +220,7 @@ dependencies:
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0'
222
222
  - !ruby/object:Gem::Dependency
223
- name: jbuilder
223
+ name: jsonify
224
224
  requirement: !ruby/object:Gem::Requirement
225
225
  none: false
226
226
  requirements:
@@ -236,7 +236,7 @@ dependencies:
236
236
  - !ruby/object:Gem::Version
237
237
  version: '0'
238
238
  - !ruby/object:Gem::Dependency
239
- name: jsonify
239
+ name: hashie
240
240
  requirement: !ruby/object:Gem::Requirement
241
241
  none: false
242
242
  requirements:
@@ -252,7 +252,7 @@ dependencies:
252
252
  - !ruby/object:Gem::Version
253
253
  version: '0'
254
254
  - !ruby/object:Gem::Dependency
255
- name: hashie
255
+ name: ruby-prof
256
256
  requirement: !ruby/object:Gem::Requirement
257
257
  none: false
258
258
  requirements:
@@ -268,7 +268,7 @@ dependencies:
268
268
  - !ruby/object:Gem::Version
269
269
  version: '0'
270
270
  - !ruby/object:Gem::Dependency
271
- name: ruby-prof
271
+ name: jbuilder
272
272
  requirement: !ruby/object:Gem::Requirement
273
273
  none: false
274
274
  requirements: