activerecord_bulkoperation 0.0.2 → 0.0.3

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
- SHA256:
3
- metadata.gz: f75f024004e8d891bd6c3723026f673dca6cf2085726f98971477ab65016516a
4
- data.tar.gz: 629f7ed52ea5a51855766b0151bcfc3a77aed7239d6981a9a10b63f4c7f0ada6
2
+ SHA1:
3
+ metadata.gz: 16b6f4dcc796822bf9f70be61cee8aef893a8d5b
4
+ data.tar.gz: 630df700c5c08a83135f2a09259fd72727f67ad0
5
5
  SHA512:
6
- metadata.gz: d652595ee6fc44e055e52e3a53761388d07de4c05832344b993e1674e55574c795dc12c2805f5ea045191cd5d899e3072960d8e17aeae67d15dd4cb9c30eab52
7
- data.tar.gz: b47a322b80820779c0b62c527ab572e0ede06c7a6c36a5ca195cc1b9ab22226a57b9d298639c738ce2e3ea0e21066e02def2d57b15d1c766fabacd65738e9055
6
+ metadata.gz: bd8cfc6f348ad5ef658a7fd9c776c88d8601cd9ad1833e50b82058ccbb41b68759f866dd1c14905714b3dbecebeacbccd0c1da354afcfbbbb0a6b39478a7a68d
7
+ data.tar.gz: f99d1aba3e113a7100c502176322af7a8899060628024976c9fc9f1733cb72b38064a851dbe9a19d06bf03211394094161e417485bed5e826c53ddac368f713d
@@ -11,23 +11,31 @@ module ActiveRecord
11
11
  alias_method :create_savepoint_without_callback, :create_savepoint
12
12
 
13
13
  def commit_db_transaction
14
- connection_listeners.each { |l| l.before_commit if l.respond_to?('before_commit') }
14
+ # AKu a copy of the listener array is required, because the listener can remove can modify the array
15
+ connection_listeners.select{|l| l.respond_to?('before_commit') }.each{|l| l.before_commit}
16
+
15
17
  commit_db_transaction_without_callback
16
- connection_listeners.each { |l| l.after_commit if l.respond_to?('after_commit') }
18
+
19
+ # AKu a copy of the listener array is required, because the listener can remove can modify the array
20
+ connection_listeners.select{|l| l.respond_to?('after_commit') }.each{|l| l.after_commit}
21
+
17
22
  end
18
23
 
19
24
  def rollback_db_transaction
20
25
  rollback_db_transaction_without_callback
21
- connection_listeners.each { |l| l.after_rollback if l.respond_to?('after_rollback') }
26
+ # AKu a copy of the listener array is required, because the listener can remove can modify the array
27
+ connection_listeners.select{|l| l.respond_to?('after_rollback') }.each{|l| l.after_rollback}
22
28
  end
23
29
 
24
30
  def rollback_to_savepoint(name = current_savepoint_name)
25
31
  rollback_to_savepoint_without_callback(name)
26
- connection_listeners.each { |l| l.after_rollback_to_savepoint if l.respond_to?('after_rollback_to_savepoint') }
32
+ # AKu a copy of the listener array is required, because the listener can remove can modify the array
33
+ connection_listeners.select{|l| l.respond_to?('after_rollback_to_savepoint') }.each{|l| l.after_rollback_to_savepoint}
27
34
  end
28
35
 
29
36
  def create_savepoint(name = current_savepoint_name)
30
- connection_listeners.each { |l| l.before_create_savepoint if l.respond_to?('before_create_savepoint') }
37
+ # AKu a copy of the listener array is required, because the listener can remove can modify the array
38
+ connection_listeners.select{|l| l.respond_to?('before_create_savepoint') }.each{|l| l.before_create_savepoint}
31
39
  create_savepoint_without_callback(name)
32
40
  end
33
41
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Bulkoperation
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_bulkoperation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - OSP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-23 00:00:00.000000000 Z
11
+ date: 2019-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  requirements: []
114
114
  rubyforge_project:
115
- rubygems_version: 2.7.7
115
+ rubygems_version: 2.6.1
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: ''