composite_primary_keys 12.0.5 → 12.0.6

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
2
  SHA256:
3
- metadata.gz: b2a0ca9aa38fb1dfdca5c0974049eec9faf2c5703666a8e8de2ad28f6c78c7bc
4
- data.tar.gz: 6384ddd8291fbd65e074965bfb70b8945c4ac6b556537973cc62561a86a0c609
3
+ metadata.gz: ea522edb09ab0dfd60a25bb34aa7c31a50f1afc2260b54189338a694dce48c5b
4
+ data.tar.gz: 5aefc2529dbfe80f7453ad75e2d3043fb329dc8294ac80f56ef2ce60988d8d45
5
5
  SHA512:
6
- metadata.gz: 3c8a87f9676da79d514cd3dd2b21d7c1b523ddde1e13a2b37484e69ed4d93556e94fd725bc41642117338de66679932b69aff077c90c6c45d2026792439f4d5a
7
- data.tar.gz: 5e393c7b725a757bef1a5b99efb9ef62612e3d11b7aa8dec15399684221a6a75f1b34908434b1471a0bc86a67814e7e387905d6e92885f7dddefb521668a7f9b
6
+ metadata.gz: f482042e909cbd80341bb609387d41fe82236d82c9f26aa5742e0c4ce470eb873ced0b48a461ec3836b361e0075c9c831f75e2f69023787738e6cca0e5a34026
7
+ data.tar.gz: 649981635ecf30e0a94dfd811230395af0c0ab1111beec027fc9787d5185e57572f2b0677f8e4e88f01cf2cc784d1d0a2ccbd04ae30898ee2e860a9950a5e355
@@ -1,3 +1,6 @@
1
+ == 12.0.6 (2021-01-04)
2
+ * Fix issue when calling in_batches without a block (Charlie Savage)
3
+
1
4
  == 12.0.5 (2020-12-31)
2
5
  * Finally issue with SQLServer when tables are marked as exclude_output_inserted. See #535. (Charlie Savage)
3
6
 
@@ -4,7 +4,7 @@ module CompositePrimaryKeys
4
4
  def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil)
5
5
  relation = self
6
6
  unless block_given?
7
- return BatchEnumerator.new(of: of, start: start, finish: finish, relation: self)
7
+ return ::ActiveRecord::Batches::BatchEnumerator.new(of: of, start: start, finish: finish, relation: self)
8
8
  end
9
9
 
10
10
  if arel.orders.present?
@@ -2,7 +2,7 @@ module CompositePrimaryKeys
2
2
  module VERSION
3
3
  MAJOR = 12
4
4
  MINOR = 0
5
- TINY = 5
5
+ TINY = 6
6
6
  STRING = [MAJOR, MINOR, TINY].join('.')
7
7
  end
8
8
  end
@@ -103,6 +103,13 @@ class TestFind < ActiveSupport::TestCase
103
103
  end
104
104
  end
105
105
 
106
+ def test_in_batches_enumerator
107
+ enumerator = Department.in_batches
108
+ enumerator.each do |batch|
109
+ assert_equal(Department.count, batch.size)
110
+ end
111
+ end
112
+
106
113
  def test_in_batches_of_1
107
114
  num_found = 0
108
115
  Department.in_batches(of: 1) do |batch|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: composite_primary_keys
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.0.5
4
+ version: 12.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Savage
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-31 00:00:00.000000000 Z
11
+ date: 2021-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord