activerecord-transactionable 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CONTRIBUTING.md +40 -19
- data/{LICENSE → LICENSE.txt} +1 -1
- data/README.md +158 -109
- data/SECURITY.md +9 -7
- data/lib/activerecord/transactionable/result.rb +1 -1
- data/lib/activerecord/transactionable/version.rb +3 -1
- data/lib/activerecord/transactionable.rb +93 -35
- data.tar.gz.sig +0 -0
- metadata +102 -118
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e51681be44857d8712382ad19341412547a6c5ed576389c30fdd3b9972ef6570
|
4
|
+
data.tar.gz: 33923a34222e74d7e1a727f9ef254c4f3f39645d1861bb5ad3ef92df24d046a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7887778fc6e41dc4c8fa912fc5905973c80e0878dbc0ba1418da7e9ecd4ee5d485e9b50b67101a93199a30ee9f555d7aca13cd6d8443e5ab924f5cc6b7750df
|
7
|
+
data.tar.gz: 983f1379a536d71f34eeaab8a31be4aa3bcd746051332ae890efe2b8465d3129f9fa8de2c38e61e531180ce9818338f0eb64998435cc561f7a0eedeaef1c6f33
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data/CONTRIBUTING.md
CHANGED
@@ -1,26 +1,47 @@
|
|
1
1
|
## Contributing
|
2
2
|
|
3
|
-
Bug reports and pull requests are welcome on GitHub at [https://github.com/pboling/activerecord-transactionable][
|
4
|
-
intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
|
5
|
-
the [code of conduct][conduct].
|
6
|
-
|
7
|
-
To submit a patch, please fork the project and create a patch with
|
8
|
-
|
3
|
+
Bug reports and pull requests are welcome on GitHub at [https://github.com/pboling/activerecord-transactionable][🚎src-main]
|
4
|
+
. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
|
5
|
+
the [code of conduct][🤝conduct].
|
6
|
+
|
7
|
+
To submit a patch, please fork the project and create a patch with tests. Once you're happy with it send a pull request
|
8
|
+
and post a message to the [gitter chat][🏘chat].
|
9
|
+
|
10
|
+
## Release
|
11
|
+
|
12
|
+
To release a new version:
|
13
|
+
|
14
|
+
1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check
|
15
|
+
2. Update the version number in `version.rb`
|
16
|
+
3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock`
|
17
|
+
4. Run `git commit -am "🔖 Prepare release v<VERSION>"` to commit the changes
|
18
|
+
5. Run `git push` to trigger the final CI pipeline before release, & merge PRs
|
19
|
+
a. NOTE: Remember to [check the build][🧪build]!
|
20
|
+
6. Run `git checkout main` (Or whichever branch is considered `trunk`, e.g. `master`)
|
21
|
+
7. Run `git pull origin main` to ensure you will release the latest trunk code.
|
22
|
+
8. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums
|
23
|
+
a. Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS`
|
24
|
+
9. Run `bundle exec rake build`
|
25
|
+
10. Run [`bin/checksums`](https://github.com/rubygems/guides/pull/325) to create SHA-256 and SHA-512 checksums
|
26
|
+
a. Checksums will be committed automatically by the script, but not pushed
|
27
|
+
11. Run `bundle exec rake release` which will create a git tag for the version,
|
28
|
+
push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems]
|
29
|
+
|
30
|
+
NOTE: You will need to have a public key in `certs/`, and list your cert in the
|
31
|
+
`gemspec`, in order to sign the new release.
|
32
|
+
See: [RubyGems Security Guide][🔒️rubygems-security-guide]
|
9
33
|
|
10
34
|
## Contributors
|
11
35
|
|
12
|
-
[![Contributors](https://contrib.rocks/image?repo=pboling/activerecord-transactionable)][contributors]
|
13
|
-
|
14
|
-
Made with [contributors-img][contrib-rocks].
|
15
|
-
|
16
|
-
[comment]: <> (Following links are used by README, CONTRIBUTING)
|
17
|
-
|
18
|
-
[conduct]: https://github.com/pboling/activerecord-transactionable/blob/master/CODE_OF_CONDUCT.md
|
19
|
-
|
20
|
-
[contrib-rocks]: https://contrib.rocks
|
21
|
-
|
22
|
-
[contributors]: https://github.com/pboling/activerecord-transactionable/graphs/contributors
|
36
|
+
[![Contributors](https://contrib.rocks/image?repo=pboling/activerecord-transactionable)][🖐contributors]
|
23
37
|
|
24
|
-
[
|
38
|
+
Made with [contributors-img][🖐contrib-rocks].
|
25
39
|
|
26
|
-
[
|
40
|
+
[🧪build]: https://github.com/pboling/activerecord-transactionable/actions
|
41
|
+
[🏘chat]: https://matrix.to/#/#pboling_activerecord-transactionable:gitter.im
|
42
|
+
[🤝conduct]: https://github.com/pboling/activerecord-transactionable/blob/main/CODE_OF_CONDUCT.md
|
43
|
+
[🖐contrib-rocks]: https://contrib.rocks
|
44
|
+
[🖐contributors]: https://github.com/pboling/activerecord-transactionable/graphs/contributors
|
45
|
+
[💎rubygems]: https://rubygems.org
|
46
|
+
[🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems
|
47
|
+
[🚎src-main]: https://github.com/pboling/activerecord-transactionable
|
data/{LICENSE → LICENSE.txt}
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2016
|
3
|
+
Copyright (c) 2016-2018, 2021-2022, 2024 Peter H. Boling (railsbling.com)
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -1,16 +1,69 @@
|
|
1
1
|
# Activerecord::Transactionable
|
2
2
|
|
3
|
+
<div id="badges">
|
4
|
+
|
5
|
+
[![CI Build][🚎dl-cwfi]][🚎dl-cwf]
|
6
|
+
[![Test Coverage][🔑cc-covi]][🔑cc-cov]
|
7
|
+
[![Maintainability][🔑cc-mnti]][🔑cc-mnt]
|
8
|
+
[![Depfu][🔑depfui]][🔑depfu]
|
9
|
+
|
10
|
+
[🚎dl-cwf]: https://github.com/pboling/activerecord-transactionable/actions/workflows/current.yml
|
11
|
+
[🚎dl-cwfi]: https://github.com/pboling/activerecord-transactionable/actions/workflows/current.yml/badge.svg
|
12
|
+
|
13
|
+
[comment]: <> ( 🔑 KEYED LINKS )
|
14
|
+
|
15
|
+
[🔑cc-mnt]: https://codeclimate.com/github/pboling/activerecord-transactionable/maintainability
|
16
|
+
[🔑cc-mnti]: https://api.codeclimate.com/v1/badges/41fa99881cfe6d45e7e5/maintainability
|
17
|
+
[🔑cc-cov]: https://codeclimate.com/github/pboling/activerecord-transactionable/test_coverage
|
18
|
+
[🔑cc-covi]: https://api.codeclimate.com/v1/badges/41fa99881cfe6d45e7e5/test_coverage
|
19
|
+
[🔑depfu]: https://depfu.com/github/pboling/activerecord-transactionable?project_id=2653
|
20
|
+
[🔑depfui]: https://badges.depfu.com/badges/d570491bac0ad3b0b65deb3c82028327/count.svg
|
21
|
+
|
22
|
+
-----
|
23
|
+
|
24
|
+
[![Liberapay Patrons][⛳liberapay-img]][⛳liberapay]
|
25
|
+
[![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor]
|
26
|
+
<span class="badge-buymeacoffee">
|
27
|
+
<a href="https://ko-fi.com/O5O86SNP4" target='_blank' title="Donate to my FLOSS or refugee efforts at ko-fi.com"><img src="https://img.shields.io/badge/buy%20me%20coffee-donate-yellow.svg" alt="Buy me coffee donation button" /></a>
|
28
|
+
</span>
|
29
|
+
<span class="badge-patreon">
|
30
|
+
<a href="https://patreon.com/galtzo" title="Donate to my FLOSS or refugee efforts using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a>
|
31
|
+
</span>
|
32
|
+
|
33
|
+
</div>
|
34
|
+
|
35
|
+
[⛳liberapay-img]: https://img.shields.io/liberapay/patrons/pboling.svg?logo=liberapay
|
36
|
+
[⛳liberapay]: https://liberapay.com/pboling/donate
|
37
|
+
[🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
|
38
|
+
[🖇sponsor]: https://github.com/sponsors/pboling
|
39
|
+
|
3
40
|
Provides a method, `transaction_wrapper` at the class and instance levels that can be used instead of `ActiveRecord#transaction`. Enables you to do transactions properly, with custom rescues and retry, including with or without locking.
|
4
41
|
|
5
|
-
| Project
|
6
|
-
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
42
|
+
| Project | Activerecord::Transactionable |
|
43
|
+
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
44
|
+
| install | `bundle add activerecord-transactionable` |
|
45
|
+
| compatibility | Ruby >= 2.5 |
|
46
|
+
| license | [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) |
|
47
|
+
| download rank | [![Downloads Today](https://img.shields.io/gem/rd/activerecord-transactionable.svg)](https://github.com/pboling/activerecord-transactionable) |
|
48
|
+
| version | [![Version](https://img.shields.io/gem/v/activerecord-transactionable.svg)](https://rubygems.org/gems/activerecord-transactionable) |
|
49
|
+
| code triage | [![Open Source Helpers](https://www.codetriage.com/pboling/activerecord-transactionable/badges/users.svg)](https://www.codetriage.com/pboling/activerecord-transactionable) |
|
50
|
+
| documentation | [on RDoc.info][documentation] |
|
51
|
+
| live chat | [![Join the chat at https://matrix.to/#/#pboling_activerecord-transactionable:gitter.im](https://badges.gitter.im/Join%20Chat.svg)](https://matrix.to/#/#pboling_activerecord-transactionable:gitter.im?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
|
52
|
+
| expert support | [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github) |
|
53
|
+
| Spread ~♡ⓛⓞⓥⓔ♡~ | [🌏](https://about.me/peter.boling), [👼](https://angel.co/peter-boling), [![Liberapay Patrons][⛳liberapay-img]][⛳liberapay] [![Follow Me on LinkedIn][🖇linkedin-img]][🖇linkedin] [![Find Me on WellFound:][✌️wellfound-img]][✌️wellfound] [![My Blog][🚎blog-img]][🚎blog] [![Follow Me on Twitter][🐦twitter-img]][🐦twitter] |
|
54
|
+
|
55
|
+
[documentation]: https://rubydoc.info/github/pboling/activerecord-transactionable
|
56
|
+
[🖇linkedin]: http://www.linkedin.com/in/peterboling
|
57
|
+
[🖇linkedin-img]: https://img.shields.io/badge/PeterBoling-blue?style=plastic&logo=linkedin
|
58
|
+
[✌️wellfound]: https://angel.co/u/peter-boling
|
59
|
+
[✌️wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=plastic&logo=angellist
|
60
|
+
[🐦twitter]: http://twitter.com/intent/user?screen_name=galtzo
|
61
|
+
[🐦twitter-img]: https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow%20@galtzo
|
62
|
+
[🚎blog]: http://www.railsbling.com/tags/oauth2/
|
63
|
+
[🚎blog-img]: https://img.shields.io/badge/blog-railsbling-brightgreen.svg?style=flat
|
64
|
+
[my🧪lab]: https://gitlab.com/pboling
|
65
|
+
[my🧊berg]: https://codeberg.org/pboling
|
66
|
+
[my🛖hut]: https://sr.ht/~galtzo/
|
14
67
|
|
15
68
|
Useful as an example of correct behavior for wrapping transactions.
|
16
69
|
|
@@ -20,10 +73,12 @@ NOTE: Rails' transactions are per-database connection, not per-model, nor per-in
|
|
20
73
|
## Upgrading to Version 2
|
21
74
|
|
22
75
|
In version 1 the `transaction_wrapper` returned `true` or `false`. In version 2 it returns an instance of `Activerecord::Transactionable::Result`, which has a `value`, and three methods:
|
76
|
+
|
23
77
|
```ruby
|
78
|
+
|
24
79
|
args = {}
|
25
80
|
result = transaction_wrapper(**args) do
|
26
|
-
|
81
|
+
# some code that might fail here
|
27
82
|
end
|
28
83
|
result.fail?
|
29
84
|
result.success?
|
@@ -60,14 +115,14 @@ Or install it yourself as:
|
|
60
115
|
|
61
116
|
## Compatibility
|
62
117
|
|
63
|
-
Targeted ruby compatibility is non-EOL versions of Ruby, currently 2.6, 2.7,
|
64
|
-
|
118
|
+
Targeted ruby compatibility is non-EOL versions of Ruby, currently 2.6, 2.7, 3.0, 3.1, 3.2, 3.3.
|
119
|
+
Ruby is limited to 2.5+ in the gemspec, and when it changes there will be a major release.
|
65
120
|
The `master` branch currently targets 3.0.x releases.
|
66
121
|
|
67
|
-
| Ruby OAuth Version
|
68
|
-
|
69
|
-
| 3.0.x
|
70
|
-
| 2.0.x
|
122
|
+
| Ruby OAuth Version | Maintenance Branch | Officially Supported Rubies | Unofficially Supported Rubies |
|
123
|
+
|--------------------|--------------------|----------------------------------------|-------------------------------|
|
124
|
+
| 3.0.x | `master` | 2.6, 2.7, 3.0, 3.1, 3.2, 3.3 | 2.5 |
|
125
|
+
| 2.0.x | `v2-maintenance` | 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0 | |
|
71
126
|
|
72
127
|
NOTE: 2.0.5 is anticipated as last release of the 2.x series.
|
73
128
|
|
@@ -124,7 +179,7 @@ If you need to know if the transaction succeeded:
|
|
124
179
|
```ruby
|
125
180
|
car = Car.new(name: nil)
|
126
181
|
result = car.transaction_wrapper(lock: true) do # uses ActiveRecord's with_lock
|
127
|
-
|
182
|
+
car.save!
|
128
183
|
end
|
129
184
|
result # => an instance of Activerecord::Transactionable::Result
|
130
185
|
result.success? # => true or false
|
@@ -135,14 +190,14 @@ result.success? # => true or false
|
|
135
190
|
```ruby
|
136
191
|
@client = Client.find(params[:id])
|
137
192
|
transaction_result = @client.transaction_wrapper(lock: true) do
|
138
|
-
|
139
|
-
|
193
|
+
@client.assign_attributes(client_params)
|
194
|
+
@client.save!
|
140
195
|
end
|
141
196
|
if transaction_result.success?
|
142
|
-
render :show, locals: {
|
197
|
+
render :show, locals: {client: @client}, status: :ok
|
143
198
|
else
|
144
199
|
# Something prevented update, transaction_result.to_h will have all the available details
|
145
|
-
render json: {
|
200
|
+
render json: {record_errors: @client.errors, transaction_result: transaction_result.to_h}, status: :unprocessable_entity
|
146
201
|
end
|
147
202
|
```
|
148
203
|
|
@@ -202,16 +257,12 @@ Activerecord::Transactionable::ClassMethods.class_eval do
|
|
202
257
|
end
|
203
258
|
```
|
204
259
|
|
205
|
-
##
|
206
|
-
|
207
|
-
* RubyDoc Documentation: [![RubyDoc.info](https://img.shields.io/badge/documentation-rubydoc-brightgreen.svg?style=flat)][documentation]
|
208
|
-
* GitHub Discussions: [![Discussion](https://img.shields.io/badge/discussions-github-brightgreen.svg?style=flat)][gh_discussions]
|
209
|
-
* Live Chat on Gitter: [![Join the chat at https://gitter.im/pboling/activerecord-transactionable](https://badges.gitter.im/Join%20Chat.svg)][chat]
|
210
|
-
* Maintainer's Blog: [![Blog](https://img.shields.io/badge/blog-railsbling-brightgreen.svg?style=flat)][blogpage]
|
260
|
+
## 🪇 Code of Conduct
|
211
261
|
|
212
|
-
|
262
|
+
Everyone interacting in this project's codebases, issue trackers,
|
263
|
+
chat rooms and mailing lists is expected to follow the [code of conduct][🪇conduct].
|
213
264
|
|
214
|
-
|
265
|
+
[🪇conduct]: CODE_OF_CONDUCT.md
|
215
266
|
|
216
267
|
## Development
|
217
268
|
|
@@ -219,125 +270,123 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
219
270
|
|
220
271
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
221
272
|
|
222
|
-
##
|
223
|
-
|
224
|
-
See [CONTRIBUTING.md][contributing]
|
225
|
-
|
226
|
-
## Contributors
|
227
|
-
|
228
|
-
[![Contributors](https://contrib.rocks/image?repo=pboling/activerecord-transactionable)][contributors]
|
229
|
-
|
230
|
-
Made with [contributors-img](https://contrib.rocks).
|
231
|
-
|
232
|
-
## Versioning
|
233
|
-
|
234
|
-
This library aims to adhere to [Semantic Versioning 2.0.0][semver].
|
235
|
-
Violations of this scheme should be reported as bugs. Specifically,
|
236
|
-
if a minor or patch version is released that breaks backward
|
237
|
-
compatibility, a new version should be immediately released that
|
238
|
-
restores compatibility. Breaking changes to the public API will
|
239
|
-
only be introduced with new major versions.
|
240
|
-
|
241
|
-
As a result of this policy, you can (and should) specify a
|
242
|
-
dependency on this gem using the [Pessimistic Version Constraint][pvc] with two digits of precision.
|
243
|
-
|
244
|
-
For example:
|
273
|
+
## 🛞 DVCS
|
245
274
|
|
246
|
-
|
247
|
-
|
248
|
-
```
|
249
|
-
## Contact
|
275
|
+
This project does not trust any one version control system,
|
276
|
+
so it abides the principles of ["Distributed Version Control Systems"][💎d-in-dvcs]
|
250
277
|
|
251
|
-
|
278
|
+
Find this project on:
|
252
279
|
|
253
|
-
|
280
|
+
| Any | Of | These | DVCS |
|
281
|
+
|----------------|------------------|----------------|----------------|
|
282
|
+
| [🐙hub][🐙hub] | [🧊berg][🧊berg] | [🛖hut][🛖hut] | [🧪lab][🧪lab] |
|
254
283
|
|
255
|
-
|
284
|
+
[comment]: <> ( DVCS LINKS )
|
256
285
|
|
257
|
-
|
286
|
+
[💎d-in-dvcs]: https://railsbling.com/posts/dvcs/put_the_d_in_dvcs/
|
258
287
|
|
259
|
-
|
260
|
-
|
261
|
-
|
288
|
+
[🧊berg]: https://codeberg.org/pboling/activerecord-transactionable
|
289
|
+
[🐙hub]: https://gitlab.com/pboling/activerecord-transactionable
|
290
|
+
[🛖hut]: https://sr.ht/~galtzo/pboling/activerecord-transactionable
|
291
|
+
[🧪lab]: https://gitlab.com/pboling/activerecord-transactionable
|
262
292
|
|
263
|
-
|
293
|
+
## 🤝 Contributing
|
264
294
|
|
265
|
-
[
|
295
|
+
See [CONTRIBUTING.md][🤝contributing]
|
266
296
|
|
267
|
-
[
|
297
|
+
[🤝contributing]: CONTRIBUTING.md
|
268
298
|
|
269
|
-
|
299
|
+
## 🌈 Contributors
|
270
300
|
|
271
|
-
[
|
301
|
+
[![Contributors][🌈contrib-rocks-img]][🐙hub-contrib]
|
272
302
|
|
273
|
-
[
|
303
|
+
Contributor tiles (GitHub only) made with [contributors-img][🌈contrib-rocks].
|
274
304
|
|
275
|
-
|
305
|
+
Learn more about, or become one of, our 🎖 contributors on:
|
276
306
|
|
277
|
-
|
307
|
+
| Any | Of | These | DVCS |
|
308
|
+
|-------------------------------------|---------------------------------------|-------------------------------------|-------------------------------------|
|
309
|
+
| [🐙hub contributors][🐙hub-contrib] | [🧊berg contributors][🧊berg-contrib] | [🛖hut contributors][🛖hut-contrib] | [🧪lab contributors][🧪lab-contrib] |
|
278
310
|
|
279
|
-
[
|
311
|
+
[comment]: <> ( DVCS CONTRIB LINKS )
|
280
312
|
|
281
|
-
[
|
313
|
+
[🌈contrib-rocks]: https://contrib.rocks
|
314
|
+
[🌈contrib-rocks-img]: https://contrib.rocks/image?repo=pboling/activerecord-transactionable
|
282
315
|
|
283
|
-
[
|
316
|
+
[🧊berg-contrib]: https://codeberg.org/pboling/activerecord-transactionable/activity
|
317
|
+
[🐙hub-contrib]: https://github.com/pboling/activerecord-transactionable/graphs/contributors
|
318
|
+
[🛖hut-contrib]: https://git.sr.ht/~galtzo/activerecord-transactionable/log/
|
319
|
+
[🧪lab-contrib]: https://gitlab.com/pboling/activerecord-transactionable/-/graphs/main?ref_type=heads
|
284
320
|
|
285
|
-
|
321
|
+
## 📌 Versioning
|
286
322
|
|
287
|
-
[
|
323
|
+
This Library adheres to [Semantic Versioning 2.0.0][📌semver].
|
324
|
+
Violations of this scheme should be reported as bugs.
|
325
|
+
Specifically, if a minor or patch version is released that breaks backward compatibility,
|
326
|
+
a new version should be immediately released that restores compatibility.
|
327
|
+
Breaking changes to the public API will only be introduced with new major versions.
|
288
328
|
|
289
|
-
|
329
|
+
To get a better understanding of how SemVer is intended to work over a project's lifetime,
|
330
|
+
read this article from the creator of SemVer:
|
290
331
|
|
291
|
-
[
|
332
|
+
- ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred]
|
292
333
|
|
293
|
-
|
334
|
+
As a result of this policy, you can (and should) specify a dependency on these libraries using
|
335
|
+
the [Pessimistic Version Constraint][📌pvc] with two digits of precision.
|
294
336
|
|
295
|
-
|
337
|
+
For example:
|
296
338
|
|
297
|
-
|
339
|
+
```ruby
|
340
|
+
spec.add_dependency("activerecord-transactionable", "~> 3.0")
|
341
|
+
```
|
298
342
|
|
299
|
-
[
|
343
|
+
[comment]: <> ( 📌 VERSIONING LINKS )
|
300
344
|
|
301
|
-
[
|
345
|
+
[📌pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
|
346
|
+
[📌semver]: http://semver.org/
|
347
|
+
[📌major-versions-not-sacred]: https://tom.preston-werner.com/2022/05/23/major-version-numbers-are-not-sacred.html
|
302
348
|
|
303
|
-
|
349
|
+
## Contact
|
304
350
|
|
305
|
-
[
|
351
|
+
Author and maintainer is Peter Boling ([@pboling][gh_sponsors]).
|
306
352
|
|
307
|
-
[
|
353
|
+
Feedback and questions are welcome on the [GitHub Discussions][gh_discussions] board.
|
308
354
|
|
309
|
-
[
|
355
|
+
For security-related issues see [SECURITY][security].
|
310
356
|
|
357
|
+
[security]: https://github.com/pboling/activerecord-transactionable/blob/master/SECURITY.md
|
311
358
|
[gh_discussions]: https://github.com/pboling/activerecord-transactionable/discussions
|
359
|
+
[gh_sponsors]: https://github.com/sponsors/pboling
|
312
360
|
|
313
|
-
|
314
|
-
|
315
|
-
[license-ref]: https://opensource.org/licenses/MIT
|
316
|
-
|
317
|
-
[codecov_coverage]: https://codecov.io/gh/pboling/activerecord-transactionable
|
318
|
-
|
319
|
-
[liberapay_donate]: https://liberapay.com/pboling/donate
|
320
|
-
|
321
|
-
[aboutme]: https://about.me/peter.boling
|
322
|
-
|
323
|
-
[angelme]: https://angel.co/peter-boling
|
324
|
-
|
325
|
-
[coderme]:http://coderwall.com/pboling
|
361
|
+
## 📄 License
|
326
362
|
|
327
|
-
|
363
|
+
The gem is available as open source under the terms of
|
364
|
+
the [MIT License][📄license] [![License: MIT][📄license-img]][📄license-ref].
|
365
|
+
See [LICENSE.txt][📄license] for the official [Copyright Notice][📄copyright-notice-explainer].
|
328
366
|
|
329
|
-
[
|
367
|
+
[comment]: <> ( 📄 LEGAL LINKS )
|
330
368
|
|
331
|
-
[
|
369
|
+
[📄copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
|
370
|
+
[📄license]: LICENSE.txt
|
371
|
+
[📄license-ref]: https://opensource.org/licenses/MIT
|
372
|
+
[📄license-img]: https://img.shields.io/badge/License-MIT-green.svg
|
332
373
|
|
333
|
-
|
374
|
+
### © Copyright
|
334
375
|
|
335
|
-
[
|
376
|
+
* Copyright (c) 2016-2018, 2021-2022, 2024 [Peter H. Boling][💁🏼♂️peterboling] of [Rails Bling][💁🏼♂️railsbling]
|
336
377
|
|
337
|
-
[
|
378
|
+
[comment]: <> ( 💁🏼♂️ PERSONAL LINKS )
|
338
379
|
|
339
|
-
[
|
380
|
+
[💁🏼♂️aboutme]: https://about.me/peter.boling
|
381
|
+
[💁🏼♂️angellist]: https://angel.co/peter-boling
|
382
|
+
[💁🏼♂️devto]: https://dev.to/galtzo
|
383
|
+
[💁🏼♂️followme]: https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow
|
384
|
+
[💁🏼♂️twitter]: http://twitter.com/galtzo
|
385
|
+
[💁🏼♂️peterboling]: http://www.peterboling.com
|
386
|
+
[💁🏼♂️railsbling]: http://www.railsbling.com
|
340
387
|
|
341
|
-
[
|
388
|
+
[comment]: <> ( 💼 PROJECT LINKS )
|
342
389
|
|
343
|
-
[
|
390
|
+
[💼blogpage]: http://www.railsbling.com/tags/activerecord-transactionable/
|
391
|
+
[💼documentation]: http://rdoc.info/github/activerecord-transactionable/meta/frames
|
392
|
+
[💼homepage]: https://github.com/pboling/activerecord-transactionable
|
data/SECURITY.md
CHANGED
@@ -2,13 +2,15 @@
|
|
2
2
|
|
3
3
|
## Supported Versions
|
4
4
|
|
5
|
-
| Version | Supported
|
6
|
-
|
7
|
-
| 3.0.x |
|
8
|
-
| 2.0.x |
|
9
|
-
| 1.0.x |
|
10
|
-
| 0.0.x |
|
5
|
+
| Version | Supported |
|
6
|
+
|---------|-----------|
|
7
|
+
| 3.0.x | ✅ |
|
8
|
+
| 2.0.x | ❌ |
|
9
|
+
| 1.0.x | ❌ |
|
10
|
+
| 0.0.x | ❌ |
|
11
11
|
|
12
12
|
## Reporting a Vulnerability
|
13
13
|
|
14
|
-
Peter Boling is the primary maintainer of this gem.
|
14
|
+
Peter Boling is the primary maintainer of this gem. Please find a way
|
15
|
+
to [contact him directly](https://railsbling.com/contact) to report the issue. Include as much relevant information as
|
16
|
+
possible.
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# External gems
|
4
|
+
require "version_gem"
|
3
5
|
require "active_model"
|
4
6
|
require "active_record"
|
5
|
-
# apparently needed for Rails 4.0 compatibility with rspec, when
|
6
|
-
# this gem is loaded before the rails gem by bundler, as will happen when you
|
7
|
-
# keep your Gemfile sorted alphabetically.
|
8
7
|
require "active_record/validations"
|
9
8
|
|
9
|
+
# This gem
|
10
10
|
require "activerecord/transactionable/version"
|
11
11
|
require "activerecord/transactionable/result"
|
12
12
|
|
@@ -28,7 +28,7 @@ module Activerecord
|
|
28
28
|
ERRORS_TO_DISALLOW_INSIDE_TRANSACTION = [
|
29
29
|
ActiveRecord::RecordInvalid,
|
30
30
|
ActiveRecord::StatementInvalid,
|
31
|
-
ActiveRecord::RecordNotUnique
|
31
|
+
ActiveRecord::RecordNotUnique,
|
32
32
|
].freeze
|
33
33
|
# http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html#method-i-transaction
|
34
34
|
TRANSACTION_METHOD_ARG_NAMES = %i[
|
@@ -54,10 +54,6 @@ module Activerecord
|
|
54
54
|
INSIDE_CONTEXT = "inside"
|
55
55
|
OUTSIDE_CONTEXT = "outside"
|
56
56
|
|
57
|
-
def transaction_wrapper(**args, &block)
|
58
|
-
self.class.transaction_wrapper(object: self, **args, &block)
|
59
|
-
end
|
60
|
-
|
61
57
|
module ClassMethods
|
62
58
|
def transaction_wrapper(object: nil, **args)
|
63
59
|
lock = args.delete(:lock)
|
@@ -67,13 +63,13 @@ module Activerecord
|
|
67
63
|
transaction_open = ActiveRecord::Base.connection.transaction_open?
|
68
64
|
unless args.keys.empty?
|
69
65
|
raise ArgumentError,
|
70
|
-
|
66
|
+
"#{self} does not know how to handle arguments: #{args.keys.inspect}"
|
71
67
|
end
|
72
68
|
if ERRORS_TO_DISALLOW_INSIDE_TRANSACTION.detect do |error|
|
73
|
-
|
74
|
-
|
69
|
+
inside_args.values.flatten.uniq.include?(error)
|
70
|
+
end
|
75
71
|
raise ArgumentError,
|
76
|
-
|
72
|
+
"#{self} should not rescue #{ERRORS_TO_DISALLOW_INSIDE_TRANSACTION.inspect} inside a transaction: #{inside_args.keys.inspect}"
|
77
73
|
end
|
78
74
|
|
79
75
|
if transaction_open
|
@@ -84,10 +80,18 @@ module Activerecord
|
|
84
80
|
logger.warn("[#{self}.transaction_wrapper] Opening a nested transaction. Setting #{REQUIRES_NEW}: true")
|
85
81
|
end
|
86
82
|
end
|
87
|
-
error_handler_outside_transaction(
|
88
|
-
|
89
|
-
|
90
|
-
|
83
|
+
error_handler_outside_transaction(
|
84
|
+
object: object,
|
85
|
+
transaction_open: transaction_open,
|
86
|
+
**outside_args,
|
87
|
+
) do |outside_is_retry|
|
88
|
+
run_inside_transaction_block(
|
89
|
+
transaction_args: transaction_args,
|
90
|
+
inside_args: inside_args,
|
91
|
+
lock: lock,
|
92
|
+
transaction_open: transaction_open,
|
93
|
+
object: object,
|
94
|
+
) do |is_retry|
|
91
95
|
# regardless of the retry being inside or outside the transaction, it is still a retry.
|
92
96
|
yield outside_is_retry || is_retry
|
93
97
|
end
|
@@ -102,13 +106,17 @@ module Activerecord
|
|
102
106
|
# NOTE: with_lock will reload object!
|
103
107
|
# Note: with_lock does not accept arguments like transaction does.
|
104
108
|
object.with_lock do
|
105
|
-
error_handler_inside_transaction(
|
106
|
-
|
109
|
+
error_handler_inside_transaction(
|
110
|
+
object: object, transaction_open: transaction_open, **inside_args,
|
111
|
+
&block
|
112
|
+
)
|
107
113
|
end
|
108
114
|
else
|
109
115
|
object.transaction(**transaction_args) do
|
110
|
-
error_handler_inside_transaction(
|
111
|
-
|
116
|
+
error_handler_inside_transaction(
|
117
|
+
object: object, transaction_open: transaction_open, **inside_args,
|
118
|
+
&block
|
119
|
+
)
|
112
120
|
end
|
113
121
|
end
|
114
122
|
else
|
@@ -139,8 +147,17 @@ module Activerecord
|
|
139
147
|
prepared_errors.include?(error_class)
|
140
148
|
end
|
141
149
|
local_context = INSIDE_CONTEXT
|
142
|
-
run_block_with_retry(
|
143
|
-
|
150
|
+
run_block_with_retry(
|
151
|
+
object,
|
152
|
+
local_context,
|
153
|
+
transaction_open,
|
154
|
+
retriable_errors,
|
155
|
+
reraisable_errors,
|
156
|
+
already_been_added_to_self,
|
157
|
+
needing_added_to_self,
|
158
|
+
num_retry_attempts,
|
159
|
+
&block
|
160
|
+
)
|
144
161
|
end
|
145
162
|
|
146
163
|
def error_handler_outside_transaction(transaction_open:, object: nil, **args, &block)
|
@@ -155,8 +172,17 @@ module Activerecord
|
|
155
172
|
prepared_errors.include?(error_class)
|
156
173
|
end
|
157
174
|
local_context = OUTSIDE_CONTEXT
|
158
|
-
run_block_with_retry(
|
159
|
-
|
175
|
+
run_block_with_retry(
|
176
|
+
object,
|
177
|
+
local_context,
|
178
|
+
transaction_open,
|
179
|
+
retriable_errors,
|
180
|
+
reraisable_errors,
|
181
|
+
already_been_added_to_self,
|
182
|
+
needing_added_to_self,
|
183
|
+
num_retry_attempts,
|
184
|
+
&block
|
185
|
+
)
|
160
186
|
end
|
161
187
|
|
162
188
|
def run_block_with_retry(object, local_context, transaction_open, retriable_errors, reraisable_errors, already_been_added_to_self, needing_added_to_self, num_retry_attempts)
|
@@ -173,7 +199,7 @@ module Activerecord
|
|
173
199
|
# We pass the retry state along to yield so that the code implementing
|
174
200
|
# the transaction_wrapper can switch behavior on a retry
|
175
201
|
# (e.g. create => find)
|
176
|
-
result = yield (re_try == false ? re_try : attempt)
|
202
|
+
result = yield ((re_try == false) ? re_try : attempt)
|
177
203
|
# When in the outside context we need to preserve the inside result so it bubbles up unmolested with the "meaningful" result of the transaction.
|
178
204
|
if result.is_a?(Activerecord::Transactionable::Result)
|
179
205
|
result # <= preserve the meaningful return value
|
@@ -185,8 +211,14 @@ module Activerecord
|
|
185
211
|
# if that is in the intended behavior, and this way a specific child of StandardError can be reraised while
|
186
212
|
# the parent can still be caught and added to self.errors
|
187
213
|
# Also adds the error to the object if there is an object.
|
188
|
-
transaction_error_logger(
|
189
|
-
|
214
|
+
transaction_error_logger(
|
215
|
+
object: object,
|
216
|
+
error: e,
|
217
|
+
result: nil,
|
218
|
+
attempt: attempt,
|
219
|
+
add_to: nil,
|
220
|
+
additional_message: " [#{transaction_open ? "nested " : ""}#{local_context} re-raising!]",
|
221
|
+
)
|
190
222
|
raise e
|
191
223
|
rescue *retriable_errors => e
|
192
224
|
# This will re-run the begin block above
|
@@ -194,27 +226,45 @@ module Activerecord
|
|
194
226
|
# To avoid the infinite recursion, we track the retry state
|
195
227
|
if attempt >= num_retry_attempts
|
196
228
|
result = Activerecord::Transactionable::Result.new(false, context: local_context, transaction_open: transaction_open, error: e, attempt: attempt, type: "retriable") # <= make the return value meaningful. Meaning is: transaction failed after <attempt> attempts
|
197
|
-
transaction_error_logger(
|
198
|
-
|
229
|
+
transaction_error_logger(
|
230
|
+
object: object,
|
231
|
+
error: e,
|
232
|
+
result: result,
|
233
|
+
additional_message: " [#{transaction_open ? "nested " : ""}#{local_context}]",
|
234
|
+
)
|
199
235
|
result
|
200
236
|
else
|
201
237
|
re_try = true
|
202
238
|
# Not adding error to base when retrying, because otherwise the added error may
|
203
239
|
# prevent the subsequent save from working, in a catch-22
|
204
|
-
transaction_error_logger(
|
205
|
-
|
240
|
+
transaction_error_logger(
|
241
|
+
object: object,
|
242
|
+
error: e,
|
243
|
+
result: nil,
|
244
|
+
attempt: attempt,
|
245
|
+
add_to: nil,
|
246
|
+
additional_message: " [#{transaction_open ? "nested " : ""}#{local_context}]",
|
247
|
+
)
|
206
248
|
retry
|
207
249
|
end
|
208
250
|
rescue *already_been_added_to_self => e
|
209
251
|
# ActiveRecord::RecordInvalid, when done correctly, will have already added the error to object.
|
210
252
|
result = Activerecord::Transactionable::Result.new(false, context: local_context, transaction_open: transaction_open, error: e, attempt: attempt, type: "already_added") # <= make the return value meaningful. Meaning is: transaction failed
|
211
|
-
transaction_error_logger(
|
212
|
-
|
253
|
+
transaction_error_logger(
|
254
|
+
object: nil,
|
255
|
+
error: e,
|
256
|
+
result: result,
|
257
|
+
additional_message: " [#{transaction_open ? "nested " : ""}#{local_context}]",
|
258
|
+
)
|
213
259
|
result
|
214
260
|
rescue *needing_added_to_self => e
|
215
261
|
result = Activerecord::Transactionable::Result.new(false, context: local_context, transaction_open: transaction_open, error: e, attempt: attempt, type: "needing_added") # <= make the return value meaningful. Meaning is: transaction failed
|
216
|
-
transaction_error_logger(
|
217
|
-
|
262
|
+
transaction_error_logger(
|
263
|
+
object: object,
|
264
|
+
error: e,
|
265
|
+
result: result,
|
266
|
+
additional_message: " [#{transaction_open ? "nested " : ""}#{local_context}]",
|
267
|
+
)
|
218
268
|
result
|
219
269
|
end
|
220
270
|
end
|
@@ -233,5 +283,13 @@ module Activerecord
|
|
233
283
|
end
|
234
284
|
end
|
235
285
|
end
|
286
|
+
|
287
|
+
def transaction_wrapper(**args, &block)
|
288
|
+
self.class.transaction_wrapper(object: self, **args, &block)
|
289
|
+
end
|
236
290
|
end
|
237
291
|
end
|
292
|
+
|
293
|
+
Activerecord::Transactionable::Version.class_eval do
|
294
|
+
extend VersionGem::Basic
|
295
|
+
end
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,42 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-transactionable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
|
-
cert_chain:
|
11
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl
|
14
|
+
ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW
|
15
|
+
A2NvbTAeFw0yMzA5MjAxNzMwMjhaFw0yNDA5MTkxNzMwMjhaMEMxFTATBgNVBAMM
|
16
|
+
DHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy
|
17
|
+
LGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA+a9UvHo3
|
18
|
+
84k96WgU5Kk5HB+cLZs/modjorsTfqY67MJF5nNvAoqcKTUBW4uG+Zpfnm3jaDO5
|
19
|
+
GxhJEIZWfndYzycHT2KMVQ1uTP82ba8ZaKrPlPIafkbui3mdds47qsmqHiblKERg
|
20
|
+
U532lkwfqHDlJwE7OBZQ59EwWWLynlT/yAUHpOBbqIuHKUxdpmBI+sIjrZcD1e05
|
21
|
+
WmjkO6fwIdC5oM757aoPxIgXD587VOViH11Vkm2doskj4T8yONtwVHlcrrhJ9Bzd
|
22
|
+
/zdp6vEn7GZQrABvpOlqwWxQ72ZnFhJe/RJZf6CXOPOh69Ai0QKYl2a1sYuCJKS3
|
23
|
+
nsBnxXJINEEznjR7rZjNUmYD+CZqfjzgPqedRxTlASe7iA4w7xZOqMDzcuhNwcUQ
|
24
|
+
tMEH6BTktxKP3jXZPXRfHCf6s+HRVb6vezAonTBVyydf5Xp5VwWkd6cwm+2BzHl5
|
25
|
+
7kc/3lLxKMcsyEUprAsk8LdHohwZdC267l+RS++AP6Cz6x+nB3oGob19AgMBAAGj
|
26
|
+
fzB9MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQCSSas60GqqMjt
|
27
|
+
xR7LoY1gucEvtzAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG
|
28
|
+
A1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD
|
29
|
+
ggGBAMl9ifcw5p+PdvB7dCPoNKoVdp/2LbC9ztETHuYL2gUMJB6UoS3o9c/piSuR
|
30
|
+
V3ZMQaijmNu6ms1bWAtJ66LjmYrVflJtf9yp31Kierr9LpisMSUx2qbMOHGa8d2Z
|
31
|
+
vCUWPF8E9Cg0mP3GAyZ6qql8jDh/anUKeksPXqJvNxNPDu2DVYsa/IWdl96whzS4
|
32
|
+
Bl7SwB1E7agps40UcshCSKaVDOU0M+XN6SrnJMElnBic+KSAkBkVFbzS0BE4ODZM
|
33
|
+
BgE6nYzQ05qhuvbE+oGdACTlemNtDDWCh0uw+7x0q2PocGIDU5zsPn/WNTkCXPmB
|
34
|
+
CHGvqDNWq4M7ncTKAaS2XExgyb7uPdq9fKiOW8nmH+zCiGzJXzBWwZlKf7L4Ht9E
|
35
|
+
a3f0e5C+zvee9Z5Ng9ciyfav9/fcXgYt5MjoBv27THr5XfBhgOCIHSYW2tqJmWKi
|
36
|
+
KuxrfYrN+9HvMdm+nZ6TypmKftHY3Gj+/uu+g8Icm/zrvTWAEE0mcJOkfrIoNPJb
|
37
|
+
pF8dMA==
|
38
|
+
-----END CERTIFICATE-----
|
39
|
+
date: 2024-03-06 00:00:00.000000000 Z
|
12
40
|
dependencies:
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: activemodel
|
@@ -16,212 +44,174 @@ dependencies:
|
|
16
44
|
requirements:
|
17
45
|
- - ">="
|
18
46
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
47
|
+
version: 5.2.8.1
|
20
48
|
type: :runtime
|
21
49
|
prerelease: false
|
22
50
|
version_requirements: !ruby/object:Gem::Requirement
|
23
51
|
requirements:
|
24
52
|
- - ">="
|
25
53
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
54
|
+
version: 5.2.8.1
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: activerecord
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
59
|
- - ">="
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
61
|
+
version: 5.2.8.1
|
34
62
|
type: :runtime
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
66
|
- - ">="
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
68
|
+
version: 5.2.8.1
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
70
|
+
name: version_gem
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
73
|
- - "~>"
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '11.1'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: factory_bot
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
75
|
+
version: '1.1'
|
59
76
|
- - ">="
|
60
77
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
type: :
|
78
|
+
version: 1.1.3
|
79
|
+
type: :runtime
|
63
80
|
prerelease: false
|
64
81
|
version_requirements: !ruby/object:Gem::Requirement
|
65
82
|
requirements:
|
83
|
+
- - "~>"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '1.1'
|
66
86
|
- - ">="
|
67
87
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
88
|
+
version: 1.1.3
|
69
89
|
- !ruby/object:Gem::Dependency
|
70
90
|
name: rake
|
71
91
|
requirement: !ruby/object:Gem::Requirement
|
72
92
|
requirements:
|
73
93
|
- - ">="
|
74
94
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
95
|
+
version: '13.1'
|
76
96
|
type: :development
|
77
97
|
prerelease: false
|
78
98
|
version_requirements: !ruby/object:Gem::Requirement
|
79
99
|
requirements:
|
80
100
|
- - ">="
|
81
101
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
102
|
+
version: '13.1'
|
83
103
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
104
|
+
name: kramdown
|
85
105
|
requirement: !ruby/object:Gem::Requirement
|
86
106
|
requirements:
|
87
107
|
- - "~>"
|
88
108
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
109
|
+
version: '2.4'
|
90
110
|
type: :development
|
91
111
|
prerelease: false
|
92
112
|
version_requirements: !ruby/object:Gem::Requirement
|
93
113
|
requirements:
|
94
114
|
- - "~>"
|
95
115
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
116
|
+
version: '2.4'
|
97
117
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
118
|
+
name: yard
|
99
119
|
requirement: !ruby/object:Gem::Requirement
|
100
120
|
requirements:
|
101
121
|
- - "~>"
|
102
122
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0.
|
104
|
-
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0.6'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rspec-block_is_expected
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
123
|
+
version: '0.9'
|
124
|
+
- - ">="
|
116
125
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
126
|
+
version: 0.9.34
|
118
127
|
type: :development
|
119
128
|
prerelease: false
|
120
129
|
version_requirements: !ruby/object:Gem::Requirement
|
121
130
|
requirements:
|
122
131
|
- - "~>"
|
123
132
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
125
|
-
-
|
126
|
-
name: rspec-pending_for
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0.1'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
133
|
+
version: '0.9'
|
134
|
+
- - ">="
|
137
135
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
136
|
+
version: 0.9.34
|
139
137
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
138
|
+
name: yard-junk
|
141
139
|
requirement: !ruby/object:Gem::Requirement
|
142
140
|
requirements:
|
143
141
|
- - "~>"
|
144
142
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
143
|
+
version: '0.0'
|
146
144
|
type: :development
|
147
145
|
prerelease: false
|
148
146
|
version_requirements: !ruby/object:Gem::Requirement
|
149
147
|
requirements:
|
150
148
|
- - "~>"
|
151
149
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
150
|
+
version: '0.0'
|
153
151
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
152
|
+
name: factory_bot
|
155
153
|
requirement: !ruby/object:Gem::Requirement
|
156
154
|
requirements:
|
157
|
-
- -
|
155
|
+
- - '='
|
158
156
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
157
|
+
version: 6.4.4
|
160
158
|
type: :development
|
161
159
|
prerelease: false
|
162
160
|
version_requirements: !ruby/object:Gem::Requirement
|
163
161
|
requirements:
|
164
|
-
- -
|
162
|
+
- - '='
|
165
163
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
164
|
+
version: 6.4.4
|
167
165
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
166
|
+
name: rspec
|
169
167
|
requirement: !ruby/object:Gem::Requirement
|
170
168
|
requirements:
|
171
|
-
- - "
|
169
|
+
- - ">="
|
172
170
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
171
|
+
version: '3'
|
174
172
|
type: :development
|
175
173
|
prerelease: false
|
176
174
|
version_requirements: !ruby/object:Gem::Requirement
|
177
175
|
requirements:
|
178
|
-
- - "
|
176
|
+
- - ">="
|
179
177
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
178
|
+
version: '3'
|
181
179
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
180
|
+
name: rspec-benchmark
|
183
181
|
requirement: !ruby/object:Gem::Requirement
|
184
182
|
requirements:
|
185
183
|
- - "~>"
|
186
184
|
- !ruby/object:Gem::Version
|
187
|
-
version: '0.
|
185
|
+
version: '0.6'
|
188
186
|
type: :development
|
189
187
|
prerelease: false
|
190
188
|
version_requirements: !ruby/object:Gem::Requirement
|
191
189
|
requirements:
|
192
190
|
- - "~>"
|
193
191
|
- !ruby/object:Gem::Version
|
194
|
-
version: '0.
|
192
|
+
version: '0.6'
|
195
193
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
194
|
+
name: rspec-block_is_expected
|
197
195
|
requirement: !ruby/object:Gem::Requirement
|
198
196
|
requirements:
|
199
197
|
- - "~>"
|
200
198
|
- !ruby/object:Gem::Version
|
201
|
-
version: '0
|
202
|
-
|
203
|
-
prerelease: false
|
204
|
-
version_requirements: !ruby/object:Gem::Requirement
|
205
|
-
requirements:
|
206
|
-
- - "~>"
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '0.5'
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: rubocop-performance
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - "~>"
|
199
|
+
version: '1.0'
|
200
|
+
- - ">="
|
214
201
|
- !ruby/object:Gem::Version
|
215
|
-
version:
|
202
|
+
version: 1.0.5
|
216
203
|
type: :development
|
217
204
|
prerelease: false
|
218
205
|
version_requirements: !ruby/object:Gem::Requirement
|
219
206
|
requirements:
|
220
207
|
- - "~>"
|
221
208
|
- !ruby/object:Gem::Version
|
222
|
-
version: '1.
|
209
|
+
version: '1.0'
|
210
|
+
- - ">="
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: 1.0.5
|
223
213
|
- !ruby/object:Gem::Dependency
|
224
|
-
name:
|
214
|
+
name: rspec_junit_formatter
|
225
215
|
requirement: !ruby/object:Gem::Requirement
|
226
216
|
requirements:
|
227
217
|
- - "~>"
|
@@ -235,33 +225,33 @@ dependencies:
|
|
235
225
|
- !ruby/object:Gem::Version
|
236
226
|
version: '0.6'
|
237
227
|
- !ruby/object:Gem::Dependency
|
238
|
-
name:
|
228
|
+
name: rspec-pending_for
|
239
229
|
requirement: !ruby/object:Gem::Requirement
|
240
230
|
requirements:
|
241
|
-
- - "
|
231
|
+
- - ">="
|
242
232
|
- !ruby/object:Gem::Version
|
243
|
-
version: '
|
233
|
+
version: '0'
|
244
234
|
type: :development
|
245
235
|
prerelease: false
|
246
236
|
version_requirements: !ruby/object:Gem::Requirement
|
247
237
|
requirements:
|
248
|
-
- - "
|
238
|
+
- - ">="
|
249
239
|
- !ruby/object:Gem::Version
|
250
|
-
version: '
|
240
|
+
version: '0'
|
251
241
|
- !ruby/object:Gem::Dependency
|
252
|
-
name:
|
242
|
+
name: silent_stream
|
253
243
|
requirement: !ruby/object:Gem::Requirement
|
254
244
|
requirements:
|
255
|
-
- - "
|
245
|
+
- - ">="
|
256
246
|
- !ruby/object:Gem::Version
|
257
|
-
version: '
|
247
|
+
version: '1'
|
258
248
|
type: :development
|
259
249
|
prerelease: false
|
260
250
|
version_requirements: !ruby/object:Gem::Requirement
|
261
251
|
requirements:
|
262
|
-
- - "
|
252
|
+
- - ">="
|
263
253
|
- !ruby/object:Gem::Version
|
264
|
-
version: '
|
254
|
+
version: '1'
|
265
255
|
- !ruby/object:Gem::Dependency
|
266
256
|
name: sqlite3
|
267
257
|
requirement: !ruby/object:Gem::Requirement
|
@@ -276,20 +266,6 @@ dependencies:
|
|
276
266
|
- - "~>"
|
277
267
|
- !ruby/object:Gem::Version
|
278
268
|
version: '1'
|
279
|
-
- !ruby/object:Gem::Dependency
|
280
|
-
name: yard
|
281
|
-
requirement: !ruby/object:Gem::Requirement
|
282
|
-
requirements:
|
283
|
-
- - ">="
|
284
|
-
- !ruby/object:Gem::Version
|
285
|
-
version: 0.9.20
|
286
|
-
type: :development
|
287
|
-
prerelease: false
|
288
|
-
version_requirements: !ruby/object:Gem::Requirement
|
289
|
-
requirements:
|
290
|
-
- - ">="
|
291
|
-
- !ruby/object:Gem::Version
|
292
|
-
version: 0.9.20
|
293
269
|
description: Getting transactions right is hard, and this gem makes it easier.
|
294
270
|
email:
|
295
271
|
- peter.boling@gmail.com
|
@@ -299,16 +275,24 @@ extra_rdoc_files: []
|
|
299
275
|
files:
|
300
276
|
- CODE_OF_CONDUCT.md
|
301
277
|
- CONTRIBUTING.md
|
302
|
-
- LICENSE
|
278
|
+
- LICENSE.txt
|
303
279
|
- README.md
|
304
280
|
- SECURITY.md
|
305
281
|
- lib/activerecord/transactionable.rb
|
306
282
|
- lib/activerecord/transactionable/result.rb
|
307
283
|
- lib/activerecord/transactionable/version.rb
|
308
|
-
homepage:
|
284
|
+
homepage: https://github.com/pboling/activerecord-transactionable
|
309
285
|
licenses:
|
310
286
|
- MIT
|
311
|
-
metadata:
|
287
|
+
metadata:
|
288
|
+
homepage_uri: https://github.com/pboling/activerecord-transactionable
|
289
|
+
source_code_uri: https://github.com/pboling/activerecord-transactionable/tree/v3.0.3
|
290
|
+
bug_tracker_uri: https://github.com/pboling/activerecord-transactionable/issues
|
291
|
+
documentation_uri: https://www.rubydoc.info/gems/activerecord-transactionable/3.0.3
|
292
|
+
wiki_uri: https://github.com/pboling/activerecord-transactionable/wiki
|
293
|
+
funding_uri: https://liberapay.com/pboling
|
294
|
+
news_uri: https://www.railsbling.com/tags/activerecord-transactionable
|
295
|
+
rubygems_mfa_required: 'true'
|
312
296
|
post_install_message:
|
313
297
|
rdoc_options: []
|
314
298
|
require_paths:
|
@@ -324,7 +308,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
324
308
|
- !ruby/object:Gem::Version
|
325
309
|
version: '0'
|
326
310
|
requirements: []
|
327
|
-
rubygems_version: 3.
|
311
|
+
rubygems_version: 3.5.6
|
328
312
|
signing_key:
|
329
313
|
specification_version: 4
|
330
314
|
summary: Do ActiveRecord transactions the right way.
|
metadata.gz.sig
ADDED
Binary file
|