after_commit_everywhere 1.4.0 → 1.5.0

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: 749225d1d1a6000f08b986f6c2704767339fc576648811f4421fb7344b864761
4
- data.tar.gz: af075362eeaa19f6e893d5fcefadd751f8cf7817bd310ddea0a024e49482100e
3
+ metadata.gz: c801e905947621b60d9409be76cfb81d5d8b33f9c875cb120b143a91b4f87736
4
+ data.tar.gz: 90b6d70641c070a3866ab70929c41b9729b8693878a3bdba203a690eef6312a5
5
5
  SHA512:
6
- metadata.gz: c816318efea508b86763b07f69b6164eab40edb52f5c95953e05c6dd7df1b2432b1a933e0bfa68605b7b67c3e99dbee6a3e7c4c30389214c7ed9bab5d6afa704
7
- data.tar.gz: 4b20e061dfbd60ca6caef4da43ba1866c92a4c3be3418016da1f1f768f01321c99d19f024020d48139dd4320b0c0d21854554e15ee67bf0e9a6a1f3b072e21ad
6
+ metadata.gz: 3ce2d472754e15c17b4c52795c1a9f7a98b0021ab2ffc0c7d5120fd7ff0a2f24c83d0e1177c35ff30c517a6501219716b5ef1c49c1ff386b947561a092ab674c
7
+ data.tar.gz: a4e4ee45d289bba022eef8f3da4b08fa2da1f23f4643197a1338bfd734da9f7d3b1e55f8ec87d8183ba448022af957238f848baef5d66383ace9d55fa739dd76
data/CHANGELOG.md CHANGED
@@ -4,18 +4,26 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 1.5.0 (2024-12-09)
8
+
9
+ ### Added
10
+
11
+ - Ability to propagate exception for multiple `after_commit` callbacks within transaction. Should handle exception inside callback to avoid stopping other callbacks.
12
+
13
+ [Pull request #35](https://github.com/Envek/after_commit_everywhere/pull/35) by [@kevink1103](). Also see discussion at [#34](https://github.com/Envek/after_commit_everywhere/issues/34).
14
+
7
15
  ## 1.4.0 (2024-02-07)
8
16
 
9
17
  ### Added
10
18
 
11
- - Ability to prepend callbacks to the head of callback queue using `prepend: true` option.
19
+ - Ability to prepend callbacks to the head of callback queue using `prepend: true` option.
12
20
 
13
- ```ruby
14
- AfterCommitEverywhere.after_commit { puts "I'm second!" }
15
- AfterCommitEverywhere.after_commit(prepend: true) { puts "I'm first!" }
16
- ```
21
+ ```ruby
22
+ AfterCommitEverywhere.after_commit { puts "I'm second!" }
23
+ AfterCommitEverywhere.after_commit(prepend: true) { puts "I'm first!" }
24
+ ```
17
25
 
18
- See [Pull request #30](https://github.com/Envek/after_commit_everywhere/pull/30) by [@quentindemetz][] and [@A1090][].
26
+ See [Pull request #30](https://github.com/Envek/after_commit_everywhere/pull/30) by [@quentindemetz][] and [@A1090][].
19
27
 
20
28
  ## 1.3.1 (2023-06-21)
21
29
 
@@ -147,3 +155,4 @@ See [#11](https://github.com/Envek/after_commit_everywhere/issues/11) for discus
147
155
  [@jpcamara]: https://github.com/jpcamara "JP Camara"
148
156
  [@quentindemetz]: https://github.com/quentindemetz "Quentin de Metz"
149
157
  [@A1090]: https://github.com/A1090 "Tabac Andreina"
158
+ [@kevink1103]: https://github.com/kevink1103 "Kevin (bum)"
@@ -28,6 +28,11 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ["lib"]
30
30
 
31
+ spec.metadata["homepage_uri"] = spec.homepage
32
+ spec.metadata["source_code_uri"] = spec.homepage
33
+ spec.metadata["changelog_uri"] = "https://github.com/Envek/after_commit_everywhere/blob/master/CHANGELOG.md"
34
+ spec.metadata["bug_tracker_uri"] = "https://github.com/Envek/after_commit_everywhere/issues"
35
+
31
36
  spec.add_dependency "activerecord", ">= 4.2"
32
37
  spec.add_dependency "activesupport"
33
38
  spec.add_development_dependency "appraisal"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AfterCommitEverywhere
4
- VERSION = "1.4.0"
4
+ VERSION = "1.5.0"
5
5
  end
@@ -23,8 +23,10 @@ module AfterCommitEverywhere
23
23
  true
24
24
  end
25
25
 
26
- def committed!(*)
27
- @handlers[:after_commit]&.call
26
+ def committed!(should_run_callbacks: true)
27
+ if should_run_callbacks
28
+ @handlers[:after_commit]&.call
29
+ end
28
30
  end
29
31
 
30
32
  def rolledback!(*)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: after_commit_everywhere
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Novikov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-07 00:00:00.000000000 Z
11
+ date: 2024-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -230,7 +230,11 @@ files:
230
230
  homepage: https://github.com/Envek/after_commit_everywhere
231
231
  licenses:
232
232
  - MIT
233
- metadata: {}
233
+ metadata:
234
+ homepage_uri: https://github.com/Envek/after_commit_everywhere
235
+ source_code_uri: https://github.com/Envek/after_commit_everywhere
236
+ changelog_uri: https://github.com/Envek/after_commit_everywhere/blob/master/CHANGELOG.md
237
+ bug_tracker_uri: https://github.com/Envek/after_commit_everywhere/issues
234
238
  post_install_message:
235
239
  rdoc_options: []
236
240
  require_paths:
@@ -246,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
246
250
  - !ruby/object:Gem::Version
247
251
  version: '0'
248
252
  requirements: []
249
- rubygems_version: 3.5.3
253
+ rubygems_version: 3.5.22
250
254
  signing_key:
251
255
  specification_version: 4
252
256
  summary: Executes code after database commit wherever you want in your application