mongoid-history 0.8.5 → 0.9.0

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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +1 -1
  3. data/.document +5 -5
  4. data/.github/workflows/danger-comment.yml +11 -0
  5. data/.github/workflows/danger.yml +13 -0
  6. data/.github/workflows/test.yml +49 -72
  7. data/.gitignore +46 -46
  8. data/.rspec +2 -2
  9. data/.rubocop.yml +6 -6
  10. data/.rubocop_todo.yml +169 -99
  11. data/CHANGELOG.md +175 -173
  12. data/CONTRIBUTING.md +117 -117
  13. data/Dangerfile +3 -1
  14. data/Gemfile +69 -49
  15. data/LICENSE.txt +20 -20
  16. data/README.md +639 -609
  17. data/RELEASING.md +50 -66
  18. data/Rakefile +24 -24
  19. data/UPGRADING.md +53 -53
  20. data/lib/mongoid/history/attributes/base.rb +72 -72
  21. data/lib/mongoid/history/attributes/create.rb +47 -45
  22. data/lib/mongoid/history/attributes/destroy.rb +38 -34
  23. data/lib/mongoid/history/attributes/update.rb +104 -104
  24. data/lib/mongoid/history/options.rb +185 -177
  25. data/lib/mongoid/history/trackable.rb +597 -588
  26. data/lib/mongoid/history/tracker.rb +254 -247
  27. data/lib/mongoid/history/version.rb +5 -5
  28. data/lib/mongoid/history.rb +74 -77
  29. data/lib/mongoid-history.rb +1 -1
  30. data/mongoid-history.gemspec +25 -25
  31. data/perf/benchmark_modified_attributes_for_create.rb +68 -65
  32. data/perf/gc_suite.rb +21 -21
  33. data/spec/integration/embedded_in_polymorphic_spec.rb +112 -112
  34. data/spec/integration/integration_spec.rb +989 -976
  35. data/spec/integration/multi_relation_spec.rb +47 -47
  36. data/spec/integration/multiple_trackers_spec.rb +68 -68
  37. data/spec/integration/nested_embedded_documents_spec.rb +64 -64
  38. data/spec/integration/nested_embedded_documents_tracked_in_parent_spec.rb +124 -124
  39. data/spec/integration/nested_embedded_polymorphic_documents_spec.rb +115 -115
  40. data/spec/integration/subclasses_spec.rb +47 -47
  41. data/spec/integration/track_history_order_spec.rb +84 -84
  42. data/spec/integration/validation_failure_spec.rb +76 -76
  43. data/spec/spec_helper.rb +33 -32
  44. data/spec/support/error_helpers.rb +7 -7
  45. data/spec/support/mongoid.rb +15 -11
  46. data/spec/support/mongoid_history.rb +12 -12
  47. data/spec/unit/attributes/base_spec.rb +141 -141
  48. data/spec/unit/attributes/create_spec.rb +342 -342
  49. data/spec/unit/attributes/destroy_spec.rb +235 -228
  50. data/spec/unit/attributes/update_spec.rb +387 -342
  51. data/spec/unit/callback_options_spec.rb +165 -165
  52. data/spec/unit/embedded_methods_spec.rb +87 -87
  53. data/spec/unit/history_spec.rb +58 -58
  54. data/spec/unit/my_instance_methods_spec.rb +575 -555
  55. data/spec/unit/options_spec.rb +377 -365
  56. data/spec/unit/singleton_methods_spec.rb +406 -406
  57. data/spec/unit/store/default_store_spec.rb +11 -11
  58. data/spec/unit/store/request_store_spec.rb +13 -13
  59. data/spec/unit/trackable_spec.rb +1065 -1057
  60. data/spec/unit/tracker_spec.rb +191 -190
  61. metadata +15 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b67b16c71da971d65e59f55d4cca0a8200adef185bb57bb21392d7f18bc0d510
