mongoid_fulltext 0.8.0 → 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 (57) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/danger-comment.yml +19 -0
  3. data/.github/workflows/danger.yml +21 -0
  4. data/.github/workflows/lint.yml +29 -0
  5. data/.github/workflows/release.yml +30 -0
  6. data/.github/workflows/test.yml +81 -0
  7. data/.gitignore +2 -0
  8. data/.rubocop.yml +149 -3
  9. data/.rubocop_todo.yml +131 -51
  10. data/.spellcheck.txt +181 -0
  11. data/CHANGELOG.md +57 -31
  12. data/Dangerfile +5 -1
  13. data/Gemfile +22 -18
  14. data/Gemfile.danger +5 -0
  15. data/README.md +171 -179
  16. data/RELEASING.md +60 -0
  17. data/Rakefile +21 -3
  18. data/UPGRADING.md +43 -0
  19. data/lib/mongoid/full_text_search/field_scores.rb +48 -0
  20. data/lib/mongoid/full_text_search/index_definition.rb +31 -0
  21. data/lib/mongoid/full_text_search/indexable.rb +1 -1
  22. data/lib/mongoid/full_text_search/indexes.rb +1 -1
  23. data/lib/mongoid/full_text_search/ngrams.rb +93 -0
  24. data/lib/mongoid/full_text_search/version.rb +1 -1
  25. data/lib/mongoid/full_text_search.rb +112 -144
  26. data/mongoid_fulltext.gemspec +4 -4
  27. data/script/release.rb +13 -0
  28. data/spec/models/chinese_artwork.rb +7 -0
  29. data/spec/models/filtered_artist.rb +1 -2
  30. data/spec/models/filtered_artwork.rb +1 -2
  31. data/spec/models/filtered_other.rb +1 -2
  32. data/spec/models/localized_artwork.rb +29 -0
  33. data/spec/models/multilingual_artwork.rb +7 -0
  34. data/spec/models/partitioned_artist.rb +1 -1
  35. data/spec/models/russian_artwork.rb +1 -2
  36. data/spec/models/scoped_artwork.rb +14 -0
  37. data/spec/models/tagged_artwork.rb +9 -0
  38. data/spec/models/weighted_artwork.rb +34 -0
  39. data/spec/mongoid/array_fields_spec.rb +43 -0
  40. data/spec/mongoid/bulk_indexing_spec.rb +56 -0
  41. data/spec/mongoid/candidate_limits_spec.rb +19 -0
  42. data/spec/mongoid/criteria_search_spec.rb +73 -0
  43. data/spec/mongoid/full_text_search_spec.rb +41 -12
  44. data/spec/mongoid/localized_fields_spec.rb +197 -0
  45. data/spec/mongoid/ngram_sampling_spec.rb +55 -0
  46. data/spec/mongoid/non_latin_spec.rb +50 -0
  47. data/spec/mongoid/timeout_option_spec.rb +18 -0
  48. data/spec/mongoid/weighted_fields_spec.rb +102 -0
  49. data/spec/release/release_spec.rb +60 -0
  50. data/spec/spec_helper.rb +22 -7
  51. data/spec/support/mongoid.rb +6 -4
  52. data/spec/unit/field_scores_spec.rb +54 -0
  53. data/spec/unit/index_definition_spec.rb +48 -0
  54. data/spec/unit/ngrams_spec.rb +73 -0
  55. data/spec/version_spec.rb +7 -0
  56. metadata +62 -11
  57. data/.travis.yml +0 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 424bedb9121315f16c39308131cf6a9611b0ce1f
4
- data.tar.gz: 62c8a5bb13b1367dd238114b275d9e3648a7672a
2
+ SHA256:
3
+ metadata.gz: f9138faa10a45309c1ed9e46292b5fe6ff2ce1c3ef5daa3a8694cc27d3de2e8b
4
+ data.tar.gz: 6eaa26fee38b089e1e830aee75970b5733e31e4edac19d164e232db7b89cd326
5
5
  SHA512:
