elasticsearch-model 5.0.2 → 5.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2b1f416db5d498101719140c9fbfc19ac0f6c5ad
4
- data.tar.gz: 617646d010a2b7f51ae5e11bf6bccca5836d815a
2
+ SHA256:
3
+ metadata.gz: d3f9a1aed30a6f21b7c51f5f73ab01e9f00ea7b3d2d3d6b2203b5ba922e6dd63
4
+ data.tar.gz: 65bcb7ba51e908ada809d47d9aea04d2c78091182061b2d83488735696c25c93
5
5
  SHA512:
6
- metadata.gz: 99f3847abe5159e91a74c178c0682c309bebe0d31af0bc5eab5cca21a2cb379e0c4f011c58fc73536c72ff0942ecaabac1c25db61c1c51f496405fa399426556
7
- data.tar.gz: 1cc772377f57523268cf6767e833869719e25e5ba30c64b870ddeceb2550a55ce619dac5fb1a06349066d36662dbd2cedad6b087f5f26ddbbf535c7d663b93e2
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 ActiveModel 3, 4 and 5"
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
 
@@ -1,5 +1,5 @@
1
1
  module Elasticsearch
2
2
  module Model
3
- VERSION = "5.0.2"
3
+ VERSION = "5.1.0"
4
4
  end
5
5
  end
@@ -1,9 +1,8 @@
1
1
  require 'test_helper'
2
+ MongoDB.setup!
2
3
 
3
- Mongo.setup!
4
-
5
- if Mongo.available?
6
- Mongo.connect_to 'mongoid_articles'
4
+ if MongoDB.available?
5
+ MongoDB.connect_to 'mongoid_articles'
7
6
 
8
7
  module Elasticsearch
9
8
  module Model
@@ -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
- Mongo.setup!
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 Mongo.available?
119
- Mongo.connect_to 'mongoid_collections'
118
+ if MongoDB.available?
119
+ MongoDB.connect_to 'mongoid_collections'
120
120
 
121
121
  context "Across mongoid models" do
122
122
  setup do
@@ -62,14 +62,13 @@ module Elasticsearch
62
62
  end
63
63
  end
64
64
 
65
- class Mongo
65
+ class MongoDB
66
66
  def self.setup!
67
67
  begin
68
68
  require 'mongoid'
69
- session = Moped::Connection.new("localhost", 27017, 0.5)
70
- session.connect
69
+ Mongo::Client.new(["localhost:27017"])
71
70
  ENV['MONGODB_AVAILABLE'] = 'yes'
72
- rescue LoadError, Moped::Errors::ConnectionFailure => e
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
- Moped.logger = logger unless ENV['QUIET']
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.2
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: 2017-12-04 00:00:00.000000000 Z
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.5.2
435
+ rubygems_version: 2.7.6
436
436
  signing_key:
437
437
  specification_version: 4
438
438
  summary: ActiveModel/Record integrations for Elasticsearch.