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 +4 -4
- data/Rakefile +10 -7
- data/elasticsearch-persistence.gemspec +1 -1
- data/lib/elasticsearch/persistence/repository.rb +1 -1
- data/lib/elasticsearch/persistence/version.rb +1 -1
- data/spec/repository_spec.rb +7 -0
- data/spec/spec_helper.rb +5 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af7db650abb225ca14ab980bd5898448032161f0fc2e3dbad5e09073d824ea3b
|
4
|
+
data.tar.gz: 8167181fc3b461abda4791820b859737939d60cf58eca9d9bdbb8124f9f3f8d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(:
|
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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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"
|
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)
|
data/spec/repository_spec.rb
CHANGED
@@ -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:
|
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.
|
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:
|
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: '
|
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: '
|
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
|
-
|
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.
|