activerecord-transactionable 3.0.1 → 3.0.2

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
2
  SHA256:
3
- metadata.gz: b7d5f0d70200bcd62ca45dd9639614241ad9922c69e26e5e60db1e8c19724ce6
4
- data.tar.gz: de2e9d597d44673930c041d7765178e901dceb540461badcde91370b1576e22a
3
+ metadata.gz: c50e2e6fb7f7b4fa84e937daa693efc620451ec3ccb1fc7d1cb5154a6224087c
4
+ data.tar.gz: 2ba7e8f077edd0475721483d252be6233294a78e9c900daff2d6b810c7aba436
5
5
  SHA512:
6
- metadata.gz: 29aca93fae0610d28954de9fd702d0df342445ff51b70849d4fdea3d18618e818a0cf16b87f800d67519b9719f746786492698595c1ae99fab6b9f61c3945281
7
- data.tar.gz: efe950e407b33d34189abeac8aa1c17e527f29bb2c9c331843fac698f6a017792f8263ad65ac151e47bc718dd429de070a31dfe38115461d214d2db9a0d3151d
6
+ metadata.gz: d1a2b79d3ec10a2a52be1282d7bfa7ecfa7b499146582fdc3568e6bca06cb4f2e09c4c53eeea54a8d9652e80aa249b44f3d41c7d4f5a2c77dc534a4af30cdfa4
7
+ data.tar.gz: 769582a2c37bc84cd0ac1a95b119d3fe9c17d506c76b0cd03423db03c4e8516f277fefae58e6c7fb419f54aa269b3ceb02beaf4a0a879113961f24cf81c0b986
data/README.md CHANGED
@@ -8,7 +8,7 @@ Provides a method, `transaction_wrapper` at the class and instance levels that c
8
8
  | version & downloads | [![Version](https://img.shields.io/gem/v/activerecord-transactionable.svg)][rubygems] [![Total Downloads](https://img.shields.io/gem/dt/activerecord-transactionable.svg)][rubygems] [![Downloads Today](https://img.shields.io/gem/rd/activerecord-transactionable.svg)][rubygems] [![Homepage](https://img.shields.io/badge/source-github-brightgreen.svg?style=flat)][source] |
9
9
  | dependencies & linting | [![Depfu](https://badges.depfu.com/badges/d570491bac0ad3b0b65deb3c82028327/count.svg)][depfu] [![lint status](https://github.com/pboling/activerecord-transactionable/actions/workflows/style.yml/badge.svg)][actions] |
10
10
  | unit tests | [![supported rubies](https://github.com/pboling/activerecord-transactionable/actions/workflows/supported.yml/badge.svg)][actions] [![unsupported status](https://github.com/pboling/activerecord-transactionable/actions/workflows/unsupported.yml/badge.svg)][actions] |
11
- | coverage & maintainability | [![Test Coverage](https://api.codeclimate.com/v1/badges/41fa99881cfe6d45e7e5/test_coverage)][climate_coverage] [![codecov](https://codecov.io/gh/pboling/activerecord-transactionable/branch/master/graph/badge.svg?token=4ZNAWNxrf9)][codecov_coverage] [![Maintainability](https://api.codeclimate.com/v1/badges/41fa99881cfe6d45e7e5/maintainability)][climate_maintainability] [![Maintenance Policy](https://img.shields.io/badge/maintenance-policy-brightgreen.svg?style=flat)][maintenancee_policy] |
11
+ | coverage & maintainability | [![Test Coverage](https://api.codeclimate.com/v1/badges/41fa99881cfe6d45e7e5/test_coverage)][climate_coverage] [![codecov](https://codecov.io/gh/pboling/activerecord-transactionable/branch/master/graph/badge.svg?token=4ZNAWNxrf9)][codecov_coverage] [![Maintainability](https://api.codeclimate.com/v1/badges/41fa99881cfe6d45e7e5/maintainability)][climate_maintainability] [![Security Policy](https://img.shields.io/badge/security-policy-brightgreen.svg?style=flat)][security] |
12
12
  | resources | [![Discussion](https://img.shields.io/badge/discussions-github-brightgreen.svg?style=flat)][gh_discussions] [![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) [![Join the chat at https://gitter.im/pboling/activerecord-transactionable](https://badges.gitter.im/Join%20Chat.svg)][chat] [![Blog](https://img.shields.io/badge/blog-railsbling-brightgreen.svg?style=flat)][blogpage] |
13
13
  | Spread ~♡ⓛⓞⓥⓔ♡~ | [![Open Source Helpers](https://www.codetriage.com/pboling/activerecord-transactionable/badges/users.svg)][code_triage] [![Liberapay Patrons](https://img.shields.io/liberapay/patrons/pboling.svg?logo=liberapay)][liberapay_donate] [![Sponsor Me](https://img.shields.io/badge/sponsor-pboling.svg?style=social&logo=github)][gh_sponsors] [🌏][aboutme] [👼][angelme] [💻][coderme] [🌹][politicme] [![Tweet @ Peter][followme-img]][tweetme] |
14
14
 
@@ -227,6 +227,8 @@ See [CONTRIBUTING.md][contributing]
227
227
 
228
228
  [![Contributors](https://contrib.rocks/image?repo=pboling/activerecord-transactionable)][contributors]
229
229
 
230
+ Made with [contributors-img](https://contrib.rocks).
231
+
230
232
  ## Versioning
231
233
 
232
234
  This library aims to adhere to [Semantic Versioning 2.0.0][semver].
@@ -244,17 +246,30 @@ For example:
244
246
  ```ruby
245
247
  spec.add_dependency "activerecord-transactionable", "~> 2.0"
246
248
  ```
249
+ ## Contact
250
+
251
+ Author and maintainer is Peter Boling ([@pboling][gh_sponsors]).
252
+
253
+ Comments are welcome in the [GitHub Discussions][gh_discussions] board.
254
+
255
+ For security-related issues see [SECURITY][security].
247
256
 
248
257
  ## License
249
258
 
250
- * Copyright (c) 2016 - 2018, 2021 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
259
+ The gem is available as open source under the terms of
260
+ the [MIT License][license] [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)][license-ref].
261
+ See [LICENSE][license] for the official [Copyright Notice][copyright-notice-explainer].
251
262
 
252
- [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)][license-ref]
263
+ * Copyright (c) 2016 - 2018, 2021 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
253
264
 
254
265
  [copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
255
266
 
256
267
  [license]: https://github.com/pboling/activerecord-transactionable/blob/master/LICENSE
257
268
 
269
+ [conduct]: https://github.com/pboling/activerecord-transactionable/blob/master/CODE_OF_CONDUCT.md
270
+
271
+ [security]: https://github.com/pboling/activerecord-transactionable/blob/master/SECURITY.md
272
+
258
273
  [semver]: http://semver.org/
259
274
 
260
275
  [pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Activerecord
4
4
  module Transactionable
5
- VERSION = "3.0.1"
5
+ VERSION = "3.0.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-transactionable
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling
@@ -297,26 +297,11 @@ executables: []
297
297
  extensions: []
298
298
  extra_rdoc_files: []
299
299
  files:
300
- - ".github/FUNDING.yml"
301
- - ".github/dependabot.yml"
302
- - ".github/workflows/style.yml"
303
- - ".github/workflows/supported.yml"
304
- - ".github/workflows/unsupported.yml"
305
- - ".gitignore"
306
- - ".rspec"
307
- - ".rubocop.yml"
308
- - ".rubocop_todo.yml"
309
- - ".simplecov"
310
300
  - CODE_OF_CONDUCT.md
311
301
  - CONTRIBUTING.md
312
- - Gemfile
313
302
  - LICENSE
314
303
  - README.md
315
- - Rakefile
316
304
  - SECURITY.md
317
- - activerecord-transactionable.gemspec
318
- - bin/console
319
- - bin/setup
320
305
  - lib/activerecord/transactionable.rb
321
306
  - lib/activerecord/transactionable/result.rb
322
307
  - lib/activerecord/transactionable/version.rb
data/.github/FUNDING.yml DELETED
@@ -1,12 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: [pboling] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
- patreon: galtzo # Replace with a single Patreon username
5
- open_collective: # Replace with a single Open Collective username
6
- ko_fi: pboling # Replace with a single Ko-fi username
7
- tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
- community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
- liberapay: pboling # Replace with a single Liberapay username
10
- issuehunt: pboling # Replace with a single IssueHunt username
11
- otechie: # Replace with a single Otechie username
12
- custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -1,8 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: bundler
4
- directory: "/"
5
- schedule:
6
- interval: daily
7
- time: "04:29"
8
- open-pull-requests-limit: 10
@@ -1,34 +0,0 @@
1
- name: Code Style Checks
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- - '*-maintenance'
8
- - '*-dev'
9
- tags:
10
- - '!*' # Do not execute on tags
11
- pull_request:
12
- branches:
13
- - '*'
14
-
15
- jobs:
16
- rubocop:
17
- name: Rubocop
18
- if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
19
- strategy:
20
- fail-fast: false
21
- matrix:
22
- ruby:
23
- - 2.6
24
- runs-on: ubuntu-latest
25
- steps:
26
- - name: Checkout
27
- uses: actions/checkout@v2
28
- - name: Setup Ruby & Bundle
29
- uses: ruby/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- bundler-cache: true
33
- - name: Run Rubocop
34
- run: bundle exec rubocop -DESP
@@ -1,58 +0,0 @@
1
- name: Supported Rubies
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- - '*-maintenance'
8
- - '*-dev'
9
- tags:
10
- - '!*' # Do not execute on tags
11
- pull_request:
12
- branches:
13
- - '*'
14
-
15
- jobs:
16
- test:
17
- name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
18
- if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
19
- strategy:
20
- fail-fast: false
21
- matrix:
22
- ruby:
23
- - truffleruby-head
24
- - ruby-head
25
- - 3.0
26
- - 2.7
27
- - 2.6
28
- runs-on: ubuntu-latest
29
- continue-on-error: ${{ matrix.allow_failure || endsWith(matrix.ruby, 'head') }}
30
- steps:
31
- - uses: amancevice/setup-code-climate@v0
32
- name: CodeClimate Install
33
- if: matrix.ruby == '2.6' && github.event_name != 'pull_request'
34
- with:
35
- cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }}
36
- - name: Checkout
37
- uses: actions/checkout@v2
38
- - name: Setup Ruby & Bundle
39
- uses: ruby/setup-ruby@v1
40
- with:
41
- ruby-version: ${{ matrix.ruby }}
42
- bundler-cache: true
43
- - name: CodeClimate Pre-build Notification
44
- run: cc-test-reporter before-build
45
- if: matrix.ruby == '2.6' && github.event_name != 'pull_request'
46
- continue-on-error: ${{ matrix.allow_failures != 'false' }}
47
- - name: Run tests
48
- run: bundle exec rake test
49
- - uses: codecov/codecov-action@v2
50
- if: matrix.ruby == '2.6' && github.event_name != 'pull_request' && always()
51
- with:
52
- flags: unittests
53
- name: codecov-upload
54
- fail_ci_if_error: true
55
- - name: CodeClimate Post-build Notification
56
- run: cc-test-reporter after-build
57
- if: matrix.ruby == '2.6' && github.event_name != 'pull_request' && always()
58
- continue-on-error: ${{ matrix.allow_failures != 'false' }}
@@ -1,37 +0,0 @@
1
- name: Unsupported Rubies
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- - '*-maintenance'
8
- - '*-dev'
9
- tags:
10
- - '!*' # Do not execute on tags
11
- pull_request:
12
- branches:
13
- - '*'
14
-
15
- jobs:
16
- test:
17
- name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
18
- if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
19
- strategy:
20
- fail-fast: false
21
- matrix:
22
- ruby:
23
- - 2.5
24
- runs-on: ubuntu-18.04
25
- continue-on-error: ${{ matrix.allow_failure || endsWith(matrix.ruby, 'head') }}
26
- steps:
27
- - name: Checkout
28
- uses: actions/checkout@v2
29
- - name: Install cURL Headers
30
- run: sudo apt-get install libcurl4-openssl-dev
31
- - name: Setup Ruby & Bundle
32
- uses: ruby/setup-ruby@v1
33
- with:
34
- ruby-version: ${{ matrix.ruby }}
35
- bundler-cache: true
36
- - name: Run tests
37
- run: bundle exec rake test
data/.gitignore DELETED
@@ -1,12 +0,0 @@
1
- .bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
-
11
- # rspec failure tracking
12
- .rspec_status
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,121 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- require:
4
- - 'rubocop-md'
5
- - 'rubocop-minitest'
6
- - 'rubocop-packaging'
7
- - 'rubocop-performance'
8
- - 'rubocop-rake'
9
- - 'rubocop-rspec'
10
- - 'rubocop-thread_safety'
11
-
12
- AllCops:
13
- NewCops: enable
14
- DisplayCopNames: true # Display the name of the failing cops
15
- TargetRubyVersion: 2.6 # Oldest non-EOL Ruby
16
-
17
- Gemspec/DateAssignment: # new in 1.10
18
- Enabled: true
19
- Layout/DotPosition:
20
- Enabled: true
21
- EnforcedStyle: trailing
22
- Layout/LineEndStringConcatenationIndentation: # new in 1.18
23
- Enabled: true
24
- Layout/SpaceBeforeBrackets: # new in 1.7
25
- Enabled: true
26
- Lint/AmbiguousAssignment: # new in 1.7
27
- Enabled: true
28
- Lint/AmbiguousOperatorPrecedence: # new in 1.21
29
- Enabled: true
30
- Lint/AmbiguousRange: # new in 1.19
31
- Enabled: true
32
- Lint/DeprecatedConstants: # new in 1.8
33
- Enabled: true
34
- Lint/DuplicateBranch: # new in 1.3
35
- Enabled: true
36
- Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
37
- Enabled: true
38
- Lint/EmptyBlock: # new in 1.1
39
- Enabled: true
40
- Lint/EmptyClass: # new in 1.3
41
- Enabled: true
42
- Lint/EmptyInPattern: # new in 1.16
43
- Enabled: true
44
- Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
45
- Enabled: true
46
- Lint/LambdaWithoutLiteralBlock: # new in 1.8
47
- Enabled: true
48
- Lint/NoReturnInBeginEndBlocks: # new in 1.2
49
- Enabled: true
50
- Lint/NumberedParameterAssignment: # new in 1.9
51
- Enabled: true
52
- Lint/OrAssignmentToConstant: # new in 1.9
53
- Enabled: true
54
- Lint/RedundantDirGlobSort: # new in 1.8
55
- Enabled: true
56
- Lint/RequireRelativeSelfPath: # new in 1.22
57
- Enabled: true
58
- Lint/SymbolConversion: # new in 1.9
59
- Enabled: true
60
- Lint/ToEnumArguments: # new in 1.1
61
- Enabled: true
62
- Lint/TripleQuotes: # new in 1.9
63
- Enabled: true
64
- Lint/UnexpectedBlockArity: # new in 1.5
65
- Enabled: true
66
- Lint/UnmodifiedReduceAccumulator: # new in 1.1
67
- Enabled: true
68
- Metrics/BlockLength:
69
- IgnoredMethods:
70
- - context
71
- - describe
72
- - it
73
- - shared_context
74
- - shared_examples
75
- - shared_examples_for
76
- Security/IoMethods: # new in 1.22
77
- Enabled: true
78
- Style/ArgumentsForwarding: # new in 1.1
79
- Enabled: true
80
- Style/CollectionCompact: # new in 1.2
81
- Enabled: true
82
- Style/DocumentDynamicEvalDefinition: # new in 1.1
83
- Enabled: true
84
- Style/EndlessMethod: # new in 1.8
85
- Enabled: true
86
- Style/HashConversion: # new in 1.10
87
- Enabled: true
88
- Style/HashExcept: # new in 1.7
89
- Enabled: true
90
- Style/IfWithBooleanLiteralBranches: # new in 1.9
91
- Enabled: true
92
- Style/InPatternThen: # new in 1.16
93
- Enabled: true
94
- Style/MultilineInPatternThen: # new in 1.16
95
- Enabled: true
96
- Style/NegatedIfElseCondition: # new in 1.2
97
- Enabled: true
98
- Style/NilLambda: # new in 1.3
99
- Enabled: true
100
- Style/NumberedParameters: # new in 1.22
101
- Enabled: true
102
- Style/NumberedParametersLimit: # new in 1.22
103
- Enabled: true
104
- Style/QuotedSymbols: # new in 1.16
105
- Enabled: true
106
- Style/RedundantArgument: # new in 1.4
107
- Enabled: true
108
- Style/RedundantSelfAssignmentBranch: # new in 1.19
109
- Enabled: true
110
- Style/SelectByRegexp: # new in 1.22
111
- Enabled: true
112
- Style/StringChars: # new in 1.12
113
- Enabled: true
114
- Style/StringLiterals:
115
- Enabled: true
116
- EnforcedStyle: double_quotes
117
- Style/StringLiteralsInInterpolation:
118
- Enabled: true
119
- EnforcedStyle: double_quotes
120
- Style/SwapValues: # new in 1.1
121
- Enabled: true
data/.rubocop_todo.yml DELETED
@@ -1,149 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2021-11-10 07:27:25 UTC using RuboCop version 1.22.3.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Configuration parameters: Include.
11
- # Include: **/*.gemspec
12
- Gemspec/RequiredRubyVersion:
13
- Exclude:
14
- - 'activerecord-transactionable.gemspec'
15
-
16
- # Offense count: 1
17
- # Configuration parameters: Include.
18
- # Include: **/*.gemspec
19
- Gemspec/RubyVersionGlobalsUsage:
20
- Exclude:
21
- - 'activerecord-transactionable.gemspec'
22
-
23
- # Offense count: 2
24
- # Cop supports --auto-correct.
25
- # Configuration parameters: Width, IgnoredPatterns.
26
- Layout/IndentationWidth:
27
- Exclude:
28
- - 'README.md'
29
-
30
- # Offense count: 5
31
- # Configuration parameters: AllowedMethods.
32
- # AllowedMethods: enums
33
- Lint/ConstantDefinitionInBlock:
34
- Exclude:
35
- - 'spec/activerecord/transactionable_spec.rb'
36
-
37
- # Offense count: 1
38
- Lint/MissingSuper:
39
- Exclude:
40
- - 'spec/config/active_record.rb'
41
-
42
- # Offense count: 6
43
- # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
44
- Metrics/AbcSize:
45
- Max: 32
46
-
47
- # Offense count: 1
48
- # Configuration parameters: IgnoredMethods.
49
- Metrics/CyclomaticComplexity:
50
- Max: 10
51
-
52
- # Offense count: 6
53
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
54
- Metrics/MethodLength:
55
- Max: 37
56
-
57
- # Offense count: 1
58
- # Configuration parameters: CountComments, CountAsOne.
59
- Metrics/ModuleLength:
60
- Max: 135
61
-
62
- # Offense count: 3
63
- # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
64
- Metrics/ParameterLists:
65
- Max: 8
66
-
67
- # Offense count: 1
68
- # Configuration parameters: IgnoredMethods.
69
- Metrics/PerceivedComplexity:
70
- Max: 12
71
-
72
- # Offense count: 1
73
- Packaging/GemspecGit:
74
- Exclude:
75
- - 'activerecord-transactionable.gemspec'
76
-
77
- # Offense count: 38
78
- # Configuration parameters: Prefixes.
79
- # Prefixes: when, with, without
80
- RSpec/ContextWording:
81
- Exclude:
82
- - 'spec/activerecord/transactionable_spec.rb'
83
-
84
- # Offense count: 1
85
- # Configuration parameters: CountAsOne.
86
- RSpec/ExampleLength:
87
- Max: 10
88
-
89
- # Offense count: 1
90
- # Configuration parameters: AssignmentOnly.
91
- RSpec/InstanceVariable:
92
- Exclude:
93
- - 'spec/activerecord/transactionable_spec.rb'
94
-
95
- # Offense count: 5
96
- RSpec/LeakyConstantDeclaration:
97
- Exclude:
98
- - 'spec/activerecord/transactionable_spec.rb'
99
-
100
- # Offense count: 48
101
- # Configuration parameters: .
102
- # SupportedStyles: have_received, receive
103
- RSpec/MessageSpies:
104
- EnforcedStyle: receive
105
-
106
- # Offense count: 27
107
- RSpec/MultipleExpectations:
108
- Max: 2
109
-
110
- # Offense count: 44
111
- # Configuration parameters: IgnoreSharedExamples.
112
- RSpec/NamedSubject:
113
- Exclude:
114
- - 'spec/activerecord/transactionable_spec.rb'
115
-
116
- # Offense count: 54
117
- RSpec/NestedGroups:
118
- Max: 8
119
-
120
- # Offense count: 5
121
- # Configuration parameters: AllowedConstants.
122
- Style/Documentation:
123
- Exclude:
124
- - '**/*.md'
125
- - '**/*.markdown'
126
- - 'lib/activerecord/transactionable.rb'
127
- - 'lib/activerecord/transactionable/result.rb'
128
- - 'spec/activerecord/transactionable_spec.rb'
129
- - 'spec/config/active_record.rb'
130
-
131
- # Offense count: 2
132
- # Configuration parameters: MinBodyLength.
133
- Style/GuardClause:
134
- Exclude:
135
- - 'README.md'
136
- - 'spec/activerecord/transactionable_spec.rb'
137
-
138
- # Offense count: 5
139
- ThreadSafety/InstanceVariableInClassMethod:
140
- Exclude:
141
- - 'spec/activerecord/transactionable_spec.rb'
142
-
143
- # Offense count: 70
144
- # Cop supports --auto-correct.
145
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
146
- # URISchemes: http, https
147
- # IgnoredPatterns: (?-mix:^\#)
148
- Layout/LineLength:
149
- Max: 278
data/.simplecov DELETED
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ruby_version = Gem::Version.new(RUBY_VERSION)
4
- actual_version = lambda do |major, minor|
5
- actual = Gem::Version.new(ruby_version)
6
- major == actual.segments[0] && minor == actual.segments[1] && RUBY_ENGINE == "ruby"
7
- end
8
- coverage = actual_version.call(2, 6)
9
-
10
- if coverage
11
- require "simplecov-cobertura"
12
- require "simplecov_json_formatter"
13
- require "codecov"
14
-
15
- SimpleCov.start do
16
- add_filter "/spec/"
17
- add_filter "/lib/activerecord/transactionable/version.rb"
18
-
19
- if ENV["CI"]
20
- # Disambiguate individual test runs
21
- command_name "#{ENV["GITHUB_WORKFLOW"]} Job #{ENV["GITHUB_RUN_ID"]}:#{ENV["GITHUB_RUN_NUMBER"]}"
22
- formatters = []
23
- formatters << SimpleCov::Formatter::HTMLFormatter
24
- formatters << SimpleCov::Formatter::CoberturaFormatter
25
- formatters << SimpleCov::Formatter::JSONFormatter # For CodeClimate
26
- formatters << SimpleCov::Formatter::Codecov # For CodeCov
27
- formatter SimpleCov::Formatter::MultiFormatter.new(formatters)
28
- else
29
- # Use default
30
- formatter SimpleCov::Formatter::HTMLFormatter
31
- end
32
-
33
- track_files "**/*.rb"
34
- end
35
- else
36
- puts "Not running coverage on #{RUBY_ENGINE} #{RUBY_VERSION}"
37
- end
data/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
-
7
- # Specify your gem's dependencies in activerecord-transactionable.gemspec
8
- gemspec
data/Rakefile DELETED
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- %w[
4
- bundler/gem_tasks
5
- rake/testtask
6
- rspec/core/rake_task
7
- fileutils
8
- ].each { |f| require f }
9
-
10
- Bundler::GemHelper.install_tasks
11
-
12
- RSpec::Core::RakeTask.new(:spec)
13
- desc "alias spec => test"
14
- task test: :spec
15
-
16
- begin
17
- require "rubocop/rake_task"
18
- RuboCop::RakeTask.new
19
- rescue LoadError
20
- task :rubocop do
21
- warn "RuboCop is disabled on Ruby #{RUBY_VERSION}"
22
- end
23
- end
24
-
25
- task default: %i[spec rubocop]
@@ -1,62 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- lib = File.expand_path("lib", __dir__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require "activerecord/transactionable/version"
6
-
7
- Gem::Specification.new do |spec|
8
- spec.name = "activerecord-transactionable"
9
- spec.version = Activerecord::Transactionable::VERSION
10
- spec.authors = ["Peter Boling"]
11
- spec.email = ["peter.boling@gmail.com"]
12
- spec.licenses = ["MIT"]
13
-
14
- spec.summary = "Do ActiveRecord transactions the right way."
15
- spec.description = "Getting transactions right is hard, and this gem makes it easier."
16
- spec.homepage = "http://www.railsbling.com/tags/activerecord-transactionable"
17
-
18
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
- spec.bindir = "exe"
20
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- spec.require_paths = ["lib"]
22
- spec.required_ruby_version = ">= 2.5.0"
23
-
24
- ruby_version = Gem::Version.new(RUBY_VERSION)
25
- minimum_version = ->(version) { ruby_version >= Gem::Version.new(version) && RUBY_ENGINE == "ruby" }
26
- actual_version = lambda do |major, minor|
27
- actual = Gem::Version.new(ruby_version)
28
- major == actual.segments[0] && minor == actual.segments[1] && RUBY_ENGINE == "ruby"
29
- end
30
- coverage = actual_version.call(2, 6)
31
- linting = minimum_version.call("2.6")
32
- stream = minimum_version.call("2.3")
33
-
34
- spec.add_dependency "activemodel", ">= 4.0.0"
35
- spec.add_dependency "activerecord", ">= 4.0.0"
36
-
37
- spec.add_development_dependency "byebug", "~> 11.1"
38
- spec.add_development_dependency "factory_bot", ">= 4.0"
39
- spec.add_development_dependency "rake", ">= 12.0"
40
- spec.add_development_dependency "rspec", "~> 3.10"
41
- spec.add_development_dependency "rspec-benchmark", "~> 0.6"
42
- spec.add_development_dependency "rspec-block_is_expected", "~> 1.0"
43
- spec.add_development_dependency "rspec-pending_for", "~> 0.1"
44
- spec.add_development_dependency "silent_stream", "~> 1.0" if stream
45
- if linting
46
- spec.add_development_dependency("rubocop", "~> 1.22")
47
- spec.add_development_dependency("rubocop-md", "~> 1.0")
48
- spec.add_development_dependency("rubocop-minitest", "~> 0.15")
49
- spec.add_development_dependency("rubocop-packaging", "~> 0.5")
50
- spec.add_development_dependency("rubocop-performance", "~> 1.11")
51
- spec.add_development_dependency("rubocop-rake", "~> 0.6")
52
- spec.add_development_dependency("rubocop-rspec", "~> 2.5")
53
- spec.add_development_dependency("rubocop-thread_safety", "~> 0.4")
54
- end
55
- if coverage
56
- spec.add_development_dependency("codecov", "~> 0.6")
57
- spec.add_development_dependency("simplecov", "~> 0.21")
58
- spec.add_development_dependency("simplecov-cobertura", "~> 1.4")
59
- end
60
- spec.add_development_dependency "sqlite3", "~> 1"
61
- spec.add_development_dependency "yard", ">= 0.9.20"
62
- end
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "activerecord/transactionable"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here