elasticsearch-extensions 0.0.31 → 0.0.33

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.
@@ -1,3 +1,20 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
1
18
  require 'test_helper'
2
19
 
3
20
  require 'elasticsearch/extensions/test/cluster'
@@ -274,6 +291,24 @@ class Elasticsearch::Extensions::TestClusterTest < Elasticsearch::Test::UnitTest
274
291
  assert_equal '2.0', @subject.__determine_version
275
292
  end
276
293
 
294
+ should "return version from `elasticsearch --version` when version reaches double digits" do
295
+ File.expects(:exist?).with('/foo/bar/bin/../lib/').returns(false)
296
+ File.expects(:exist?).with('/foo/bar/bin/elasticsearch').returns(true)
297
+
298
+ io = mock('IO')
299
+ io.expects(:pid).returns(123)
300
+ io.expects(:read).returns('Version: 7.11.0-SNAPSHOT, Build: d1c86b0/2016-03-30T10:43:20Z, JVM: 1.8.0_60')
301
+ io.expects(:closed?).returns(false)
302
+ io.expects(:close)
303
+ IO.expects(:popen).returns(io)
304
+
305
+ Process.stubs(:wait)
306
+ Process.expects(:kill).with('INT', 123)
307
+
308
+ assert_equal '7.0', @subject.__determine_version
309
+ end
310
+
311
+
277
312
  should "return version from arguments" do
278
313
  cluster = Elasticsearch::Extensions::Test::Cluster::Cluster.new command: '/foo/bar/bin/elasticsearch', version: '5.2'
279
314
  assert_equal '5.0', cluster.__determine_version
data/test/test_helper.rb CHANGED
@@ -1,6 +1,31 @@
1
- JRUBY = defined?(JRUBY_VERSION)
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
2
17
 
3
- if ENV['COVERAGE'] && ENV['CI'].nil? && !RUBY_1_8
18
+ ELASTICSEARCH_HOSTS = if (hosts = ENV['TEST_ES_SERVER'] || ENV['ELASTICSEARCH_HOSTS'])
19
+ hosts.split(',').map do |host|
20
+ /(http\:\/\/)?(\S+)/.match(host)[2]
21
+ end
22
+ end.freeze
23
+
24
+ TEST_HOST, TEST_PORT = ELASTICSEARCH_HOSTS.first.split(':') if ELASTICSEARCH_HOSTS
25
+
26
+ JRUBY = defined?(JRUBY_VERSION)
27
+
28
+ if ENV['COVERAGE'] && ENV['CI'].nil?
4
29
  require 'simplecov'
5
30
  SimpleCov.start { add_filter "/test|test_" }
6
31
  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.31
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: 2019-02-06 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
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '11.1'
75
+ version: '12.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '11.1'
82
+ version: '12.3'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: awesome_print
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -126,30 +126,30 @@ dependencies:
126
126
  name: minitest
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: '5'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: '5'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: minitest-reporters
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: '1'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: '1'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: simplecov
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -267,10 +267,14 @@ files:
267
267
  - test/test/cluster/integration/cluster_test.rb
268
268
  - test/test/cluster/unit/cluster_test.rb
269
269
  - test/test_helper.rb
270
- homepage: https://github.com/elasticsearch/elasticsearch-ruby/tree/master/elasticsearch-extensions
270
+ homepage: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html
271
271
  licenses:
272
- - Apache 2
273
- metadata: {}
272
+ - Apache-2.0
273
+ metadata:
274
+ homepage_uri: https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html
275
+ changelog_uri: https://github.com/elastic/elasticsearch-ruby/blob/master/CHANGELOG.md
276
+ source_code_uri: https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-extensions
277
+ bug_tracker_uri: https://github.com/elastic/elasticsearch-ruby/issues
274
278
  post_install_message:
275
279
  rdoc_options: []
276
280
  require_paths:
@@ -286,8 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
286
290
  - !ruby/object:Gem::Version
287
291
  version: '0'
288
292
  requirements: []
289
- rubyforge_project:
290
- rubygems_version: 2.7.7
293
+ rubygems_version: 3.1.4
291
294
  signing_key:
292
295
  specification_version: 4
293
296
  summary: Extensions for the Elasticsearch Rubygem