elasticsearch-extensions 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,6 +34,10 @@ Gem::Specification.new do |s|
34
34
  s.add_development_dependency "ruby-prof"
35
35
  s.add_development_dependency "ci_reporter"
36
36
 
37
+ if defined?(RUBY_VERSION) && RUBY_VERSION < '1.9'
38
+ s.add_development_dependency "json"
39
+ end
40
+
37
41
  if defined?(RUBY_VERSION) && RUBY_VERSION > '1.9'
38
42
  s.add_development_dependency "simplecov"
39
43
  s.add_development_dependency "cane"
@@ -69,6 +69,11 @@ module Elasticsearch
69
69
  arguments[:command] ||= ENV['TEST_CLUSTER_COMMAND'] || 'elasticsearch'
70
70
  arguments[:port] ||= (ENV['TEST_CLUSTER_PORT'] || 9250).to_i
71
71
  arguments[:cluster_name] ||= ENV['TEST_CLUSTER_NAME'] || 'elasticsearch_test'
72
+ arguments[:gateway_type] ||= 'none'
73
+ arguments[:index_store] ||= 'memory'
74
+ arguments[:path_data] ||= ENV['TEST_CLUSTER_DATA'] || '/tmp'
75
+ arguments[:es_params] ||= ENV['TEST_CLUSTER_PARAMS'] || ''
76
+ arguments[:path_work] ||= '/tmp'
72
77
  arguments[:node_name] ||= 'node'
73
78
  arguments[:timeout] ||= 30
74
79
 
@@ -84,18 +89,20 @@ module Elasticsearch
84
89
 
85
90
  @@number_of_nodes.times do |n|
86
91
  n += 1
87
- pidfile = File.expand_path("tmp/elasticsearch-#{n}.pid", Dir.pwd)
88
92
  pid = Process.spawn <<-COMMAND
89
93
  #{arguments[:command]} \
90
- -D es.foreground=yes \
94
+ -D es.foreground=no \
91
95
  -D es.cluster.name=#{arguments[:cluster_name]} \
92
96
  -D es.node.name=#{arguments[:node_name]}-#{n} \
93
97
  -D es.http.port=#{arguments[:port].to_i + (n-1)} \
94
- -D es.gateway.type=none \
95
- -D es.index.store.type=memory \
98
+ -D es.gateway.type=#{arguments[:gateway_type]} \
99
+ -D es.index.store.type=#{arguments[:index_store]} \
100
+ -D es.path.data=#{arguments[:path_data]} \
101
+ -D es.path.work=#{arguments[:path_work]} \
96
102
  -D es.network.host=0.0.0.0 \
97
103
  -D es.discovery.zen.ping.multicast.enabled=true \
98
- -D es.pidfile=#{pidfile} \
104
+ -D es.node.test=true \
105
+ #{arguments[:es_params]} \
99
106
  > /dev/null 2>&1
100
107
  COMMAND
101
108
  Process.detach pid
@@ -0,0 +1,13 @@
1
+ require 'elasticsearch/extensions/test/cluster'
2
+
3
+ namespace :elasticsearch do
4
+ desc "Start Elasticsearch cluster for tests"
5
+ task :start do
6
+ Elasticsearch::Extensions::Test::Cluster.start
7
+ end
8
+
9
+ desc "Stop Elasticsearch cluster for tests"
10
+ task :stop do
11
+ Elasticsearch::Extensions::Test::Cluster.stop
12
+ end
13
+ end
@@ -1,5 +1,5 @@
1
1
  module Elasticsearch
2
2
  module Extensions
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
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.6
4
+ version: 0.0.7
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: 2013-12-09 00:00:00.000000000 Z
12
+ date: 2013-12-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: elasticsearch
@@ -255,6 +255,7 @@ files:
255
255
  - lib/elasticsearch/extensions/ansi/helpers.rb
256
256
  - lib/elasticsearch/extensions/ansi/response.rb
257
257
  - lib/elasticsearch/extensions/test/cluster.rb
258
+ - lib/elasticsearch/extensions/test/cluster/tasks.rb
258
259
  - lib/elasticsearch/extensions/test/profiling.rb
259
260
  - lib/elasticsearch/extensions/test/startup_shutdown.rb
260
261
  - lib/elasticsearch/extensions/version.rb