4
- data.tar.gz: 111c75120df8aae5b5fb70b2a9e15df04d85aa8c469dca1798cc2b3679065d0a
3
+ metadata.gz: 6c399a08313f9f4e251ae699a6fa70d39567d59e470549ab8027d26458e558fb
4
+ data.tar.gz: 9f7dcd2100eae22caf54150d6841ab3a279c223ac552296cfee9b4eab4aaa27c
5
5
  SHA512:
6
- metadata.gz: 17aeb35a1db7f39b3bf888d837f09f2390f77f5713df0a3c3027b7689631f9cac13f671d111ab95a476161348c1fd18494de6acc461d48339c4001d747e24a15
7
- data.tar.gz: 7bd7e59b6c37dbf4d9fa1c559a35a1afe1ca59feb2048413e89f85353493fe7e431fb57a4d9b595d1eb6ab70f78e4544f528edf90aace350426c327c1568bc54
6
+ metadata.gz: 0c1a652bf3e510712faa0083217c2ed84d98b0247c76aa7f1cf8a2e2b4acbd74a985118fcd7aee4625c4ac1bec713d604d9b125f880188fe16d17c44cb7d9a24
7
+ data.tar.gz: 80ab4e6428a119d8f814dc1d4a254da13e2fc38ba006ea1707cd77fc2e08c1a3b472f6d94574ca44fbeceee47bc1063f30ee3a59bfd072142acd7b49836366b6
data/.coveralls.yml CHANGED
@@ -1 +1 @@
1
- service_name: travis-ci
1
+ service_name: travis-ci
data/.document CHANGED
@@ -1,5 +1,5 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
@@ -0,0 +1,11 @@
1
+ name: Danger Comment
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: [Danger]
6
+ types: [completed]
7
+
8
+ jobs:
9
+ comment:
10
+ uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@v0.1.0
11
+ secrets: inherit
@@ -0,0 +1,13 @@
1
+ name: Danger
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, reopened, edited, synchronize]
6
+
7
+ jobs:
8
+ danger:
9
+ uses: numbata/danger-pr-comment/.github/workflows/danger-run.yml@v0.1.0
10
+ secrets: inherit
11
+ with:
12
+ ruby-version: '3.4'
13
+ bundler-cache: true
@@ -1,72 +1,49 @@
1
- name: CI RSpec Test
2
-
3
- on: [push, pull_request]
4
-
5
- jobs:
6
- build:
7
- name: >-
8
- ${{ matrix.ruby }}
9
- env:
10
- CI: true
11
- TESTOPTS: -v
12
- runs-on: ubuntu-latest
13
- continue-on-error: ${{ matrix.experimental }}
14
- strategy:
15
- fail-fast: true
16
- matrix:
17
- ruby: [2.5, 2.6, 2.7, 3.0, jruby] # truffleruby
18
- mongoid: [7]
19
- experimental: [false]
20
- include:
21
- - ruby: 2.3
22
- mongoid: 3
23
- experimental: false
24
- - ruby: 2.4
25
- mongoid: 4
26
- experimental: false
27
- - ruby: 2.5
28
- mongoid: 5
29
- experimental: false
30
- - ruby: 2.6
31
- mongoid: 6
32
- experimental: false
33
- - ruby: 2.7
34
- mongoid: 7.0
35
- experimental: false
36
- - ruby: 2.7
37
- mongoid: 7.1
38
- experimental: false
39
- - ruby: 2.7
40
- mongoid: 7.2
41
- experimental: false
42
- - ruby: 2.7
43
- mongoid: 7.3
44
- experimental: false
45
- - ruby: head
46
- mongoid: 7
47
- experimental: true
48
- - ruby: jruby-head
49
- mongoid: 7
50
- experimental: true
51
- # - ruby: truffleruby-head
52
- # mongoid: 7
53
- # experimental: true
54
- steps:
55
- - name: repo checkout
56
- uses: actions/checkout@v2
57
- - name: start mongodb
58
- uses: supercharge/mongodb-github-action@1.6.0
59
- with:
60
- mongodb-version: 4.4
61
- mongodb-replica-set: rs0
62
- - name: load ruby
63
- uses: ruby/setup-ruby@v1
64
- with:
65
- ruby-version: ${{ matrix.ruby }}
66
- bundler: 2
67
- - name: bundle install
68
- run: bundle install --jobs 4 --retry 3
69
- - name: test
70
- timeout-minutes: 10
71
- run: bundle exec rake spec
72
- continue-on-error: ${{ matrix.experimental }}
1
+ name: CI RSpec Test
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ name: test (ruby=${{ matrix.ruby }}, mongoid=${{ matrix.mongoid }}, mongodb=${{ matrix.mongodb }})
8
+ runs-on: ubuntu-22.04
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ include:
13
+ - { ruby: '2.3', mongoid: '3', mongodb: '4.4' }
14
+ - { ruby: '2.4', mongoid: '4', mongodb: '4.4' }
15
+ - { ruby: '2.5', mongoid: '5', mongodb: '4.4' }
16
+ - { ruby: '2.6', mongoid: '6', mongodb: '4.4' }
17
+ - { ruby: '2.5', mongoid: '7', mongodb: '4.4' }
18
+ - { ruby: '2.6', mongoid: '7', mongodb: '4.4' }
19
+ - { ruby: '2.7', mongoid: '7.0', mongodb: '4.4' }
20
+ - { ruby: '2.7', mongoid: '7.1', mongodb: '4.4' }
21
+ - { ruby: '2.7', mongoid: '7.2', mongodb: '4.4' }
22
+ - { ruby: '2.7', mongoid: '7.3', mongodb: '4.4' }
23
+ - { ruby: '3.0', mongoid: '7', mongodb: '4.4' }
24
+ - { ruby: 'jruby-9.4', mongoid: '7', mongodb: '4.4' }
25
+ - { ruby: '3.2', mongoid: '8', mongodb: '6.0' }
26
+ - { ruby: '3.3', mongoid: '9', mongodb: '7.0' }
27
+ - { ruby: '3.4', mongoid: '9', mongodb: '8.0' }
28
+ - { ruby: '4.0', mongoid: '9', mongodb: '8.0' }
29
+ services:
30
+ mongodb:
31
+ image: mongo:${{ matrix.mongodb }}
32
+ ports: ['27017:27017']
33
+ options: >-
34
+ --health-cmd "mongosh --quiet --eval 'db.adminCommand({ping: 1})' || mongo --quiet --eval 'db.adminCommand({ping: 1})'"
35
+ --health-interval 10s
36
+ --health-timeout 5s
37
+ --health-retries 10
38
+ env:
39
+ MONGOID_VERSION: ${{ matrix.mongoid }}
40
+ steps:
41
+ - uses: actions/checkout@v7
42
+ - uses: ruby/setup-ruby@v1
43
+ with:
44
+ ruby-version: ${{ matrix.ruby }}
45
+ bundler-cache: true
46
+ cache-version: psych-compatible
47
+ - name: Run tests
48
+ timeout-minutes: 10
49
+ run: bundle exec rspec
data/.gitignore CHANGED
@@ -1,46 +1,46 @@
1
- Gemfile.lock
2
-
3
- .rvmrc
4
-
5
- # rcov generated
6
- coverage
7
-
8
- # rdoc generated
9
- rdoc
10
-
11
- # yard generated
12
- doc
13
- .yardoc
14
-
15
- # bundler
16
- .bundle
17
-
18
- # jeweler generated
19
- pkg
20
-
21
- # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
22
- #
23
- # * Create a file at ~/.gitignore
24
- # * Include files you want ignored
25
- # * Run: git config --global core.excludesfile ~/.gitignore
26
- #
27
- # After doing this, these files will be ignored in all your git projects,
28
- # saving you from having to 'pollute' every project you touch with them
29
- #
30
- # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
31
- #
32
- # For MacOS:
33
- #
34
- #.DS_Store
35
- #
36
- # For TextMate
37
- #*.tmproj
38
- #tmtags
39
- #
40
- # For emacs:
41
- #*~
42
- #\#*
43
- #.\#*
44
- #
45
- # For vim:
46
- #*.swp
1
+ Gemfile.lock
2
+
3
+ .rvmrc
4
+
5
+ # rcov generated
6
+ coverage
7
+
8
+ # rdoc generated
9
+ rdoc
10
+
11
+ # yard generated
12
+ doc
13
+ .yardoc
14
+
15
+ # bundler
16
+ .bundle
17
+
18
+ # jeweler generated
19
+ pkg
20
+
21
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
22
+ #
23
+ # * Create a file at ~/.gitignore
24
+ # * Include files you want ignored
25
+ # * Run: git config --global core.excludesfile ~/.gitignore
26
+ #
27
+ # After doing this, these files will be ignored in all your git projects,
28
+ # saving you from having to 'pollute' every project you touch with them
29
+ #
30
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
31
+ #
32
+ # For MacOS:
33
+ #
34
+ #.DS_Store
35
+ #
36
+ # For TextMate
37
+ #*.tmproj
38
+ #tmtags
39
+ #
40
+ # For emacs:
41
+ #*~
42
+ #\#*
43
+ #.\#*
44
+ #
45
+ # For vim:
46
+ #*.swp
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --color
2
- --format=documentation
1
+ --color
2
+ --format=documentation
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
- AllCops:
2
- Exclude:
3
- - vendor/**/*
4
- - bin/**/*
5
-
6
- inherit_from: .rubocop_todo.yml
1
+ AllCops:
2
+ Exclude:
3
+ - vendor/**/*
4
+ - bin/**/*
5
+
6
+ inherit_from: .rubocop_todo.yml
data/.rubocop_todo.yml CHANGED
@@ -1,99 +1,169 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2020-04-10 17:25:32 -0500 using RuboCop version 0.48.1.
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: 7
10
- # Configuration parameters: Include.
11
- # Include: **/Gemfile, **/gems.rb
12
- Bundler/DuplicatedGem:
13
- Exclude:
14
- - 'Gemfile'
15
-
16
- # Offense count: 3
17
- Lint/HandleExceptions:
18
- Exclude:
19
- - 'spec/unit/trackable_spec.rb'
20
-
21
- # Offense count: 3
22
- Lint/ParenthesesAsGroupedExpression:
23
- Exclude:
24
- - 'spec/integration/integration_spec.rb'
25
- - 'spec/integration/nested_embedded_polymorphic_documents_spec.rb'
26
-
27
- # Offense count: 22
28
- Metrics/AbcSize:
29
- Max: 52
30
-
31
- # Offense count: 122
32
- # Configuration parameters: CountComments, ExcludedMethods.
33
- Metrics/BlockLength:
34
- Max: 900
35
-
36
- # Offense count: 1
37
- # Configuration parameters: CountComments.
38
- Metrics/ClassLength:
39
- Max: 120
40
-
41
- # Offense count: 6
42
- Metrics/CyclomaticComplexity:
43
- Max: 13
44
-
45
- # Offense count: 412
46
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
47
- # URISchemes: http, https
48
- Metrics/LineLength:
49
- Max: 688
50
-
51
- # Offense count: 17
52
- # Configuration parameters: CountComments.
53
- Metrics/MethodLength:
54
- Max: 23
55
-
56
- # Offense count: 2
57
- # Configuration parameters: CountComments.
58
- Metrics/ModuleLength:
59
- Max: 200
60
-
61
- # Offense count: 6
62
- Metrics/PerceivedComplexity:
63
- Max: 15
64
-
65
- # Offense count: 15
66
- Style/Documentation:
67
- Exclude:
68
- - 'spec/**/*'
69
- - 'test/**/*'
70
- - 'lib/mongoid/history.rb'
71
- - 'lib/mongoid/history/attributes/base.rb'
72
- - 'lib/mongoid/history/attributes/create.rb'
73
- - 'lib/mongoid/history/attributes/destroy.rb'
74
- - 'lib/mongoid/history/attributes/update.rb'
75
- - 'lib/mongoid/history/options.rb'
76
- - 'lib/mongoid/history/trackable.rb'
77
- - 'lib/mongoid/history/tracker.rb'
78
- - 'perf/benchmark_modified_attributes_for_create.rb'
79
- - 'perf/gc_suite.rb'
80
-
81
- # Offense count: 3
82
- # Cop supports --auto-correct.
83
- Style/EachWithObject:
84
- Exclude:
85
- - 'lib/mongoid/history/trackable.rb'
86
- - 'lib/mongoid/history/tracker.rb'
87
-
88
- # Offense count: 2
89
- # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
90
- # 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
91
- Style/FileName:
92
- Exclude:
93
- - 'Dangerfile'
94
- - 'lib/mongoid-history.rb'
95
-
96
- # Offense count: 1
97
- Style/MultilineBlockChain:
98
- Exclude:
99
- - 'lib/mongoid/history/tracker.rb'
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2025-12-31 23:05:04 UTC using RuboCop version 1.82.1.
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
+ Gemspec/RequiredRubyVersion:
11
+ Exclude:
12
+ - 'mongoid-history.gemspec'
13
+
14
+ # Offense count: 1
15
+ # This cop supports safe autocorrection (--autocorrect).
16
+ # Configuration parameters: EnforcedStyleAlignWith.
17
+ # SupportedStylesAlignWith: either, start_of_block, start_of_line
18
+ Layout/BlockAlignment:
19
+ Exclude:
20
+ - 'lib/mongoid/history/tracker.rb'
21
+
22
+ # Offense count: 170
23
+ # Configuration parameters: AllowedMethods.
24
+ # AllowedMethods: enums
25
+ Lint/ConstantDefinitionInBlock:
26
+ Enabled: false
27
+
28
+ # Offense count: 1
29
+ # This cop supports unsafe autocorrection (--autocorrect-all).
30
+ Lint/NonDeterministicRequireOrder:
31
+ Exclude:
32
+ - 'spec/spec_helper.rb'
33
+
34
+ # Offense count: 21
35
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
36
+ Metrics/AbcSize:
37
+ Max: 51
38
+
39
+ # Offense count: 129
40
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
41
+ # AllowedMethods: refine
42
+ Metrics/BlockLength:
43
+ Max: 874
44
+
45
+ # Offense count: 1
46
+ # Configuration parameters: CountComments, CountAsOne.
47
+ Metrics/ClassLength:
48
+ Max: 127
49
+
50
+ # Offense count: 10
51
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
52
+ Metrics/CyclomaticComplexity:
53
+ Max: 15
54
+
55
+ # Offense count: 18
56
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
57
+ Metrics/MethodLength:
58
+ Max: 24
59
+
60
+ # Offense count: 2
61
+ # Configuration parameters: CountComments, CountAsOne.
62
+ Metrics/ModuleLength:
63
+ Max: 199
64
+
65
+ # Offense count: 9
66
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
67
+ Metrics/PerceivedComplexity:
68
+ Max: 16
69
+
70
+ # Offense count: 1
71
+ # Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
72
+ # CheckDefinitionPathHierarchyRoots: lib, spec, test, src
73
+ # 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
74
+ Naming/FileName:
75
+ Exclude:
76
+ - 'Rakefile.rb'
77
+ - 'lib/mongoid-history.rb'
78
+
79
+ # Offense count: 3
80
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
81
+ # SupportedStyles: snake_case, normalcase, non_integer
82
+ # AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
83
+ Naming/VariableNumber:
84
+ Exclude:
85
+ - 'spec/unit/my_instance_methods_spec.rb'
86
+ - 'spec/unit/tracker_spec.rb'
87
+
88
+ # Offense count: 6
89
+ # This cop supports unsafe autocorrection (--autocorrect-all).
90
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
91
+ # AllowedMethods: ==, equal?, eql?
92
+ Style/ClassEqualityComparison:
93
+ Exclude:
94
+ - 'lib/mongoid/history/attributes/base.rb'
95
+ - 'lib/mongoid/history/options.rb'
96
+ - 'perf/benchmark_modified_attributes_for_create.rb'
97
+
98
+ # Offense count: 15
99
+ # Configuration parameters: AllowedConstants.
100
+ Style/Documentation:
101
+ Exclude:
102
+ - 'spec/**/*'
103
+ - 'test/**/*'
104
+ - 'lib/mongoid/history.rb'
105
+ - 'lib/mongoid/history/attributes/base.rb'
106
+ - 'lib/mongoid/history/attributes/create.rb'
107
+ - 'lib/mongoid/history/attributes/destroy.rb'
108
+ - 'lib/mongoid/history/attributes/update.rb'
109
+ - 'lib/mongoid/history/options.rb'
110
+ - 'lib/mongoid/history/trackable.rb'
111
+ - 'lib/mongoid/history/tracker.rb'
112
+ - 'perf/benchmark_modified_attributes_for_create.rb'
113
+ - 'perf/gc_suite.rb'
114
+
115
+ # Offense count: 44
116
+ # This cop supports unsafe autocorrection (--autocorrect-all).
117
+ # Configuration parameters: EnforcedStyle.
118
+ # SupportedStyles: always, always_true, never
119
+ Style/FrozenStringLiteralComment:
120
+ Enabled: false
121
+
122
+ # Offense count: 1
123
+ # This cop supports unsafe autocorrection (--autocorrect-all).
124
+ # Configuration parameters: AllowedReceivers.
125
+ # AllowedReceivers: Thread.current
126
+ Style/HashEachMethods:
127
+ Exclude:
128
+ - 'lib/mongoid/history/tracker.rb'
129
+
130
+ # Offense count: 1
131
+ # This cop supports unsafe autocorrection (--autocorrect-all).
132
+ Style/HashTransformValues:
133
+ Exclude:
134
+ - 'perf/benchmark_modified_attributes_for_create.rb'
135
+
136
+ # Offense count: 4
137
+ # This cop supports safe autocorrection (--autocorrect).
138
+ Style/IfUnlessModifier:
139
+ Exclude:
140
+ - 'lib/mongoid/history/trackable.rb'
141
+
142
+ # Offense count: 2
143
+ Style/MultilineBlockChain:
144
+ Exclude:
145
+ - 'lib/mongoid/history/tracker.rb'
146
+ - 'perf/benchmark_modified_attributes_for_create.rb'
147
+
148
+ # Offense count: 2
149
+ # This cop supports unsafe autocorrection (--autocorrect-all).
150
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
151
+ # AllowedMethods: present?, blank?, presence, try, try!
152
+ Style/SafeNavigation:
153
+ Exclude:
154
+ - 'lib/mongoid/history/trackable.rb'
155
+
156
+ # Offense count: 2
157
+ # This cop supports unsafe autocorrection (--autocorrect-all).
158
+ # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
159
+ # AllowedMethods: define_method
160
+ Style/SymbolProc:
161
+ Exclude:
162
+ - 'spec/unit/callback_options_spec.rb'
163
+
164
+ # Offense count: 9
165
+ # This cop supports safe autocorrection (--autocorrect).
166
+ # Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
167
+ # URISchemes: http, https
168
+ Layout/LineLength:
169
+ Max: 688