elasticsearch-extensions 0.0.32 → 0.0.33

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4ca50bd854c095ea97403668540fcd796a75389f663a7dd9569f9aa87f22064
4
- data.tar.gz: ca68b95a4c7790f52689c9d2d1cae8e084da8c8cd142916dbbd40d9fb70c0c75
3
+ metadata.gz: f2f31a4f9b391f84ea23e4314ec1da63b891285fcd3ea3fb8e1f49096c351284
4
+ data.tar.gz: 74eee6485aed24c6de222ec3b9fdb2fae9c18bfb06efa27c36afcedac73dde9d
5
5
  SHA512:
6
- metadata.gz: 2b3101ac071f64380812b1921fe415c2e5e3731e87b2ca7d392d72006e1e5de771cace1731ff5d1680dafde9e66027b3f18d3c2b2a9436ce6bfd7009dadcb43a
7
- data.tar.gz: 6408655db000713236af559f7a8ab832427ed3127d34e76b515cd0183abd3093bd2e6eedcc03b1c08526fb9a8f621809fb8e3314461d4cb4bdce4f1fc5d80700
6
+ metadata.gz: 5c1e0783284b2e4e32a4f3df18f9af16e243995072265e061b4c29d06243c1931d5d9cdcea99906e68f8017bc148e0f956cbaa59c5bd7c5d0f24f47e3d3c03e3
7
+ data.tar.gz: 979f5e069b5124e9913afd4033045114017f176f5d3ad327d4a7cd958cd2612d6e0b9a9dc0d595db5d25bf2a660ea3f21e0e839f15e68ecdf7dcef4564473001
@@ -205,7 +205,7 @@ module Elasticsearch
205
205
  -E path.repo=/tmp \
206
206
  -E repositories.url.allowed_urls=http://snapshot.test* \
207
207
  -E discovery.zen.minimum_master_nodes=#{arguments[:number_of_nodes]-1} \
208
- -E xpack.security.enabled=false \
208
+ #{'-E xpack.security.enabled=false' unless arguments[:dist] == 'oss'} \
209
209
  -E node.max_local_storage_nodes=#{arguments[:number_of_nodes]} \
210
210
  -E logger.level=#{ENV['DEBUG'] ? 'DEBUG' : 'INFO'} \
211
211
  #{arguments[:es_params]}
@@ -472,7 +472,6 @@ module Elasticsearch
472
472
  #
473
473
  def __determine_version
474
474
  path_to_lib = File.dirname(arguments[:command]) + '/../lib/'
475
-
476
475
  version = if arguments[:version]
477
476
  arguments[:version]
478
477
  elsif File.exist?(path_to_lib) && !(jar = Dir.entries(path_to_lib).select { |f| f =~ /^elasticsearch\-\d/ }.first).nil?
@@ -530,6 +529,8 @@ module Elasticsearch
530
529
  raise RuntimeError, "Cannot determine Elasticsearch version from [#{arguments[:command]} --version] or [#{arguments[:command]} -v]"
531
530
  end
532
531
 
532
+ @dist = output.match(/Build: ([a-z]+)\//)&.[](1)
533
+
533
534
  if(m = output.match(/Version: (\d+\.\d+.\d+).*,/))
534
535
  m[1]
535
536
  else
@@ -564,11 +565,10 @@ module Elasticsearch
564
565
  # @return String
565
566
  #
566
567
  def __command(version, arguments, node_number)
567
- if command = COMMANDS[version]
568
- command.call(arguments, node_number)
569
- else
570
- raise ArgumentError, "Cannot find command for version [#{version}]"
571
- end
568
+ raise ArgumentError, "Cannot find command for version [#{version}]" unless (command = COMMANDS[version])
569
+
570
+ arguments.merge!({ dist: @dist })
571
+ command.call(arguments, node_number)
572
572
  end
573
573
 
574
574
  # Blocks the process and waits for the cluster to be in a "green" state
@@ -670,7 +670,6 @@ module Elasticsearch
670
670
  FileUtils.rm_rf arguments[:path_data]
671
671
  end
672
672
 
673
-
674
673
  # Check whether process for PIDs are running
675
674
  #
676
675
  # @api private
@@ -17,6 +17,6 @@
17
17
 
18
18
  module Elasticsearch
19
19
  module Extensions
20
- VERSION = '0.0.32'.freeze
20
+ VERSION = '0.0.33'.freeze
21
21
  end
22
22
  end
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.32
4
+ version: 0.0.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karel Minarik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-01 00:00:00.000000000 Z
11
+ date: 2020-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ansi
@@ -290,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  - !ruby/object:Gem::Version
291
291
  version: '0'
292
292
  requirements: []
293
- rubygems_version: 3.1.2
293
+ rubygems_version: 3.1.4
294
294
  signing_key:
295
295
  specification_version: 4
296
296
  summary: Extensions for the Elasticsearch Rubygem