elasticsearch-persistence 6.0.0 → 6.1.0

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: 31bf48d65a26143768e093d3ef1a26f0d95adb5f4f009448b1b48cde4f1b643a
4
- data.tar.gz: bf4f4581573e35a873cb8d1f2db6ec86ddf39420010fcaab6e00fced48f91376
3
+ metadata.gz: af7db650abb225ca14ab980bd5898448032161f0fc2e3dbad5e09073d824ea3b
4
+ data.tar.gz: 8167181fc3b461abda4791820b859737939d60cf58eca9d9bdbb8124f9f3f8d8
5
5
  SHA512:
6
- metadata.gz: 4e353c41e60cfa475821d87107aaceffaf399f0da68a28d8ecc529b5aadf3257bdc0df61f07a22055645ad143279cc1d30e895b505837bf540813e089622a95a
7
- data.tar.gz: ec8f36fb64a038a5d0ec91bb51404b0c15d1d2b731175eba456098030c841c7e4d269c0e9f14c425b79a52b6531af1402c968a556560b29a8608df27c36b14a3
6
+ metadata.gz: 48bc81028eb425c36d9ba2cc575c0e790cdd14f644093314409c9e505cddeeac2c5d5d3ea4cb2e36c791ec5f1f6b97b7029e1d0a78ae5c848ba5d0f6e94d9ec9
7
+ data.tar.gz: b07db72fa324af9079d5f7ccb92c3bf56988a22986ff9b4c5ce51885bd3a4c8ff08ce0317d3a9f1a1894e261884d15077e3d580712ad3ca76641897f4ecbc8a4
data/Rakefile CHANGED
@@ -12,19 +12,22 @@ require 'rspec/core/rake_task'
12
12
  namespace :test do
13
13
 
14
14
  RSpec::Core::RakeTask.new(:spec)
15
- Rake::TestTask.new(:unit) do |test|
16
- end
17
15
 
18
- Rake::TestTask.new(:integration) do |test|
16
+ Rake::TestTask.new(:all) do |test|
19
17
  test.verbose = false
20
18
  test.warning = false
21
19
  test.deps = [ :spec ]
22
20
  end
21
+ end
23
22
 
24
- Rake::TestTask.new(:all) do |test|
25
- test.verbose = false
26
- test.warning = false
27
- test.deps = [ :spec ]
23
+ namespace :bundle do
24
+ desc 'Install gem dependencies'
25
+ task :install do
26
+ puts '-'*80
27
+ Bundler.with_clean_env do
28
+ sh 'bundle install'
29
+ end
30
+ puts '-'*80
28
31
  end
29
32
  end
30
33
 
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
29
29
  s.add_dependency "activemodel", '> 4'
30
30
  s.add_dependency "hashie"
31
31
 
32
- s.add_development_dependency "bundler", "~> 1.5"
32
+ s.add_development_dependency "bundler"
33
33
  s.add_development_dependency "rake", "~> 11.1"
34
34
 
35
35
  s.add_development_dependency "oj" unless defined?(JRUBY_VERSION)
@@ -211,7 +211,7 @@ module Elasticsearch
211
211
  #
212
212
  # @since 6.0.0
213
213
  def index_exists?(*args)
214
- super(index_name: index_name)
214
+ super
215
215
  end
216
216
 
217
217
  # Get the nicer formatted string for use in inspection.
@@ -1,5 +1,5 @@
1
1
  module Elasticsearch
2
2
  module Persistence
3
- VERSION = '6.0.0'
3
+ VERSION = '6.1.0'
4
4
  end
5
5
  end
@@ -353,6 +353,13 @@ describe Elasticsearch::Persistence::Repository do
353
353
  it 'determines if the index exists' do
354
354
  expect(repository.index_exists?).to be(true)
355
355
  end
356
+
357
+ context 'when arguments are passed in' do
358
+
359
+ it 'passes the arguments to the request' do
360
+ expect(repository.index_exists?(index: 'other')).to be(false)
361
+ end
362
+ end
356
363
  end
357
364
 
358
365
  context 'when the method is called on the class' do
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  require 'pry-nav'
2
2
  require 'elasticsearch/persistence'
3
3
 
4
+ unless defined?(ELASTICSEARCH_URL)
5
+ ELASTICSEARCH_URL = ENV['ELASTICSEARCH_URL'] || "localhost:#{(ENV['TEST_CLUSTER_PORT'] || 9200)}"
6
+ end
7
+
4
8
  RSpec.configure do |config|
5
9
  config.formatter = 'documentation'
6
10
  config.color = true
@@ -13,7 +17,7 @@ end
13
17
  # The default client to be used by the repositories.
14
18
  #
15
19
  # @since 6.0.0
16
- DEFAULT_CLIENT = Elasticsearch::Client.new(host: "localhost:#{(ENV['TEST_CLUSTER_PORT'] || 9250)}",
20
+ DEFAULT_CLIENT = Elasticsearch::Client.new(host: ELASTICSEARCH_URL,
17
21
  tracer: (ENV['QUIET'] ? nil : ::Logger.new(STDERR)))
18
22
 
19
23
  class MyTestRepository
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-persistence
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karel Minarik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-06 00:00:00.000000000 Z
11
+ date: 2019-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elasticsearch
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '1.5'
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '1.5'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -349,8 +349,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
349
349
  - !ruby/object:Gem::Version
350
350
  version: '0'
351
351
  requirements: []
352
- rubyforge_project:
353
- rubygems_version: 2.7.7
352
+ rubygems_version: 3.0.4
354
353
  signing_key:
355
354
  specification_version: 4
356
355
  summary: Persistence layer for Ruby models and Elasticsearch.