6
- metadata.gz: ff22fc634046b8408da5f2e6bbcb4825092785f1d6ebce3f60ade99d97de28318ca050c1d1a9740a55bf2343e626b31cf4e09ea617e1e7952526b072623a67d1
7
- data.tar.gz: c80cc59816cee90f221c5d8e677cd087c6d76a7082eb8add87186a08836e08071fae3d2d9d733e6230e75b413856546aeca54637090605be927bf0564f13c9cb
6
+ metadata.gz: ea7490ba4ae8c0b07d5861c74b200b9e7ac0310d391bf77c05dbec5c49ec8d96e83a88e54992e5e52c949a59254d7978a6a31e6dcaedcfc7b382d4649a0b6f29
7
+ data.tar.gz: add245fc0c1424bc31247f1e6d03f749f9c8894eca6d092be99b9a32aa99fd0e49ce7974cfed3a12c33b3859d9f028b507f59cbe5da305564125e181d3acb789
@@ -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
@@ -0,0 +1,21 @@
1
+ name: Danger
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
+
14
+ jobs:
15
+ danger:
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
21
+ gemfile: Gemfile.danger
@@ -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_fulltext' && 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
+ timeout 60 bash -c 'until docker exec mongodb mongosh --quiet --eval "db.adminCommand({ping: 1})"; do sleep 1; done'
30
+ bundle exec rake
@@ -0,0 +1,81 @@
1
+ name: Test
2
+
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' }}
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ test:
16
+ name: Ruby ${{ matrix.ruby }} / Mongoid ${{ matrix.mongoid }} / MongoDB ${{ matrix.mongodb }}
17
+ runs-on: ubuntu-22.04
18
+ timeout-minutes: 15
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ include:
23
+ - { ruby: '2.1.9', mongoid: '~> 3.0.0', mongodb: '3.6', bundler: '1.17.3' }
24
+ - { ruby: '2.3.8', mongoid: '~> 3.1.0', mongodb: '3.6', bundler: '2.3.26', coverage: true }
25
+ - { ruby: '2.3.8', mongoid: '4', mongodb: '3.6', bundler: '2.3.26' }
26
+ - { ruby: '2.3.8', mongoid: '5', mongodb: '4.0', bundler: '2.3.26' }
27
+ - { ruby: '2.5.9', mongoid: '6', mongodb: '4.0', bundler: default }
28
+ - { ruby: '2.7.8', mongoid: '7', mongodb: '4.4', bundler: '2.4.22' }
29
+ - { ruby: '3.2', mongoid: '8', mongodb: '6.0', bundler: default }
30
+ - { ruby: '3.3', mongoid: '9', mongodb: '7.0', bundler: default }
31
+ - { ruby: '3.4', mongoid: '9', mongodb: '8.0', bundler: default }
32
+ - { ruby: '4.0', mongoid: '9', mongodb: '8.0', bundler: default, coverage: true }
33
+ env:
34
+ MONGOID_VERSION: ${{ matrix.mongoid }}
35
+ COVERAGE: ${{ matrix.coverage }}
36
+ services:
37
+ mongodb:
38
+ image: mongo:${{ matrix.mongodb }}
39
+ ports: ['27017:27017']
40
+ options: >-
41
+ --health-cmd "bash -c 'echo > /dev/tcp/127.0.0.1/27017'"
42
+ --health-interval 5s --health-timeout 5s --health-retries 20
43
+ steps:
44
+ - uses: actions/checkout@v6
45
+ - uses: ruby/setup-ruby@v1
46
+ with:
47
+ ruby-version: ${{ matrix.ruby }}
48
+ bundler: ${{ matrix.bundler }}
49
+ bundler-cache: true
50
+ - run: bundle exec rake spec
51
+ - name: Report coverage to Coveralls
52
+ if: matrix.coverage
53
+ uses: coverallsapp/github-action@v2
54
+ with:
55
+ github-token: ${{ secrets.GITHUB_TOKEN }}
56
+ file: coverage/.resultset.json
57
+ format: simplecov
58
+ parallel: true
59
+ flag-name: ruby-${{ matrix.ruby }}
60
+
61
+ coverage:
62
+ needs: test
63
+ if: ${{ always() && needs.test.result == 'success' }}
64
+ runs-on: ubuntu-latest
65
+ timeout-minutes: 20
66
+ steps:
67
+ - uses: coverallsapp/github-action@v2
68
+ with:
69
+ github-token: ${{ secrets.GITHUB_TOKEN }}
70
+ parallel-finished: true
71
+
72
+ lint:
73
+ runs-on: ubuntu-22.04
74
+ timeout-minutes: 20
75
+ steps:
76
+ - uses: actions/checkout@v6
77
+ - uses: ruby/setup-ruby@v1
78
+ with:
79
+ ruby-version: '3.3'
80
+ bundler-cache: true
81
+ - run: bundle exec rake rubocop
data/.gitignore CHANGED
@@ -45,3 +45,5 @@ tmtags
45
45
  *.swp
