elastic_record 3.1.3 → 3.1.4
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 +4 -4
- data/.travis.yml +11 -6
- data/Gemfile +1 -1
- data/elastic_record.gemspec +1 -1
- data/lib/elastic_record/callbacks.rb +1 -1
- data/lib/elastic_record/connection.rb +4 -2
- data/lib/elastic_record/index/manage.rb +6 -2
- data/lib/elastic_record/json.rb +1 -1
- data/lib/elastic_record/relation/batches.rb +1 -1
- data/test/dummy/app/models/test_model.rb +4 -0
- data/test/dummy/config/application.rb +0 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c59b1b2830ef2314166e53fed56b060628e31962
|
4
|
+
data.tar.gz: c88b89a8a5335502aa4cf0bb8b46fb477dcb8f4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09c62833cc9bb4bc486b5b53d65ac1c0a2395129edd6fbe1f887a5e208e75a99e585d898b2c8e1661084268d48f1d6a836e92654dba5bb6de0cf812849f9d502'
|
7
|
+
data.tar.gz: 8948ebb21a69e0eaa17e51f2456a73f2d7cde27312cdb4d7c52c661742c4e8fbbfef7f8996d0d4e9e652e98f95ecfba0782e90bd2966ff2606a239b49426615c
|
data/.travis.yml
CHANGED
@@ -1,16 +1,21 @@
|
|
1
|
-
rvm:
|
1
|
+
rvm:
|
2
|
+
- 2.4.1
|
2
3
|
cache: bundler
|
4
|
+
# Not using Trusty containers because of:
|
5
|
+
# https://github.com/travis-ci/travis-ci/issues/6842
|
3
6
|
sudo: required
|
4
7
|
dist: trusty
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
-
|
9
|
-
|
8
|
+
addons:
|
9
|
+
apt:
|
10
|
+
sources:
|
11
|
+
- elasticsearch-2.x
|
12
|
+
packages:
|
13
|
+
- elasticsearch
|
10
14
|
before_script:
|
11
15
|
- cp test/dummy/.env.example test/dummy/.env
|
12
16
|
- curl localhost:9200
|
13
17
|
- bundle exec rake app:db:setup
|
14
18
|
- bundle exec rake app:index:reset
|
15
19
|
services:
|
20
|
+
- elasticsearch
|
16
21
|
- postgresql
|
data/Gemfile
CHANGED
data/elastic_record.gemspec
CHANGED
@@ -103,9 +103,11 @@ module ElasticRecord
|
|
103
103
|
self.request_count = 0
|
104
104
|
end
|
105
105
|
|
106
|
-
|
106
|
+
server = current_server.start_with?('http') ? current_server : "http://#{current_server}"
|
107
|
+
uri = URI(server)
|
107
108
|
|
108
|
-
http = Net::HTTP.new(host, port)
|
109
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
110
|
+
http.use_ssl = uri.scheme == 'https'
|
109
111
|
if options[:timeout]
|
110
112
|
http.read_timeout = options[:timeout].to_i
|
111
113
|
end
|
@@ -8,8 +8,12 @@ module ElasticRecord
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def create(index_name = new_index_name)
|
11
|
-
connection.json_put "/#{index_name}",
|
12
|
-
|
11
|
+
connection.json_put "/#{index_name}", {
|
12
|
+
"mappings" => {
|
13
|
+
type => mapping
|
14
|
+
},
|
15
|
+
"settings" => settings
|
16
|
+
}
|
13
17
|
index_name
|
14
18
|
end
|
15
19
|
|
data/lib/elastic_record/json.rb
CHANGED
@@ -18,9 +18,6 @@ module Dummy
|
|
18
18
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
19
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
20
|
# config.i18n.default_locale = :de
|
21
|
-
|
22
|
-
# Do not swallow errors in after_commit/after_rollback callbacks.
|
23
|
-
config.active_record.raise_in_transactional_callbacks = true
|
24
21
|
end
|
25
22
|
end
|
26
23
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Infogroup
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-07-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: arelastic
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
version: 1.8.11
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.
|
189
|
+
rubygems_version: 2.6.11
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: An Elasticsearch querying ORM
|