elasticsearch-model 5.0.2 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Rakefile +3 -3
- data/lib/elasticsearch/model/version.rb +1 -1
- data/test/integration/mongoid_basic_test.rb +3 -4
- data/test/integration/multiple_models_test.rb +3 -3
- data/test/test_helper.rb +4 -5
- data/test/unit/multimodel_test.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d3f9a1aed30a6f21b7c51f5f73ab01e9f00ea7b3d2d3d6b2203b5ba922e6dd63
|
4
|
+
data.tar.gz: 65bcb7ba51e908ada809d47d9aea04d2c78091182061b2d83488735696c25c93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81f261b7d86e68d6b23e811a5053bb300982d4536ac3a7026850b098f08237e46a51c847cc2d12736fee7544a3984cae45a0ebef034a6cb38dd41c3bc96c8b14
|
7
|
+
data.tar.gz: e53472c07599acae594fdcdc19405eb4f03cbfe77ee242429d539dc09cce5b03011d3e74f2b777642e0018895ba0e57551f385d37dbb20c6ce62877e8393819f
|
data/Rakefile
CHANGED
@@ -38,10 +38,10 @@ namespace :test do
|
|
38
38
|
sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/5.0.gemfile', __FILE__)}' bundle exec rake test:run_unit"
|
39
39
|
end
|
40
40
|
|
41
|
-
desc "Run integration tests against
|
41
|
+
desc "Run integration tests against latest stable ActiveModel (5)"
|
42
42
|
task :integration do
|
43
|
-
sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/3.0.gemfile', __FILE__)}' bundle exec rake test:run_integration"
|
44
|
-
sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/4.0.gemfile', __FILE__)}' bundle exec rake test:run_integration"
|
43
|
+
#sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/3.0.gemfile', __FILE__)}' bundle exec rake test:run_integration"
|
44
|
+
#sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/4.0.gemfile', __FILE__)}' bundle exec rake test:run_integration"
|
45
45
|
sh "BUNDLE_GEMFILE='#{File.expand_path('../gemfiles/5.0.gemfile', __FILE__)}' bundle exec rake test:run_integration"
|
46
46
|
end
|
47
47
|
|
@@ -6,7 +6,7 @@ ActiveRecord::Base.establish_connection( :adapter => 'sqlite3', :database => ":m
|
|
6
6
|
|
7
7
|
::ActiveRecord::Base.raise_in_transactional_callbacks = true if ::ActiveRecord::Base.respond_to?(:raise_in_transactional_callbacks) && ::ActiveRecord::VERSION::MAJOR.to_s < '5'
|
8
8
|
|
9
|
-
|
9
|
+
MongoDB.setup!
|
10
10
|
|
11
11
|
module Elasticsearch
|
12
12
|
module Model
|
@@ -115,8 +115,8 @@ module Elasticsearch
|
|
115
115
|
assert_equal 0, response.page(3).per(3).results.size
|
116
116
|
end
|
117
117
|
|
118
|
-
if
|
119
|
-
|
118
|
+
if MongoDB.available?
|
119
|
+
MongoDB.connect_to 'mongoid_collections'
|
120
120
|
|
121
121
|
context "Across mongoid models" do
|
122
122
|
setup do
|
data/test/test_helper.rb
CHANGED
@@ -62,14 +62,13 @@ module Elasticsearch
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
class
|
65
|
+
class MongoDB
|
66
66
|
def self.setup!
|
67
67
|
begin
|
68
68
|
require 'mongoid'
|
69
|
-
|
70
|
-
session.connect
|
69
|
+
Mongo::Client.new(["localhost:27017"])
|
71
70
|
ENV['MONGODB_AVAILABLE'] = 'yes'
|
72
|
-
rescue LoadError,
|
71
|
+
rescue LoadError, Mongo::Error => e
|
73
72
|
$stderr.puts "MongoDB not installed or running: #{e}"
|
74
73
|
end
|
75
74
|
end
|
@@ -86,7 +85,7 @@ class Mongo
|
|
86
85
|
logger.level = ::Logger::DEBUG
|
87
86
|
|
88
87
|
Mongoid.logger = logger unless ENV['QUIET']
|
89
|
-
|
88
|
+
Mongo::Logger.logger = logger unless ENV['QUIET']
|
90
89
|
|
91
90
|
Mongoid.connect_to source
|
92
91
|
end
|
@@ -4,8 +4,8 @@ class Elasticsearch::Model::MultimodelTest < Test::Unit::TestCase
|
|
4
4
|
|
5
5
|
context "Multimodel class" do
|
6
6
|
setup do
|
7
|
-
title = stub('Foo', index_name: 'foo_index', document_type: 'foo')
|
8
|
-
series = stub('Bar', index_name: 'bar_index', document_type: 'bar')
|
7
|
+
title = stub('Foo', index_name: 'foo_index', document_type: 'foo', to_ary: nil)
|
8
|
+
series = stub('Bar', index_name: 'bar_index', document_type: 'bar', to_ary: nil)
|
9
9
|
@multimodel = Elasticsearch::Model::Multimodel.new(title, series)
|
10
10
|
end
|
11
11
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0
|
4
|
+
version: 5.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: 2018-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: elasticsearch
|
@@ -432,7 +432,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
432
432
|
version: '0'
|
433
433
|
requirements: []
|
434
434
|
rubyforge_project:
|
435
|
-
rubygems_version: 2.
|
435
|
+
rubygems_version: 2.7.6
|
436
436
|
signing_key:
|
437
437
|
specification_version: 4
|
438
438
|
summary: ActiveModel/Record integrations for Elasticsearch.
|