mongoid-locker 2.2.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/danger-comment.yml +19 -0
- data/.github/workflows/danger.yml +17 -14
- data/.github/workflows/lint.yml +29 -0
- data/.github/workflows/release.yml +30 -0
- data/.github/workflows/test.yml +78 -51
- data/.gitignore +1 -0
- data/.rspec +1 -0
- data/.rubocop.yml +137 -2
- data/.rubocop_todo.yml +106 -54
- data/.spellcheck.txt +78 -0
- data/CHANGELOG.md +18 -0
- data/Dangerfile +3 -1
- data/Gemfile +27 -7
- data/README.md +73 -23
- data/RELEASING.md +19 -51
- data/Rakefile +22 -3
- data/UPGRADING.md +4 -6
- data/lib/mongoid/locker/version.rb +1 -1
- data/lib/mongoid/locker.rb +12 -4
- data/mongoid-locker.gemspec +2 -3
- data/script/release.rb +17 -0
- metadata +13 -5
- data/.github/workflows/rubocop.yml +0 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 87d9c3f74f827716578524b7c0474e9f9416a4ed9cfb47936f1e8912abc22ee1
|
|
4
|
+
data.tar.gz: eb9789c962d8f8d92e68b741ad28e6dcc14de53ef9103bbedca64cb609e0cb4d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ced5f2ae291fd48046cfdaaa3a069f71f84bb0e0078496b19e27436d166214df2c440c12fa4d637c7d99ec0bba2c195563e8ee622e6f47485cbe8a5c31d6f10b
|
|
7
|
+
data.tar.gz: d1eaf77d238353b5fc6e27db763e89c3367aa95faab6d5cea9e4a4695f1e639281535c48d800920937b6ab1cf90c1d6cfeac45417bd0a3bc88f17ecfbcbf815e
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Danger Comment
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: [Danger]
|
|
6
|
+
types: [completed]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
actions: read
|
|
10
|
+
issues: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
comment:
|
|
15
|
+
name: Post Review Comment
|
|
16
|
+
uses: danger/danger-pr-comment/.github/workflows/danger-comment.yml@645e89bcc7be89ee7e8362166110b05cbced8e59 # v0.3.0
|
|
17
|
+
with:
|
|
18
|
+
base-branch: '*'
|
|
19
|
+
comment-empty: false
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
name: Danger
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, reopened, edited, synchronize]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
3
14
|
jobs:
|
|
4
15
|
danger:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- uses: ruby/setup-ruby@v1
|
|
11
|
-
with:
|
|
12
|
-
ruby-version: 2.7
|
|
13
|
-
bundler-cache: true
|
|
14
|
-
- run: |
|
|
15
|
-
# Personal access token for dangerpr-bot - public, but base64 encoded to avoid tripping up GitHub
|
|
16
|
-
TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
|
|
17
|
-
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
|
|
16
|
+
name: Review Pull Request
|
|
17
|
+
uses: danger/danger-pr-comment/.github/workflows/danger-run.yml@645e89bcc7be89ee7e8362166110b05cbced8e59 # v0.3.0
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: '3.4'
|
|
20
|
+
bundler-cache: true
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
name: Lint Code and Documentation
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
timeout-minutes: 10
|
|
20
|
+
steps:
|
|
21
|
+
- name: Check Out Code
|
|
22
|
+
uses: actions/checkout@v7
|
|
23
|
+
- name: Set Up Ruby
|
|
24
|
+
uses: ruby/setup-ruby@v1
|
|
25
|
+
with:
|
|
26
|
+
ruby-version: '4.0'
|
|
27
|
+
bundler-cache: true
|
|
28
|
+
- name: Run Lint
|
|
29
|
+
run: bundle exec rake lint
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
description: Optional release version overriding the checked-in version.
|
|
8
|
+
type: string
|
|
9
|
+
required: false
|
|
10
|
+
dry-run:
|
|
11
|
+
description: Check release prerequisites, such as RubyGems Trusted Publishing, without releasing.
|
|
12
|
+
type: boolean
|
|
13
|
+
default: false
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
release:
|
|
21
|
+
if: github.repository == 'mongoid/mongoid-locker' && github.ref == 'refs/heads/master'
|
|
22
|
+
uses: dblock/ruby-gem-release/.github/workflows/release.yml@v0.9.0
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: '3.3'
|
|
25
|
+
version: ${{ inputs.version }}
|
|
26
|
+
dry-run: ${{ inputs.dry-run }}
|
|
27
|
+
test: |
|
|
28
|
+
docker run --detach --name mongodb --publish 27017:27017 mongo:8.0
|
|
29
|
+
until docker exec mongodb mongosh --quiet --eval 'db.adminCommand({ping: 1})'; do sleep 1; done
|
|
30
|
+
bundle exec rake
|
data/.github/workflows/test.yml
CHANGED
|
@@ -1,63 +1,90 @@
|
|
|
1
1
|
name: Test
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
4
10
|
|
|
5
11
|
jobs:
|
|
12
|
+
sharding:
|
|
13
|
+
name: Sharded collections (MongoDB ${{ matrix.mongo }})
|
|
14
|
+
runs-on: ubuntu-22.04
|
|
15
|
+
timeout-minutes: 20
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
mongo: ['6.0', '8.0']
|
|
20
|
+
env:
|
|
21
|
+
SHARDED_MONGODB_URI: mongodb://localhost:27028/mongoid_locker_sharding_test
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v7
|
|
24
|
+
- uses: ruby/setup-ruby@v1
|
|
25
|
+
with:
|
|
26
|
+
ruby-version: '3.3'
|
|
27
|
+
bundler-cache: true
|
|
28
|
+
- name: Start sharded MongoDB
|
|
29
|
+
run: |
|
|
30
|
+
docker run -d --name locker-sharding -p 27028:27017 \
|
|
31
|
+
-v "$PWD/spec/integration/sharding/start.sh:/start.sh:ro" \
|
|
32
|
+
mongo:${{ matrix.mongo }} bash /start.sh
|
|
33
|
+
for _ in $(seq 1 60); do
|
|
34
|
+
if docker exec locker-sharding mongosh --quiet --eval 'if (db.adminCommand({listShards:1}).shards.length !== 1) throw new Error("Shard not ready")' >/dev/null 2>&1; then
|
|
35
|
+
exit 0
|
|
36
|
+
fi
|
|
37
|
+
sleep 2
|
|
38
|
+
done
|
|
39
|
+
docker logs locker-sharding
|
|
40
|
+
exit 1
|
|
41
|
+
- name: Run sharding integration tests
|
|
42
|
+
run: bundle exec rspec spec/integration/sharding
|
|
6
43
|
test:
|
|
7
|
-
|
|
8
44
|
strategy:
|
|
9
45
|
fail-fast: false
|
|
10
46
|
matrix:
|
|
11
|
-
|
|
12
|
-
- { ruby: '2.6
|
|
13
|
-
|
|
14
|
-
- { ruby: '
|
|
15
|
-
- { ruby: '
|
|
16
|
-
- { ruby: '
|
|
17
|
-
- { ruby: '3.0
|
|
18
|
-
- { ruby: '3.
|
|
19
|
-
- { ruby: '
|
|
20
|
-
- { ruby: '
|
|
21
|
-
- { ruby: '
|
|
22
|
-
- { ruby: '3.
|
|
23
|
-
- { ruby: '
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- { ruby: '3.1.3', mongo: 'mongo:7.0', mongoid: '8' }
|
|
29
|
-
- { ruby: '3.1.3', mongo: 'mongo:8.0', mongoid: '9' }
|
|
30
|
-
# - { ruby: 'jruby-9.4.13.0', mongo: 'mongo:8.0', mongoid: '8' }
|
|
31
|
-
experimental: [false]
|
|
32
|
-
|
|
33
|
-
name: test (ruby=${{ matrix.entry.ruby }}, mongo=${{ matrix.entry.mongo }}, mongoid=${{ matrix.entry.mongoid }})
|
|
34
|
-
runs-on: ubuntu-latest
|
|
35
|
-
|
|
36
|
-
continue-on-error: ${{ matrix.experimental }}
|
|
37
|
-
|
|
47
|
+
include:
|
|
48
|
+
- { ruby: '2.6', mongo: '4.4', mongoid: '5' }
|
|
49
|
+
- { ruby: 'jruby-9.4', mongo: '4.4', mongoid: '5' }
|
|
50
|
+
- { ruby: '2.7', mongo: '4.4', mongoid: '6' }
|
|
51
|
+
- { ruby: '3.1', mongo: '4.4', mongoid: '6' }
|
|
52
|
+
- { ruby: 'jruby-9.4', mongo: '4.4', mongoid: '6' }
|
|
53
|
+
- { ruby: '3.0', mongo: '4.4', mongoid: '7' }
|
|
54
|
+
- { ruby: '3.4', mongo: '4.4', mongoid: '7' }
|
|
55
|
+
- { ruby: '2.6', mongo: '6.0', mongoid: '8' }
|
|
56
|
+
- { ruby: '3.1', mongo: '7.0', mongoid: '8' }
|
|
57
|
+
- { ruby: '3.3', mongo: '7.0', mongoid: '9' }
|
|
58
|
+
- { ruby: '3.4', mongo: '8.0', mongoid: '9' }
|
|
59
|
+
- { ruby: '4.0', mongo: '7.0', mongoid: '8' }
|
|
60
|
+
- { ruby: '4.0', mongo: '8.0', mongoid: '9', coverage: 'true' }
|
|
61
|
+
name: test (ruby=${{ matrix.ruby }}, mongo=${{ matrix.mongo }}, mongoid=${{ matrix.mongoid }})
|
|
62
|
+
runs-on: ubuntu-22.04
|
|
63
|
+
timeout-minutes: 20
|
|
38
64
|
services:
|
|
39
65
|
mongo:
|
|
40
|
-
image:
|
|
41
|
-
ports: [
|
|
42
|
-
|
|
66
|
+
image: mongo:${{ matrix.mongo }}
|
|
67
|
+
ports: ['27017:27017']
|
|
68
|
+
options: >-
|
|
69
|
+
--health-cmd "mongosh --quiet --eval 'db.adminCommand({ping: 1})' || mongo --quiet --eval 'db.adminCommand({ping: 1})'"
|
|
70
|
+
--health-interval 10s
|
|
71
|
+
--health-timeout 5s
|
|
72
|
+
--health-retries 10
|
|
43
73
|
env:
|
|
44
|
-
MONGOID_VERSION: ${{ matrix.
|
|
45
|
-
COVERAGE: ${{ matrix.
|
|
46
|
-
|
|
74
|
+
MONGOID_VERSION: ${{ matrix.mongoid }}
|
|
75
|
+
COVERAGE: ${{ matrix.coverage }}
|
|
47
76
|
steps:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
env:
|
|
63
|
-
CC_TEST_REPORTER_ID: ${{ vars.CC_TEST_REPORTER_ID }}
|
|
77
|
+
- uses: actions/checkout@v7
|
|
78
|
+
- uses: ruby/setup-ruby@v1
|
|
79
|
+
with:
|
|
80
|
+
ruby-version: ${{ matrix.ruby }}
|
|
81
|
+
bundler-cache: true
|
|
82
|
+
- name: Run tests
|
|
83
|
+
run: bundle exec rspec
|
|
84
|
+
- name: Report coverage
|
|
85
|
+
if: ${{ matrix.coverage == 'true' }}
|
|
86
|
+
uses: coverallsapp/github-action@v2
|
|
87
|
+
with:
|
|
88
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
89
|
+
file: coverage/.resultset.json
|
|
90
|
+
format: simplecov
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
plugins:
|
|
2
|
+
- rubocop-md
|
|
3
|
+
- rubocop-prose
|
|
4
|
+
- rubocop-rake
|
|
5
|
+
- rubocop-rspec
|
|
6
|
+
- rubocop-spellcheck
|
|
7
|
+
- rubocop-yaml
|
|
8
|
+
|
|
9
|
+
inherit_from: ".rubocop_todo.yml"
|
|
10
|
+
|
|
11
|
+
AllCops:
|
|
12
|
+
SuggestExtensions: false
|
|
13
|
+
NewCops: enable
|
|
14
|
+
inherit_mode:
|
|
15
|
+
merge:
|
|
16
|
+
- Include
|
|
17
|
+
Include:
|
|
18
|
+
- ".github/**/*.yml"
|
|
19
|
+
- ".rubocop.yml"
|
|
20
|
+
Exclude:
|
|
21
|
+
- coverage/**/*
|
|
22
|
+
- pkg/**/*
|
|
23
|
+
- vendor/**/*
|
|
24
|
+
|
|
1
25
|
Lint/RaiseException:
|
|
2
26
|
Enabled: true
|
|
3
27
|
|
|
@@ -14,11 +38,122 @@ Style/HashTransformValues:
|
|
|
14
38
|
Enabled: true
|
|
15
39
|
|
|
16
40
|
RSpec/MultipleExpectations:
|
|
41
|
+
inherit_mode:
|
|
42
|
+
merge:
|
|
43
|
+
- Exclude
|
|
17
44
|
Enabled: false
|
|
45
|
+
Exclude:
|
|
46
|
+
- spec/release/release_spec.rb
|
|
18
47
|
|
|
19
48
|
RSpec/LeakyConstantDeclaration:
|
|
20
49
|
Enabled: false
|
|
21
50
|
|
|
22
|
-
|
|
51
|
+
YAML/Lint/InvalidSyntax:
|
|
52
|
+
Include:
|
|
53
|
+
- "**/*.yml"
|
|
54
|
+
- "**/*.yaml"
|
|
55
|
+
|
|
56
|
+
YAML/Lint/DuplicateKey:
|
|
57
|
+
Include:
|
|
58
|
+
- "**/*.yml"
|
|
59
|
+
- "**/*.yaml"
|
|
60
|
+
|
|
61
|
+
Naming/FileName:
|
|
62
|
+
inherit_mode:
|
|
63
|
+
merge:
|
|
64
|
+
- Exclude
|
|
65
|
+
Exclude:
|
|
66
|
+
- "**/*.md"
|
|
67
|
+
- ".github/workflows/*.yml"
|
|
68
|
+
- lib/mongoid-locker.rb
|
|
69
|
+
|
|
70
|
+
Style/OneClassPerFile:
|
|
71
|
+
inherit_mode:
|
|
72
|
+
merge:
|
|
73
|
+
- Exclude
|
|
74
|
+
Exclude:
|
|
75
|
+
- "**/*.md"
|
|
76
|
+
|
|
77
|
+
Style/Documentation:
|
|
78
|
+
inherit_mode:
|
|
79
|
+
merge:
|
|
80
|
+
- Exclude
|
|
81
|
+
Exclude:
|
|
82
|
+
- "**/*.md"
|
|
83
|
+
|
|
84
|
+
Lint/UselessAssignment:
|
|
85
|
+
inherit_mode:
|
|
86
|
+
merge:
|
|
87
|
+
- Exclude
|
|
88
|
+
Exclude:
|
|
89
|
+
- "**/*.md"
|
|
90
|
+
|
|
91
|
+
Style/MultilineBlockChain:
|
|
92
|
+
inherit_mode:
|
|
93
|
+
merge:
|
|
94
|
+
- Exclude
|
|
95
|
+
Exclude:
|
|
96
|
+
- "**/*.md"
|
|
97
|
+
|
|
98
|
+
Style/SymbolProc:
|
|
99
|
+
inherit_mode:
|
|
100
|
+
merge:
|
|
101
|
+
- Exclude
|
|
102
|
+
Exclude:
|
|
103
|
+
- "**/*.md"
|
|
104
|
+
|
|
105
|
+
Lint/Void:
|
|
106
|
+
inherit_mode:
|
|
107
|
+
merge:
|
|
108
|
+
- Exclude
|
|
109
|
+
Exclude:
|
|
110
|
+
- "**/*.md"
|
|
111
|
+
|
|
112
|
+
Markdown/HeadingCapitalization:
|
|
113
|
+
Enabled: true
|
|
114
|
+
Style: title_case
|
|
115
|
+
|
|
116
|
+
Prose/MaxLength:
|
|
117
|
+
Max: false
|
|
118
|
+
Exclude:
|
|
119
|
+
- LICENSE.txt
|
|
120
|
+
|
|
121
|
+
Spellcheck:
|
|
122
|
+
DictionaryFiles:
|
|
123
|
+
en:
|
|
124
|
+
- gem:rubocop-spellcheck/data/en/en.dic
|
|
125
|
+
- ".spellcheck.txt"
|
|
126
|
+
|
|
127
|
+
Spellcheck/Spelling:
|
|
128
|
+
Exclude:
|
|
129
|
+
- LICENSE.txt
|
|
130
|
+
|
|
131
|
+
Metrics/BlockLength:
|
|
132
|
+
inherit_mode:
|
|
133
|
+
merge:
|
|
134
|
+
- Exclude
|
|
135
|
+
Exclude:
|
|
136
|
+
- Gemfile
|
|
137
|
+
|
|
138
|
+
Layout/LineLength:
|
|
139
|
+
inherit_mode:
|
|
140
|
+
merge:
|
|
141
|
+
- Exclude
|
|
142
|
+
Exclude:
|
|
143
|
+
- ".github/workflows/*.yml"
|
|
144
|
+
|
|
145
|
+
# These shared contexts reset Mongoid::Locker's global configuration once per context.
|
|
146
|
+
RSpec/BeforeAfterAll:
|
|
147
|
+
inherit_mode:
|
|
148
|
+
merge:
|
|
149
|
+
- Exclude
|
|
150
|
+
Exclude:
|
|
151
|
+
- spec/support/configurations_shared_context.rb
|
|
23
152
|
|
|
24
|
-
|
|
153
|
+
# One release example verifies the tag, the next development commit, and their files together.
|
|
154
|
+
RSpec/ExampleLength:
|
|
155
|
+
inherit_mode:
|
|
156
|
+
merge:
|
|
157
|
+
- Exclude
|
|
158
|
+
Exclude:
|
|
159
|
+
- spec/release/release_spec.rb
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,114 +1,166 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
|
-
# `rubocop --auto-gen-config`
|
|
3
|
-
#
|
|
2
|
+
# `rubocop --auto-gen-config --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp`
|
|
3
|
+
# using RuboCop version 1.92.3.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
# Configuration parameters: Include.
|
|
11
|
-
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
|
12
|
-
Bundler/DuplicatedGem:
|
|
9
|
+
Gemspec/RequiredRubyVersion:
|
|
13
10
|
Exclude:
|
|
14
|
-
- '
|
|
11
|
+
- 'mongoid-locker.gemspec'
|
|
15
12
|
|
|
16
|
-
#
|
|
17
|
-
# Configuration parameters:
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
14
|
+
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
|
15
|
+
Layout/ExtraSpacing:
|
|
16
|
+
Exclude:
|
|
17
|
+
- 'spec/support/configurations_shared_context.rb'
|
|
18
|
+
|
|
19
|
+
# Configuration parameters: AllowedMethods.
|
|
20
|
+
# AllowedMethods: enums
|
|
21
|
+
Lint/ConstantDefinitionInBlock:
|
|
22
|
+
Exclude:
|
|
23
|
+
- 'spec/support/configurations_shared_context.rb'
|
|
24
|
+
- 'spec/test_examples_spec.rb'
|
|
20
25
|
|
|
21
|
-
#
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
# Configuration parameters: AllowComments, AllowEmptyLambdas.
|
|
27
|
+
Lint/EmptyBlock:
|
|
28
|
+
Exclude:
|
|
29
|
+
- 'spec/support/locker_is_included_shared_examples.rb'
|
|
30
|
+
|
|
31
|
+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
32
|
+
Metrics/AbcSize:
|
|
33
|
+
Exclude:
|
|
34
|
+
- 'lib/mongoid/locker.rb'
|
|
35
|
+
- 'lib/mongoid/locker/wrapper.rb'
|
|
26
36
|
|
|
27
|
-
#
|
|
28
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
|
37
|
+
# Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
29
38
|
Metrics/MethodLength:
|
|
30
|
-
|
|
39
|
+
Exclude:
|
|
40
|
+
- 'lib/mongoid/locker.rb'
|
|
41
|
+
- 'lib/mongoid/locker/wrapper.rb'
|
|
31
42
|
|
|
32
|
-
#
|
|
33
|
-
# Configuration parameters: CountComments.
|
|
43
|
+
# Configuration parameters: CountComments, Max, CountAsOne.
|
|
34
44
|
Metrics/ModuleLength:
|
|
35
|
-
|
|
45
|
+
Exclude:
|
|
46
|
+
- 'lib/mongoid/locker.rb'
|
|
36
47
|
|
|
37
|
-
#
|
|
38
|
-
#
|
|
48
|
+
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
|
49
|
+
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
|
|
39
50
|
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
|
40
51
|
Naming/FileName:
|
|
41
52
|
Exclude:
|
|
42
|
-
- 'lib/mongoid-locker.rb'
|
|
43
53
|
- 'spec/mongoid-locker_spec.rb'
|
|
44
54
|
|
|
45
|
-
#
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
|
|
55
|
+
# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
|
|
56
|
+
# AllowedMethods: call
|
|
57
|
+
# WaywardPredicates: infinite?, nonzero?
|
|
58
|
+
Naming/PredicateMethod:
|
|
59
|
+
Exclude:
|
|
60
|
+
- 'lib/mongoid/locker/wrapper.rb'
|
|
61
|
+
|
|
62
|
+
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
|
|
63
|
+
# NamePrefix: is_, has_, have_, does_
|
|
64
|
+
# ForbiddenPrefixes: is_, has_, have_, does_
|
|
49
65
|
# AllowedMethods: is_a?
|
|
50
66
|
# MethodDefinitionMacros: define_method, define_singleton_method
|
|
51
|
-
Naming/
|
|
67
|
+
Naming/PredicatePrefix:
|
|
52
68
|
Exclude:
|
|
53
|
-
- 'spec/**/*'
|
|
54
69
|
- 'lib/mongoid/locker.rb'
|
|
55
70
|
|
|
56
|
-
# Offense count: 2
|
|
57
71
|
RSpec/BeforeAfterAll:
|
|
58
72
|
Exclude:
|
|
59
|
-
- 'spec/spec_helper.rb'
|
|
60
|
-
- 'spec/rails_helper.rb'
|
|
61
|
-
- 'spec/support/**/*.rb'
|
|
62
73
|
- 'spec/test_examples_spec.rb'
|
|
63
74
|
|
|
64
|
-
#
|
|
75
|
+
# Configuration parameters: IgnoredMetadata.
|
|
65
76
|
RSpec/DescribeClass:
|
|
66
77
|
Exclude:
|
|
67
78
|
- 'spec/test_examples_spec.rb'
|
|
68
79
|
|
|
69
|
-
#
|
|
70
|
-
# Configuration parameters: Max.
|
|
80
|
+
# Configuration parameters: Max, CountAsOne.
|
|
71
81
|
RSpec/ExampleLength:
|
|
72
82
|
Exclude:
|
|
83
|
+
- 'spec/integration/mongoid-history/mongoid_history_spec.rb'
|
|
84
|
+
- 'spec/integration/sharding/mongoid/locker_spec.rb'
|
|
85
|
+
- 'spec/mongoid/locker_embedded_documents_spec.rb'
|
|
73
86
|
- 'spec/support/locker_is_included_shared_examples.rb'
|
|
74
87
|
- 'spec/test_examples_spec.rb'
|
|
75
88
|
|
|
76
|
-
#
|
|
77
|
-
|
|
78
|
-
RSpec/FilePath:
|
|
89
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
90
|
+
RSpec/IncludeExamples:
|
|
79
91
|
Exclude:
|
|
80
92
|
- 'spec/mongoid-locker_spec.rb'
|
|
93
|
+
- 'spec/support/locker_is_included_shared_examples.rb'
|
|
94
|
+
- 'spec/support/locker_methods_shared_examples.rb'
|
|
95
|
+
|
|
96
|
+
RSpec/LetSetup:
|
|
97
|
+
Exclude:
|
|
98
|
+
- 'spec/support/populate_database_shared_context.rb'
|
|
81
99
|
|
|
82
|
-
# Offense count: 12
|
|
83
100
|
# Configuration parameters: .
|
|
84
101
|
# SupportedStyles: have_received, receive
|
|
85
102
|
RSpec/MessageSpies:
|
|
86
103
|
EnforcedStyle: receive
|
|
87
104
|
|
|
88
|
-
#
|
|
105
|
+
# Configuration parameters: AllowSubject, Max.
|
|
106
|
+
RSpec/MultipleMemoizedHelpers:
|
|
107
|
+
Exclude:
|
|
108
|
+
- 'spec/mongoid-locker_spec.rb'
|
|
109
|
+
- 'spec/support/configurations_shared_context.rb'
|
|
110
|
+
- 'spec/support/errors_shared_examples.rb'
|
|
111
|
+
|
|
112
|
+
# Configuration parameters: AllowedPatterns.
|
|
113
|
+
# AllowedPatterns: ^expect_, ^assert_
|
|
114
|
+
RSpec/NoExpectationExample:
|
|
115
|
+
Exclude:
|
|
116
|
+
- 'spec/support/locker_is_included_shared_examples.rb'
|
|
117
|
+
|
|
118
|
+
RSpec/RemoveConst:
|
|
119
|
+
Exclude:
|
|
120
|
+
- 'spec/support/locker_helpers.rb'
|
|
121
|
+
|
|
122
|
+
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
|
|
123
|
+
# SupportedInflectors: default, active_support
|
|
124
|
+
RSpec/SpecFilePathFormat:
|
|
125
|
+
Exclude:
|
|
126
|
+
- 'spec/mongoid-locker_spec.rb'
|
|
127
|
+
|
|
89
128
|
RSpec/SubjectStub:
|
|
90
129
|
Exclude:
|
|
91
130
|
- 'spec/support/delegated_methods_shared_examples.rb'
|
|
92
131
|
|
|
93
|
-
#
|
|
132
|
+
# Configuration parameters: AllowedConstants.
|
|
94
133
|
Style/Documentation:
|
|
95
134
|
Exclude:
|
|
96
|
-
- 'spec/**/*'
|
|
97
|
-
- 'test/**/*'
|
|
98
135
|
- 'lib/mongoid/locker.rb'
|
|
99
136
|
|
|
100
|
-
#
|
|
101
|
-
#
|
|
102
|
-
|
|
137
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
138
|
+
# Configuration parameters: AllowSplatArgument.
|
|
139
|
+
Style/HashConversion:
|
|
140
|
+
Exclude:
|
|
141
|
+
- 'spec/support/locker_is_included_shared_examples.rb'
|
|
142
|
+
- 'spec/support/locker_methods_shared_examples.rb'
|
|
143
|
+
|
|
144
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
145
|
+
Style/IfUnlessModifier:
|
|
146
|
+
Exclude:
|
|
147
|
+
- 'spec/integration/sharding/mongoid/locker_spec.rb'
|
|
148
|
+
|
|
149
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
150
|
+
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
|
|
103
151
|
# SupportedStyles: predicate, comparison
|
|
104
152
|
Style/NumericPredicate:
|
|
105
153
|
Exclude:
|
|
106
|
-
- 'spec/**/*'
|
|
107
154
|
- 'lib/mongoid/locker.rb'
|
|
108
155
|
|
|
109
|
-
#
|
|
110
|
-
#
|
|
111
|
-
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
|
156
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
157
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
112
158
|
# URISchemes: http, https
|
|
159
|
+
# AllowedPatterns: (?-mix:^\#)
|
|
113
160
|
Layout/LineLength:
|
|
114
|
-
|
|
161
|
+
Exclude:
|
|
162
|
+
- 'lib/mongoid/locker.rb'
|
|
163
|
+
- 'lib/mongoid/locker/wrapper.rb'
|
|
164
|
+
- 'mongoid-locker.gemspec'
|
|
165
|
+
- 'spec/integration/sharding/mongoid/locker_spec.rb'
|
|
166
|
+
- 'spec/test_examples_spec.rb'
|