sunspot_offline 0.1.1 → 0.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95e239da7f8ca4ef06fd735cd14f021ffb02fb9651594c058d38f5c664a75a7e
|
4
|
+
data.tar.gz: 4312f70c4f47f41f03a3465789ee3bb0f5a9b2a76ddba4b6434f9a13547790d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b673ece048a15fa3374ea0cdde78548ee8dfb7bb1a96a9b2abadf9512956cbbe8e23d119d44a832a80336bf46a4ad153093c703d2b3d8e254aad948e69053e58
|
7
|
+
data.tar.gz: bd4c12927c0d77d408c1c84ddfb87b09258f4efca56840f2d5f491c5c7cec26caa9bdfbb0b6d04724b377240c4824cbb97f5d7d311c45cf5c9c16a5fab53e3ee
|
@@ -9,7 +9,7 @@ module SunspotOffline
|
|
9
9
|
klass = model_class.classify.constantize
|
10
10
|
if klass.searchable?
|
11
11
|
if scope.is_a?(Array)
|
12
|
-
scope.each_slice(1000) { |slice| Sunspot.index(klass.where(id: slice)) }
|
12
|
+
scope.each_slice(1000) { |slice| ::Sunspot.index(klass.where(id: slice)) }
|
13
13
|
elsif scope.is_a?(Hash)
|
14
14
|
klass.atomic_update(scope.with_indifferent_access)
|
15
15
|
else
|
@@ -7,9 +7,9 @@ module SunspotOffline
|
|
7
7
|
|
8
8
|
def perform(model_class, ids)
|
9
9
|
if ids.present?
|
10
|
-
Sunspot.remove_by_id(model_class, Array(ids))
|
10
|
+
::Sunspot.remove_by_id(model_class, Array(ids))
|
11
11
|
else
|
12
|
-
Sunspot.remove_all(model_class)
|
12
|
+
::Sunspot.remove_all(model_class)
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunspot_offline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Glukhov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|