46
46
 
47
47
  Gemfile.lock
48
+ Gemfile.danger.lock
49
+ /vendor/bundle
data/.rubocop.yml CHANGED
@@ -1,6 +1,152 @@
1
+ plugins:
2
+ - rubocop-md
3
+ - rubocop-prose
4
+ - rubocop-rake
5
+ - rubocop-spellcheck
6
+ - rubocop-yaml
7
+
8
+ inherit_from: ".rubocop_todo.yml"
9
+
1
10
  AllCops:
11
+ TargetRubyVersion: 2.1
12
+ NewCops: disable
13
+ Exclude:
14
+ - vendor/**/*
15
+ - bin/**/*
16
+ - coverage/**/*
17
+ - pkg/**/*
18
+ SuggestExtensions: false
19
+ inherit_mode:
20
+ merge:
21
+ - Include
22
+ Include:
23
+ - ".github/**/*.yml"
24
+ - ".rubocop.yml"
25
+
26
+ YAML/Lint/InvalidSyntax:
27
+ Include:
28
+ - "**/*.yml"
29
+ - "**/*.yaml"
30
+
31
+ YAML/Lint/DuplicateKey:
32
+ Include:
33
+ - "**/*.yml"
34
+ - "**/*.yaml"
35
+
36
+ Naming/FileName:
37
+ inherit_mode:
38
+ merge:
39
+ - Exclude
40
+ Exclude:
41
+ - "**/*.md"
42
+ - ".github/workflows/*.yml"
43
+
44
+ Metrics/MethodLength:
45
+ inherit_mode:
46
+ merge:
47
+ - Exclude
48
+ Exclude:
49
+ - "**/*.md"
50
+
51
+ Metrics/AbcSize:
52
+ inherit_mode:
53
+ merge:
54
+ - Exclude
2
55
  Exclude:
3
- - vendor/**/*
4
- - bin/**/*
56
+ - "**/*.md"
5
57
 
