after_commit_everywhere 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.rubocop.yml +12 -1
- data/.travis.yml +8 -13
- data/Appraisals +1 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +209 -0
- data/after_commit_everywhere.gemspec +3 -3
- data/gemfiles/activerecord_master.gemfile +1 -0
- data/lib/after_commit_everywhere.rb +4 -4
- data/lib/after_commit_everywhere/version.rb +1 -1
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f7dffbee6c4b998b64035990acfa7f7ccd7dcfc835f381ca89b91a5f029b492
|
4
|
+
data.tar.gz: fb2e0b10ac621c60ae287eabaf7d22535c99aa050f8bd9d46c49a1fbeb72b259
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 893f9cbc92941e7b74bf10f2b4069f117dd75dbc3c8dcfdaffb617d1effcd65cbd770a9787de81ef8b3bab885b673f7d706eddad559c3333305525a58413010b
|
7
|
+
data.tar.gz: 3c99ffe5725cfe99ce564af504a70614a97f8ba1007b73ae3b130ff49ece0d9fc323ebdbb34369def92e42fed8c0b9a1467362e029d23207716edef1c3907ccf
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -2,6 +2,8 @@ AllCops:
|
|
2
2
|
TargetRubyVersion: 2.3
|
3
3
|
UseCache: false
|
4
4
|
DisplayCopNames: true
|
5
|
+
Exclude:
|
6
|
+
- "gemfiles/*"
|
5
7
|
|
6
8
|
Metrics/LineLength:
|
7
9
|
Max: 100
|
@@ -24,7 +26,7 @@ Metrics/BlockLength:
|
|
24
26
|
- "spec/**/*.*"
|
25
27
|
- "*.gemspec"
|
26
28
|
|
27
|
-
Lint/
|
29
|
+
Lint/SuppressedException:
|
28
30
|
Exclude:
|
29
31
|
- "spec/**/*.*"
|
30
32
|
|
@@ -48,3 +50,12 @@ Style/TrailingCommaInHashLiteral:
|
|
48
50
|
|
49
51
|
Style/StringLiterals:
|
50
52
|
EnforcedStyle: double_quotes
|
53
|
+
|
54
|
+
Style/HashEachMethods:
|
55
|
+
Enabled: true
|
56
|
+
|
57
|
+
Style/HashTransformKeys:
|
58
|
+
Enabled: true
|
59
|
+
|
60
|
+
Style/HashTransformValues:
|
61
|
+
Enabled: true
|
data/.travis.yml
CHANGED
@@ -11,24 +11,19 @@ addons:
|
|
11
11
|
|
12
12
|
matrix:
|
13
13
|
include:
|
14
|
-
- rvm: 2.
|
14
|
+
- rvm: 2.3.8
|
15
15
|
gemfile: gemfiles/activerecord_4_2.gemfile
|
16
|
-
- rvm: 2.
|
16
|
+
- rvm: 2.4.9
|
17
17
|
gemfile: gemfiles/activerecord_5_0.gemfile
|
18
|
-
- rvm: 2.5.
|
18
|
+
- rvm: 2.5.7
|
19
19
|
gemfile: gemfiles/activerecord_5_1.gemfile
|
20
|
-
- rvm: 2.
|
21
|
-
gemfile: gemfiles/activerecord_5_2.gemfile
|
22
|
-
- rvm: 2.3.8
|
23
|
-
gemfile: gemfiles/activerecord_5_2.gemfile
|
24
|
-
- rvm: 2.5.3
|
25
|
-
gemfile: gemfiles/activerecord_5_2.gemfile
|
26
|
-
- rvm: 2.6.1
|
20
|
+
- rvm: 2.6.5
|
27
21
|
gemfile: gemfiles/activerecord_5_2.gemfile
|
28
|
-
- rvm: 2.
|
22
|
+
- rvm: 2.7.0
|
23
|
+
gemfile: gemfiles/activerecord_6_0.gemfile
|
24
|
+
- rvm: 2.7.0
|
29
25
|
gemfile: gemfiles/activerecord_master.gemfile
|
30
26
|
|
31
|
-
# https://github.com/travis-ci/travis-ci/issues/8969#issuecomment-380028168
|
32
27
|
before_install:
|
33
28
|
- gem update --system
|
34
|
-
- gem install bundler -v "~>
|
29
|
+
- gem install bundler -v "~> 2.0"
|
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## 0.1.5 (2020-03-22)
|
10
|
+
|
11
|
+
### Fixed
|
12
|
+
|
13
|
+
- [PR [#8](https://github.com/Envek/after_commit_everywhere/pull/8)] Callback registration when callback methods are aliased. ([@stokarenko])
|
14
|
+
|
9
15
|
## 0.1.4 (2019-09-10)
|
10
16
|
|
11
17
|
- [PR [#6](https://github.com/Envek/after_commit_everywhere/pull/6)] ActiveRecord 6.0 compatibility. ([@joevandyk])
|
@@ -29,3 +35,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
29
35
|
[@Envek]: https://github.com/Envek "Andrey Novikov"
|
30
36
|
[@arjun810]: https://github.com/arjun810 "Arjun Singh"
|
31
37
|
[@joevandyk]: https://github.com/joevandyk "Joe Van Dyk"
|
38
|
+
[@stokarenko]: https://github.com/stokarenko "Sergey Tokarenko"
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,209 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
after_commit_everywhere (0.1.4)
|
5
|
+
activerecord (>= 4.2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actioncable (6.0.2.2)
|
11
|
+
actionpack (= 6.0.2.2)
|
12
|
+
nio4r (~> 2.0)
|
13
|
+
websocket-driver (>= 0.6.1)
|
14
|
+
actionmailbox (6.0.2.2)
|
15
|
+
actionpack (= 6.0.2.2)
|
16
|
+
activejob (= 6.0.2.2)
|
17
|
+
activerecord (= 6.0.2.2)
|
18
|
+
activestorage (= 6.0.2.2)
|
19
|
+
activesupport (= 6.0.2.2)
|
20
|
+
mail (>= 2.7.1)
|
21
|
+
actionmailer (6.0.2.2)
|
22
|
+
actionpack (= 6.0.2.2)
|
23
|
+
actionview (= 6.0.2.2)
|
24
|
+
activejob (= 6.0.2.2)
|
25
|
+
mail (~> 2.5, >= 2.5.4)
|
26
|
+
rails-dom-testing (~> 2.0)
|
27
|
+
actionpack (6.0.2.2)
|
28
|
+
actionview (= 6.0.2.2)
|
29
|
+
activesupport (= 6.0.2.2)
|
30
|
+
rack (~> 2.0, >= 2.0.8)
|
31
|
+
rack-test (>= 0.6.3)
|
32
|
+
rails-dom-testing (~> 2.0)
|
33
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
34
|
+
actiontext (6.0.2.2)
|
35
|
+
actionpack (= 6.0.2.2)
|
36
|
+
activerecord (= 6.0.2.2)
|
37
|
+
activestorage (= 6.0.2.2)
|
38
|
+
activesupport (= 6.0.2.2)
|
39
|
+
nokogiri (>= 1.8.5)
|
40
|
+
actionview (6.0.2.2)
|
41
|
+
activesupport (= 6.0.2.2)
|
42
|
+
builder (~> 3.1)
|
43
|
+
erubi (~> 1.4)
|
44
|
+
rails-dom-testing (~> 2.0)
|
45
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
46
|
+
active_attr (0.15.0)
|
47
|
+
actionpack (>= 3.0.2, < 6.1)
|
48
|
+
activemodel (>= 3.0.2, < 6.1)
|
49
|
+
activesupport (>= 3.0.2, < 6.1)
|
50
|
+
activejob (6.0.2.2)
|
51
|
+
activesupport (= 6.0.2.2)
|
52
|
+
globalid (>= 0.3.6)
|
53
|
+
activemodel (6.0.2.2)
|
54
|
+
activesupport (= 6.0.2.2)
|
55
|
+
activerecord (6.0.2.2)
|
56
|
+
activemodel (= 6.0.2.2)
|
57
|
+
activesupport (= 6.0.2.2)
|
58
|
+
activestorage (6.0.2.2)
|
59
|
+
actionpack (= 6.0.2.2)
|
60
|
+
activejob (= 6.0.2.2)
|
61
|
+
activerecord (= 6.0.2.2)
|
62
|
+
marcel (~> 0.3.1)
|
63
|
+
activesupport (6.0.2.2)
|
64
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
65
|
+
i18n (>= 0.7, < 2)
|
66
|
+
minitest (~> 5.1)
|
67
|
+
tzinfo (~> 1.1)
|
68
|
+
zeitwerk (~> 2.2)
|
69
|
+
anyway_config (1.4.4)
|
70
|
+
appraisal (2.2.0)
|
71
|
+
bundler
|
72
|
+
rake
|
73
|
+
thor (>= 0.14.0)
|
74
|
+
ast (2.4.0)
|
75
|
+
builder (3.2.4)
|
76
|
+
coderay (1.1.2)
|
77
|
+
concurrent-ruby (1.1.6)
|
78
|
+
crass (1.0.6)
|
79
|
+
diff-lcs (1.3)
|
80
|
+
erubi (1.9.0)
|
81
|
+
globalid (0.4.2)
|
82
|
+
activesupport (>= 4.2.0)
|
83
|
+
i18n (1.8.2)
|
84
|
+
concurrent-ruby (~> 1.0)
|
85
|
+
isolator (0.6.2)
|
86
|
+
sniffer (>= 0.3.1)
|
87
|
+
jaro_winkler (1.5.4)
|
88
|
+
loofah (2.4.0)
|
89
|
+
crass (~> 1.0.2)
|
90
|
+
nokogiri (>= 1.5.9)
|
91
|
+
mail (2.7.1)
|
92
|
+
mini_mime (>= 0.1.1)
|
93
|
+
marcel (0.3.3)
|
94
|
+
mimemagic (~> 0.3.2)
|
95
|
+
method_source (1.0.0)
|
96
|
+
mimemagic (0.3.4)
|
97
|
+
mini_mime (1.0.2)
|
98
|
+
mini_portile2 (2.4.0)
|
99
|
+
minitest (5.14.0)
|
100
|
+
nio4r (2.5.2)
|
101
|
+
nokogiri (1.10.9)
|
102
|
+
mini_portile2 (~> 2.4.0)
|
103
|
+
parallel (1.19.1)
|
104
|
+
parser (2.7.0.5)
|
105
|
+
ast (~> 2.4.0)
|
106
|
+
pry (0.13.0)
|
107
|
+
coderay (~> 1.1)
|
108
|
+
method_source (~> 1.0)
|
109
|
+
rack (2.2.2)
|
110
|
+
rack-test (1.1.0)
|
111
|
+
rack (>= 1.0, < 3)
|
112
|
+
rails (6.0.2.2)
|
113
|
+
actioncable (= 6.0.2.2)
|
114
|
+
actionmailbox (= 6.0.2.2)
|
115
|
+
actionmailer (= 6.0.2.2)
|
116
|
+
actionpack (= 6.0.2.2)
|
117
|
+
actiontext (= 6.0.2.2)
|
118
|
+
actionview (= 6.0.2.2)
|
119
|
+
activejob (= 6.0.2.2)
|
120
|
+
activemodel (= 6.0.2.2)
|
121
|
+
activerecord (= 6.0.2.2)
|
122
|
+
activestorage (= 6.0.2.2)
|
123
|
+
activesupport (= 6.0.2.2)
|
124
|
+
bundler (>= 1.3.0)
|
125
|
+
railties (= 6.0.2.2)
|
126
|
+
sprockets-rails (>= 2.0.0)
|
127
|
+
rails-dom-testing (2.0.3)
|
128
|
+
activesupport (>= 4.2.0)
|
129
|
+
nokogiri (>= 1.6)
|
130
|
+
rails-html-sanitizer (1.3.0)
|
131
|
+
loofah (~> 2.3)
|
132
|
+
railties (6.0.2.2)
|
133
|
+
actionpack (= 6.0.2.2)
|
134
|
+
activesupport (= 6.0.2.2)
|
135
|
+
method_source
|
136
|
+
rake (>= 0.8.7)
|
137
|
+
thor (>= 0.20.3, < 2.0)
|
138
|
+
rainbow (3.0.0)
|
139
|
+
rake (13.0.1)
|
140
|
+
rexml (3.2.4)
|
141
|
+
rspec (3.9.0)
|
142
|
+
rspec-core (~> 3.9.0)
|
143
|
+
rspec-expectations (~> 3.9.0)
|
144
|
+
rspec-mocks (~> 3.9.0)
|
145
|
+
rspec-core (3.9.1)
|
146
|
+
rspec-support (~> 3.9.1)
|
147
|
+
rspec-expectations (3.9.1)
|
148
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
149
|
+
rspec-support (~> 3.9.0)
|
150
|
+
rspec-mocks (3.9.1)
|
151
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
152
|
+
rspec-support (~> 3.9.0)
|
153
|
+
rspec-rails (3.9.1)
|
154
|
+
actionpack (>= 3.0)
|
155
|
+
activesupport (>= 3.0)
|
156
|
+
railties (>= 3.0)
|
157
|
+
rspec-core (~> 3.9.0)
|
158
|
+
rspec-expectations (~> 3.9.0)
|
159
|
+
rspec-mocks (~> 3.9.0)
|
160
|
+
rspec-support (~> 3.9.0)
|
161
|
+
rspec-support (3.9.2)
|
162
|
+
rubocop (0.80.1)
|
163
|
+
jaro_winkler (~> 1.5.1)
|
164
|
+
parallel (~> 1.10)
|
165
|
+
parser (>= 2.7.0.1)
|
166
|
+
rainbow (>= 2.2.2, < 4.0)
|
167
|
+
rexml
|
168
|
+
ruby-progressbar (~> 1.7)
|
169
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
170
|
+
ruby-progressbar (1.10.1)
|
171
|
+
sniffer (0.4.0)
|
172
|
+
active_attr (>= 0.10.2)
|
173
|
+
anyway_config (>= 1.0)
|
174
|
+
sprockets (4.0.0)
|
175
|
+
concurrent-ruby (~> 1.0)
|
176
|
+
rack (> 1, < 3)
|
177
|
+
sprockets-rails (3.2.1)
|
178
|
+
actionpack (>= 4.0)
|
179
|
+
activesupport (>= 4.0)
|
180
|
+
sprockets (>= 3.0.0)
|
181
|
+
sqlite3 (1.4.2)
|
182
|
+
thor (1.0.1)
|
183
|
+
thread_safe (0.3.6)
|
184
|
+
tzinfo (1.2.6)
|
185
|
+
thread_safe (~> 0.1)
|
186
|
+
unicode-display_width (1.6.1)
|
187
|
+
websocket-driver (0.7.1)
|
188
|
+
websocket-extensions (>= 0.1.0)
|
189
|
+
websocket-extensions (0.1.4)
|
190
|
+
zeitwerk (2.3.0)
|
191
|
+
|
192
|
+
PLATFORMS
|
193
|
+
ruby
|
194
|
+
|
195
|
+
DEPENDENCIES
|
196
|
+
after_commit_everywhere!
|
197
|
+
appraisal
|
198
|
+
bundler (~> 2.0)
|
199
|
+
isolator
|
200
|
+
pry
|
201
|
+
rails
|
202
|
+
rake (~> 13.0)
|
203
|
+
rspec (~> 3.0)
|
204
|
+
rspec-rails
|
205
|
+
rubocop (~> 0.80)
|
206
|
+
sqlite3 (~> 1.3, >= 1.3.6)
|
207
|
+
|
208
|
+
BUNDLED WITH
|
209
|
+
2.1.4
|
@@ -30,13 +30,13 @@ Gem::Specification.new do |spec|
|
|
30
30
|
|
31
31
|
spec.add_dependency "activerecord", ">= 4.2"
|
32
32
|
spec.add_development_dependency "appraisal"
|
33
|
-
spec.add_development_dependency "bundler", "
|
33
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
34
34
|
spec.add_development_dependency "isolator"
|
35
35
|
spec.add_development_dependency "pry"
|
36
36
|
spec.add_development_dependency "rails"
|
37
|
-
spec.add_development_dependency "rake", "~>
|
37
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
38
38
|
spec.add_development_dependency "rspec", "~> 3.0"
|
39
39
|
spec.add_development_dependency "rspec-rails"
|
40
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
40
|
+
spec.add_development_dependency "rubocop", "~> 0.80"
|
41
41
|
spec.add_development_dependency "sqlite3", "~> 1.3", ">= 1.3.6"
|
42
42
|
end
|
@@ -23,7 +23,7 @@ module AfterCommitEverywhere
|
|
23
23
|
def after_commit(connection: ActiveRecord::Base.connection, &callback)
|
24
24
|
AfterCommitEverywhere.register_callback(
|
25
25
|
connection: connection,
|
26
|
-
name:
|
26
|
+
name: __method__,
|
27
27
|
callback: callback,
|
28
28
|
no_tx_action: :execute,
|
29
29
|
)
|
@@ -40,12 +40,12 @@ module AfterCommitEverywhere
|
|
40
40
|
# @return void
|
41
41
|
def before_commit(connection: ActiveRecord::Base.connection, &callback)
|
42
42
|
if ActiveRecord::VERSION::MAJOR < 5
|
43
|
-
raise NotImplementedError, "#{
|
43
|
+
raise NotImplementedError, "#{__method__} works only with Rails 5.0+"
|
44
44
|
end
|
45
45
|
|
46
46
|
AfterCommitEverywhere.register_callback(
|
47
47
|
connection: connection,
|
48
|
-
name:
|
48
|
+
name: __method__,
|
49
49
|
callback: callback,
|
50
50
|
no_tx_action: :warn_and_execute,
|
51
51
|
)
|
@@ -64,7 +64,7 @@ module AfterCommitEverywhere
|
|
64
64
|
def after_rollback(connection: ActiveRecord::Base.connection, &callback)
|
65
65
|
AfterCommitEverywhere.register_callback(
|
66
66
|
connection: connection,
|
67
|
-
name:
|
67
|
+
name: __method__,
|
68
68
|
callback: callback,
|
69
69
|
no_tx_action: :exception,
|
70
70
|
)
|
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: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Novikov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: isolator
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '13.0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '13.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0.
|
145
|
+
version: '0.80'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0.
|
152
|
+
version: '0.80'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: sqlite3
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,6 +185,7 @@ files:
|
|
185
185
|
- Appraisals
|
186
186
|
- CHANGELOG.md
|
187
187
|
- Gemfile
|
188
|
+
- Gemfile.lock
|
188
189
|
- LICENSE.txt
|
189
190
|
- README.md
|
190
191
|
- Rakefile
|
@@ -221,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
222
|
- !ruby/object:Gem::Version
|
222
223
|
version: '0'
|
223
224
|
requirements: []
|
224
|
-
rubygems_version: 3.
|
225
|
+
rubygems_version: 3.1.2
|
225
226
|
signing_key:
|
226
227
|
specification_version: 4
|
227
228
|
summary: Executes code after database commit wherever you want in your application
|