elasticsearch-extensions 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/elasticsearch/extensions/test/cluster.rb +5 -4
- data/lib/elasticsearch/extensions/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7be8d01471cedb9edc6fef26f2d4b8494e030afe
|
4
|
+
data.tar.gz: 3a34292423e4f6fe30578a4c8625799bfa3f8116
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b783d84286a9a4282c74d8631de4f510fdfa2e393363139a878614f814f6409767b11c0c13aba18935a51442b6003dc67eaff65cf5ccfd792b1d3d2ad7ad59a
|
7
|
+
data.tar.gz: c93fbdc4a33b389f4a9083a0366907fd66c5feae7dd85cf2ed97a1bc59db2fe754087bd474238786bb70b2025aac5f6a5b3a8935abdd63200d315098c696c3e8
|
data/README.md
CHANGED
@@ -90,6 +90,9 @@ You can control the cluster configuration with environment variables as well:
|
|
90
90
|
TEST_CLUSTER_NAME=my_testing_cluster \
|
91
91
|
ruby -r elasticsearch -e "require 'elasticsearch/extensions/test/cluster'; Elasticsearch::Extensions::Test::Cluster.start"
|
92
92
|
|
93
|
+
To prevent deleting data and configurations when the cluster is started, for example in a development environment,
|
94
|
+
use the `clear_cluster: false` option or the `TEST_CLUSTER_CLEAR=false` environment variable.
|
95
|
+
|
93
96
|
[Full documentation](http://rubydoc.info/gems/elasticsearch-extensions/Elasticsearch/Extensions/Test/Cluster)
|
94
97
|
|
95
98
|
### Test::StartupShutdown
|
@@ -54,7 +54,7 @@ module Elasticsearch
|
|
54
54
|
# @option arguments [Boolean] :multicast_enabled Whether multicast is enabled (default: true)
|
55
55
|
# @option arguments [Integer] :timeout Timeout when starting the cluster (default: 30)
|
56
56
|
# @option arguments [String] :network_host The host that nodes will bind on and publish to
|
57
|
-
# @option arguments [Boolean] :
|
57
|
+
# @option arguments [Boolean] :clear_cluster Wipe out cluster content on startup (default: true)
|
58
58
|
#
|
59
59
|
# You can also use environment variables to set these options.
|
60
60
|
#
|
@@ -89,7 +89,8 @@ module Elasticsearch
|
|
89
89
|
arguments[:multicast_enabled] ||= ENV.fetch('TEST_CLUSTER_MULTICAST', 'true')
|
90
90
|
arguments[:timeout] ||= (ENV.fetch('TEST_CLUSTER_TIMEOUT', 30).to_i)
|
91
91
|
arguments[:network_host] ||= @@network_host
|
92
|
-
|
92
|
+
|
93
|
+
clear_cluster = !!arguments[:clear_cluster] || (ENV.fetch('TEST_CLUSTER_CLEAR', 'true') != 'false')
|
93
94
|
|
94
95
|
# Make sure `cluster_name` is not dangerous
|
95
96
|
if arguments[:cluster_name] =~ /^[\/\\]?$/
|
@@ -102,8 +103,8 @@ module Elasticsearch
|
|
102
103
|
return false
|
103
104
|
end
|
104
105
|
|
105
|
-
# Wipe out data for this cluster name
|
106
|
-
FileUtils.rm_rf "#{arguments[:path_data]}/#{arguments[:cluster_name]}" if
|
106
|
+
# Wipe out data on disk for this cluster name by default
|
107
|
+
FileUtils.rm_rf "#{arguments[:path_data]}/#{arguments[:cluster_name]}" if clear_cluster
|
107
108
|
|
108
109
|
print "Starting ".ansi(:faint) +
|
109
110
|
@@number_of_nodes.to_s.ansi(:bold, :faint) +
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karel Minarik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ansi
|