6
- inherit_from: .rubocop_todo.yml
58
+ Naming/HeredocDelimiterNaming:
59
+ inherit_mode:
60
+ merge:
61
+ - Exclude
62
+ Exclude:
63
+ - "**/*.md"
64
+
65
+ Style/SafeNavigation:
66
+ inherit_mode:
67
+ merge:
68
+ - Exclude
69
+ Exclude:
70
+ - "**/*.md"
71
+
72
+ Style/OneClassPerFile:
73
+ inherit_mode:
74
+ merge:
75
+ - Exclude
76
+ Exclude:
77
+ - "**/*.md"
78
+
79
+ Style/Documentation:
80
+ inherit_mode:
81
+ merge:
82
+ - Exclude
83
+ Exclude:
84
+ - "**/*.md"
85
+
86
+ Lint/UselessAssignment:
87
+ inherit_mode:
88
+ merge:
89
+ - Exclude
90
+ Exclude:
91
+ - "**/*.md"
92
+
93
+ Style/MultilineBlockChain:
94
+ inherit_mode:
95
+ merge:
96
+ - Exclude
97
+ Exclude:
98
+ - "**/*.md"
99
+
100
+ Style/SymbolProc:
101
+ inherit_mode:
102
+ merge:
103
+ - Exclude
104
+ Exclude:
105
+ - "**/*.md"
106
+
107
+ Lint/Void:
108
+ inherit_mode:
109
+ merge:
110
+ - Exclude
111
+ Exclude:
112
+ - "**/*.md"
113
+
114
+ Metrics/BlockLength:
115
+ inherit_mode:
116
+ merge:
117
+ - Exclude
118
+ Exclude:
119
+ - Gemfile
120
+
121
+ Layout/LineLength:
122
+ inherit_mode:
123
+ merge:
124
+ - Exclude
125
+ Exclude:
126
+ - ".github/workflows/*.yml"
127
+
128
+ Markdown/HeadingCapitalization:
129
+ Enabled: true
130
+ Style: title_case
131
+
132
+ Prose/MaxLength:
133
+ Max: false
134
+ Exclude:
135
+ - LICENSE
136
+
137
+ Spellcheck:
138
+ DictionaryFiles:
139
+ en:
140
+ - gem:rubocop-spellcheck/data/en/en.dic
141
+ - ".spellcheck.txt"
142
+
143
+ Spellcheck/Spelling:
144
+ Exclude:
145
+ - LICENSE
146
+
147
+ Naming/VariableNumber:
148
+ inherit_mode:
149
+ merge:
150
+ - Exclude
151
+ Exclude:
152
+ - "**/*.md"
data/.rubocop_todo.yml CHANGED
@@ -1,101 +1,181 @@
1
1
  # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2015-09-18 15:56:53 -0400 using RuboCop version 0.34.1.
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
- # Offense count: 1
9
+ Gemspec/RequiredRubyVersion:
10
+ Exclude:
11
+ - 'mongoid_fulltext.gemspec'
12
+
13
+ # This cop supports safe autocorrection (--autocorrect).
14
+ # Configuration parameters: EnforcedStyleAlignWith.
15
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
16
+ Layout/EndAlignment:
17
+ Exclude:
18
+ - 'lib/mongoid/full_text_search.rb'
19
+
20
+ # This cop supports unsafe autocorrection (--autocorrect-all).
10
21
  # Configuration parameters: AllowSafeAssignment.
11
22
  Lint/AssignmentInCondition:
12
23
  Exclude:
13
24
  - 'lib/mongoid/full_text_search.rb'
14
25
 
15
- # Offense count: 1
16
- # Cop supports --auto-correct.
17
- # Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
18
- Lint/EndAlignment:
19
- Enabled: false
20
-
21
- # Offense count: 2
22
- Lint/HandleExceptions:
26
+ # This cop supports unsafe autocorrection (--autocorrect-all).
27
+ Lint/NonDeterministicRequireOrder:
23
28
  Exclude:
24
- - 'lib/mongoid/full_text_search.rb'
25
- - 'spec/mongoid/full_text_search_spec.rb'
29
+ - 'spec/spec_helper.rb'
26
30
 
27
- # Offense count: 1
28
- Lint/NonLocalExitFromIterator:
31
+ # Configuration parameters: AllowComments, AllowNil.
32
+ Lint/SuppressedException:
29
33
  Exclude:
30
- - 'lib/mongoid/full_text_search.rb'
34
+ - 'spec/mongoid/full_text_search_spec.rb'
31
35
 
32
- # Offense count: 4
36
+ # This cop supports safe autocorrection (--autocorrect).
33
37
  Lint/UselessAssignment:
34
38
  Exclude:
35
39
  - 'spec/mongoid/full_text_search_spec.rb'
36
40
 
37
- # Offense count: 5
41
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
38
42
  Metrics/AbcSize:
