pluck_each 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 +4 -4
- data/lib/pluck_each.rb +7 -1
- data/lib/pluck_each/version.rb +1 -1
- 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: 590090a4b024b581987c5189c8d33f7705fe9deb
|
4
|
+
data.tar.gz: b7902f329e25ff1a5590fdd5dcd8f757a441113f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1686ceb57958906c293d0330f248bea630d921cc913bc7eeb2a3d508386b5421f27e52ebaee8f7524d73a944fa8d2cf952ac41b628ef4340966e33744843fd3c
|
7
|
+
data.tar.gz: f55c93814f73276331c515794f6863bc2634dee3558fc43b73f8e5191f6adb85d0a3a451b2dd31b3d434d216ceabb9a99f1c763da8d9f9bdf2128ab2a743fc23
|
data/lib/pluck_each.rb
CHANGED
@@ -52,7 +52,13 @@ module ActiveRecord
|
|
52
52
|
yield batch
|
53
53
|
|
54
54
|
break if batch.size < batch_size
|
55
|
-
|
55
|
+
|
56
|
+
# some relations don't have arel_attribute, need to figure that out
|
57
|
+
if respond_to?(:arel_attribute)
|
58
|
+
batch_relation = relation.where(arel_attribute(primary_key).gt(primary_key_offset))
|
59
|
+
else
|
60
|
+
batch_relation = relation.where("#{primary_key} > ?", primary_key_offset)
|
61
|
+
end
|
56
62
|
end
|
57
63
|
end
|
58
64
|
end
|
data/lib/pluck_each/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pluck_each
|
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
|
- Brandon Dewitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
version: '0'
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.
|
149
|
+
rubygems_version: 2.2.2
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: pluck_each and plucK_in_batches ... should behave like find_each and find_in_batches
|