iknow_view_models 3.9.1 → 3.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +3 -1
- data/gemfiles/rails_7_1.gemfile +10 -0
- data/lib/iknow_view_models/version.rb +1 -1
- data/lib/view_model/after_transaction_runner.rb +17 -0
- data/nix/dependencies.nix +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13912eaa6913049d8b8a5ac98d135d25f23abbfedf3046ba9c1a12ee92bae45d
|
4
|
+
data.tar.gz: 9d8c5abafd90bac5cfa955aa152b89d03cd0657f3923edb5e7ef5e534cd5e4a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3072dd149b35d236ca79f0a2a22232bf30274a05a141ce77f74358a1c2ac9b72f7c877879bbff1508c71fae477d0ebdff4daf2c35347bf71e07cc3811e4227c2
|
7
|
+
data.tar.gz: d42c834cf4e569b8685a9e787fc9ea01de1bc656f5f5cfd6255228806556823368f2685913414b68c84d23474b19d33329803d89c47525c91194f1b2a88d2b26
|
data/.github/workflows/test.yml
CHANGED
@@ -26,7 +26,7 @@ jobs:
|
|
26
26
|
strategy:
|
27
27
|
fail-fast: false
|
28
28
|
matrix:
|
29
|
-
ruby-version: ['2.7', '3.0', '3.1', '3.2']
|
29
|
+
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3']
|
30
30
|
include:
|
31
31
|
- ruby-version: '2.7'
|
32
32
|
bundle-gemfile: gemfiles/rails_5_2.gemfile
|
@@ -36,6 +36,8 @@ jobs:
|
|
36
36
|
bundle-gemfile: gemfiles/rails_6_1.gemfile
|
37
37
|
- ruby-version: '3.2'
|
38
38
|
bundle-gemfile: gemfiles/rails_7_0.gemfile
|
39
|
+
- ruby-version: '3.3'
|
40
|
+
bundle-gemfile: gemfiles/rails_7_1.gemfile
|
39
41
|
|
40
42
|
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
41
43
|
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.bundle-gemfile }}
|
@@ -4,6 +4,23 @@
|
|
4
4
|
# `add_to_transaction`, the abstract method `after_transaction` will be invoked
|
5
5
|
# by AR's callbacks.
|
6
6
|
module ViewModel::AfterTransactionRunner
|
7
|
+
extend ActiveSupport::Concern
|
8
|
+
|
9
|
+
class_methods do
|
10
|
+
# Rails 7.1+ expects after transaction hooks to declare whether to run the
|
11
|
+
# hook on the first equivalent instance to be enqueued or the last one. For
|
12
|
+
# ActiveRecord models, this class method is defined on ActiveRecord::Core
|
13
|
+
# and delegates to Rails configuration. For us, we don't expect multiple
|
14
|
+
# equivalent AfterTransactionRunners for the same callback, and opting into
|
15
|
+
# the new behaviour would require implementing more of the ActiveRecord
|
16
|
+
# model interface here such as #destroyed?, so we'll lock in the older
|
17
|
+
# behavior that doesn't require so many inapplicable heuristics to identify
|
18
|
+
# the last valid callback.
|
19
|
+
def run_commit_callbacks_on_first_saved_instances_in_transaction
|
20
|
+
true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
7
24
|
# Rails' internal API
|
8
25
|
def committed!(*)
|
9
26
|
after_commit
|
data/nix/dependencies.nix
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iknow_view_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.9.
|
4
|
+
version: 3.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iKnow Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -396,6 +396,7 @@ files:
|
|
396
396
|
- gemfiles/rails_6_0.gemfile
|
397
397
|
- gemfiles/rails_6_1.gemfile
|
398
398
|
- gemfiles/rails_7_0.gemfile
|
399
|
+
- gemfiles/rails_7_1.gemfile
|
399
400
|
- iknow_view_models.gemspec
|
400
401
|
- lib/iknow_view_models.rb
|
401
402
|
- lib/iknow_view_models/railtie.rb
|