39
- Max: 106
43
+ Exclude:
44
+ - 'lib/mongoid/full_text_search.rb'
45
+ - 'lib/mongoid/full_text_search/field_scores.rb'
46
+ - 'lib/mongoid/full_text_search/index_definition.rb'
47
+ - 'lib/mongoid/full_text_search/ngrams.rb'
40
48
 
41
- # Offense count: 4
49
+ # Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
50
+ # AllowedMethods: refine
51
+ Metrics/BlockLength:
52
+ Exclude:
53
+ - 'lib/mongoid/full_text_search.rb'
54
+ - 'spec/mongoid/array_fields_spec.rb'
55
+ - 'spec/mongoid/bulk_indexing_spec.rb'
56
+ - 'spec/mongoid/criteria_search_spec.rb'
57
+ - 'spec/mongoid/full_text_search_spec.rb'
58
+ - 'spec/mongoid/localized_fields_spec.rb'
59
+ - 'spec/mongoid/ngram_sampling_spec.rb'
60
+ - 'spec/mongoid/non_latin_spec.rb'
61
+ - 'spec/mongoid/weighted_fields_spec.rb'
62
+ - 'spec/release/release_spec.rb'
63
+ - 'spec/unit/field_scores_spec.rb'
64
+ - 'spec/unit/index_definition_spec.rb'
65
+ - 'spec/unit/ngrams_spec.rb'
66
+
67
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
42
68
  Metrics/CyclomaticComplexity:
43
- Max: 22
44
-
45
- # Offense count: 262
46
- # Configuration parameters: AllowURI, URISchemes.
47
- Metrics/LineLength:
48
- Max: 174
69
+ Exclude:
70
+ - 'lib/mongoid/full_text_search.rb'
71
+ - 'lib/mongoid/full_text_search/field_scores.rb'
72
+ - 'lib/mongoid/full_text_search/index_definition.rb'
73
+ - 'lib/mongoid/full_text_search/ngrams.rb'
49
74
 
50
- # Offense count: 5
51
- # Configuration parameters: CountComments.
75
+ # Configuration parameters: CountComments, Max, CountAsOne, AllowedMethods, AllowedPatterns.
52
76
  Metrics/MethodLength:
53
- Max: 50
77
+ Exclude:
78
+ - 'lib/mongoid/full_text_search.rb'
79
+ - 'lib/mongoid/full_text_search/field_scores.rb'
80
+ - 'lib/mongoid/full_text_search/index_definition.rb'
81
+ - 'lib/mongoid/full_text_search/ngrams.rb'
54
82
 
55
- # Offense count: 1
56
- # Configuration parameters: CountComments.
83
+ # Configuration parameters: CountComments, Max, CountAsOne.
57
84
  Metrics/ModuleLength:
58
- Max: 224
85
+ Exclude:
86
+ - 'lib/mongoid/full_text_search.rb'
59
87
 
60
- # Offense count: 4
88
+ # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
61
89
  Metrics/PerceivedComplexity:
62
- Max: 25
90
+ Exclude:
91
+ - 'lib/mongoid/full_text_search.rb'
92
+ - 'lib/mongoid/full_text_search/field_scores.rb'
93
+ - 'lib/mongoid/full_text_search/ngrams.rb'
94
+
95
+ Naming/ConstantName:
96
+ Exclude:
97
+ - 'spec/models/russian_artwork.rb'
63
98
 
64
- # Offense count: 1
65
- Style/AsciiComments:
99
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
100
+ # SupportedStyles: snake_case, normalcase, non_integer
101
+ # AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
102
+ Naming/VariableNumber:
66
103
  Exclude:
67
104
  - 'spec/mongoid/full_text_search_spec.rb'
68
105
 
69
- # Offense count: 1
70
- # Configuration parameters: EnforcedStyle, SupportedStyles.
106
+ # This cop supports unsafe autocorrection (--autocorrect-all).
107
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForClasses, EnforcedStyleForModules.
108
+ # SupportedStyles: nested, compact
109
+ # SupportedStylesForClasses: ~, nested, compact
110
+ # SupportedStylesForModules: ~, nested, compact
71
111
  Style/ClassAndModuleChildren:
72
112
  Exclude:
73
113
  - 'lib/mongoid/full_text_search.rb'
74
114
 
75
- # Offense count: 1
76
- Style/ConstantName:
77
- Exclude:
78
- - 'spec/models/russian_artwork.rb'
79
-
80
- # Offense count: 22
115
+ # Configuration parameters: AllowedConstants.
81
116
  Style/Documentation:
82
- Enabled: false
117
+ Exclude:
118
+ - 'lib/mongoid/full_text_search.rb'
119
+ - 'lib/mongoid/full_text_search/indexable.rb'
120
+ - 'lib/mongoid/full_text_search/indexes.rb'
83
121
 
84
- # Offense count: 3
85
- # Configuration parameters: EnforcedStyle, SupportedStyles.
122
+ # This cop supports safe autocorrection (--autocorrect).
123
+ # Configuration parameters: EnforcedStyle.
124
+ # SupportedStyles: format, sprintf, percent
86
125
  Style/FormatString:
87
126
  Exclude:
88
127
  - 'lib/mongoid/full_text_search.rb'
89
128
  - 'spec/models/external_artwork_no_fields_supplied.rb'
90
129
 
91
- # Offense count: 2
130
+ # This cop supports safe autocorrection (--autocorrect).
131
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
132
+ # SupportedStyles: annotated, template, unannotated
133
+ Style/FormatStringToken:
134
+ EnforcedStyle: unannotated
135
+
136
+ # This cop supports safe autocorrection (--autocorrect).
137
+ Style/IfUnlessModifier:
138
+ Exclude:
139
+ - 'lib/mongoid/full_text_search.rb'
140
+ - 'lib/mongoid/full_text_search/field_scores.rb'
141
+ - 'spec/mongoid/full_text_search_spec.rb'
142
+
92
143
  Style/MultilineBlockChain:
93
144
  Exclude:
94
145
  - 'lib/mongoid/full_text_search.rb'
95
146
 
96
- # Offense count: 4
97
- # Configuration parameters: Methods.
98
- Style/SingleLineBlockParams:
147
+ # This cop supports unsafe autocorrection (--autocorrect-all).
148
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
149
+ # SupportedStyles: predicate, comparison
150
+ Style/NumericPredicate:
151
+ Exclude:
152
+ - 'lib/mongoid/full_text_search.rb'
153
+
154
+ # Configuration parameters: AllowedMethods.
155
+ # AllowedMethods: respond_to_missing?
156
+ Style/OptionalBooleanParameter:
157
+ Exclude:
158
+ - 'lib/mongoid/full_text_search.rb'
159
+ - 'lib/mongoid/full_text_search/ngrams.rb'
160
+
161
+ # This cop supports unsafe autocorrection (--autocorrect-all).
162
+ # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
163
+ # AllowedMethods: define_method
164
+ Style/SymbolProc:
165
+ Exclude:
166
+ - 'spec/models/filtered_artwork.rb'
167
+
168
+ # This cop supports safe autocorrection (--autocorrect).
169
+ # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
170
+ # URISchemes: http, https
171
+ # AllowedPatterns: (?-mix:^\#)
172
+ Layout/LineLength:
99
173
  Exclude:
100
174
  - 'lib/mongoid/full_text_search.rb'
175
+ - 'lib/mongoid/full_text_search/field_scores.rb'
176
+ - 'script/release.rb'
101
177
  - 'spec/mongoid/full_text_search_spec.rb'
178
+ - 'spec/mongoid/localized_fields_spec.rb'
179
+ - 'spec/mongoid/weighted_fields_spec.rb'
180
+ - 'spec/release/release_spec.rb'
181
+ - 'spec/unit/index_definition_spec.rb'