maid 0.9.0.alpha.2 → 0.10.0.pre.alpha.2

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/.act-env +1 -0
  3. data/.act-secrets.example +2 -0
  4. data/.github/workflows/coverage.yml +29 -0
  5. data/.github/workflows/lint.yml +24 -0
  6. data/.github/workflows/release.yml +62 -0
  7. data/.github/workflows/test.yml +2 -2
  8. data/.gitignore +2 -0
  9. data/.release-please-manifest.json +3 -0
  10. data/.rubocop.yml +35 -0
  11. data/.rubocop_todo.yml +372 -0
  12. data/.ruby-version +1 -1
  13. data/CHANGELOG.md +31 -0
  14. data/Gemfile +1 -1
  15. data/Guardfile +31 -4
  16. data/README.md +3 -3
  17. data/Rakefile +1 -1
  18. data/Vagrantfile +2 -2
  19. data/lib/maid/app.rb +48 -51
  20. data/lib/maid/maid.rb +38 -38
  21. data/lib/maid/numeric_extensions.rb +26 -25
  22. data/lib/maid/platform.rb +1 -1
  23. data/lib/maid/rake/task.rb +1 -1
  24. data/lib/maid/repeat.rb +8 -8
  25. data/lib/maid/rule_container.rb +3 -3
  26. data/lib/maid/rules.sample.rb +17 -17
  27. data/lib/maid/tools.rb +142 -127
  28. data/lib/maid/trash_migration.rb +4 -4
  29. data/lib/maid/user_agent.rb +2 -2
  30. data/lib/maid/version.rb +5 -2
  31. data/lib/maid/watch.rb +10 -12
  32. data/maid.gemspec +36 -18
  33. data/spec/dependency_spec.rb +9 -8
  34. data/spec/lib/maid/app_spec.rb +31 -23
  35. data/spec/lib/maid/maid_spec.rb +74 -52
  36. data/spec/lib/maid/numeric_extensions_spec.rb +1 -1
  37. data/spec/lib/maid/platform_spec.rb +1 -1
  38. data/spec/lib/maid/rake/single_rule_spec.rb +11 -6
  39. data/spec/lib/maid/rake/task_spec.rb +3 -5
  40. data/spec/lib/maid/rule_spec.rb +1 -1
  41. data/spec/lib/maid/tools_spec.rb +94 -92
  42. data/spec/lib/maid/trash_migration_spec.rb +12 -11
  43. data/spec/lib/maid/user_agent_spec.rb +5 -4
  44. data/spec/lib/maid_spec.rb +1 -1
  45. data/spec/spec_helper.rb +19 -3
  46. metadata +177 -61
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59a42ca675fafa12a22f7610385f2e4dcd0ca1e3e6fc663befbf7c6f821e303f
4
- data.tar.gz: 381ae0030809aa1ac6847df528af641fb0b1a42d5387600a3de70c079fb10cc1
3
+ metadata.gz: d8d0fa40b9069dd973a12021c729407e1f98719ea96e8ede17aff4426cd8d9eb
4
+ data.tar.gz: ed334d76e2cdc9ba723e600a6f371efab241ea24c080e7009425dee9a99d52f4
5
5
  SHA512:
6
- metadata.gz: df4a95605641bba6cdf041925aab0832f40225548858bf0eb68d572447c6257c42b4695371790ab86c57d4e5ee78ee68267a384e5fa049309acac962a5fe748f
7
- data.tar.gz: 5f67557c5bdd8be613545b99602c5989dea1e976b677018e76eb9457be2546b27bc976774873e6b63505091c956c4cdc6dc4082bf1719df08d174a488395d599
6
+ metadata.gz: 4be4e2a2771566d670b9b7a5d5966c334e3ca58c7c204dab7182654821b47b6076dc2ceb0e880de1a2e6966f110fee7422d289ffa058c9ba6861287afd2f60be
7
+ data.tar.gz: 124d6e7f02282b4772b4a849acfad62efdc3277c08ea0696cd32b57672e199104bf314e53b609c47960e026b2073f4aba55d441de5061600fa9f499f9e90ceae
data/.act-env ADDED
@@ -0,0 +1 @@
1
+ # Mirrors GitHub Actions' environment vars
@@ -0,0 +1,2 @@
1
+ # Mirrors GitHub Actions' secrets
2
+ BOT_GH_TOKEN=<get one from github.com/settings/tokens, make sure it's only allowed public_repo>
@@ -0,0 +1,29 @@
1
+ name: Code coverage
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ master
7
+ pull_request:
8
+ branches:
9
+ - master
10
+
11
+ jobs:
12
+ code-climate:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ bundler-cache: true
20
+ - name: Install dependencies
21
+ run: bundle install
22
+ - name: Publish code coverage
23
+ uses: paambaati/codeclimate-action@v3.2.0
24
+ with:
25
+ coverageCommand: bundle exec rake
26
+ env:
27
+ CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_KEY }}
28
+ COVERAGE: true
29
+
@@ -0,0 +1,24 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ branches:
9
+ - master
10
+
11
+ jobs:
12
+ rubocop:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ # ruby-version derived from .ruby-version file
20
+ bundler-cache: true
21
+ - name: Install dependencies
22
+ run: bundle install
23
+ - name: Run lint
24
+ run: bundle exec rubocop
@@ -0,0 +1,62 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ release-please:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v3
17
+ - name: Prepare release
18
+ id: release
19
+ uses: google-github-actions/release-please-action@v3
20
+ with:
21
+ release-type: ruby
22
+ package-name: maid
23
+ # Major bump is minor instead pre-1.0.0
24
+ bump-minor-pre-major: true
25
+ # Minor bump is patch instead pre-1.0.0
26
+ bump-patch-for-minor-pre-major: true
27
+ # Don't parse commits before this one as they don't follow the
28
+ # conventional commit format AND don't have `release-please`
29
+ # COMMIT_MESSAGE_OVERRIDE data.
30
+ # (https://www.conventionalcommits.org/en/v1.0.0/#summary)
31
+ bootstrap-sha: 0a6ff8abc6db00aca181d6bfed9751e332900ac9
32
+ # This is the last release before starting to use release-please
33
+ last-release-sha: 0a6ff8abc6db00aca181d6bfed9751e332900ac9
34
+ version-file: lib/maid/version.rb
35
+ # Don't use GITHUB_TOKEN because this doesn't allow workflows to
36
+ # trigger workflows; it leave the `release-please`-generated PR with
37
+ # pending checks as they're never started.
38
+ token: ${{ secrets.BOT_GH_TOKEN }}
39
+ # Uncomment for pre-releases, see
40
+ # https://github.com/maid/maid/wiki/Release-Process
41
+ prerelease: true
42
+ release-as: v0.10.0-alpha.2
43
+ - name: Set up Ruby
44
+ uses: ruby/setup-ruby@v1
45
+ with:
46
+ # ruby-version derived from .ruby-version file
47
+ bundler-cache: true
48
+ - name: Install dependencies
49
+ run: bundle install
50
+ - name: Run tests
51
+ run: bundle exec rake
52
+ - name: Publish gem
53
+ run: |
54
+ mkdir -p $HOME/.gem
55
+ touch $HOME/.gem/credentials
56
+ chmod 0600 $HOME/.gem/credentials
57
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
58
+ gem build *.gemspec
59
+ gem push *.gem
60
+ env:
61
+ GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
62
+ if: ${{ steps.release.outputs.release_created }}
@@ -1,4 +1,4 @@
1
- name: Maid
1
+ name: Test
2
2
 
3
3
  on:
4
4
  push:
@@ -9,7 +9,7 @@ on:
9
9
  - master
10
10
 
11
11
  jobs:
12
- test:
12
+ rspec:
13
13
  strategy:
14
14
  matrix:
15
15
  os:
data/.gitignore CHANGED
@@ -5,3 +5,5 @@
5
5
  Gemfile.lock
6
6
  tmp/*
7
7
  doc/*
8
+ .act-secrets
9
+ coverage/
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.10.0-alpha.2"
3
+ }
data/.rubocop.yml ADDED
@@ -0,0 +1,35 @@
1
+ ---
2
+ inherit_from: .rubocop_todo.yml
3
+
4
+ require:
5
+ - rubocop-rake
6
+ - rubocop-rspec
7
+
8
+ AllCops:
9
+ AutoCorrect: true
10
+ Exclude:
11
+ - "bin/*"
12
+ - "vendor/bundle/**/*" # when running on GH Actions
13
+ NewCops: enable
14
+ TargetRubyVersion: 2.7
15
+
16
+ Metrics/BlockLength:
17
+ Exclude:
18
+ - Guardfile
19
+ - "spec/**/*"
20
+
21
+ Style/TrailingCommaInArguments:
22
+ EnforcedStyleForMultiline: consistent_comma
23
+
24
+ Style/TrailingCommaInArrayLiteral:
25
+ EnforcedStyleForMultiline: consistent_comma
26
+
27
+ Style/TrailingCommaInBlockArgs:
28
+ Enabled: true
29
+
30
+ Style/TrailingCommaInHashLiteral:
31
+ EnforcedStyleForMultiline: consistent_comma
32
+
33
+ RSpec/Focus:
34
+ AutoCorrect: false
35
+ Severity: error
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,372 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2023-03-21 11:48:56 UTC using RuboCop version 1.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: 6
10
+ # Configuration parameters: EnforcedStyle, AllowedGems, Include.
11
+ # SupportedStyles: Gemfile, gems.rb, gemspec
12
+ # Include: **/*.gemspec, **/Gemfile, **/gems.rb
13
+ Gemspec/DevelopmentDependencies:
14
+ Exclude:
15
+ - 'maid.gemspec'
16
+
17
+ # Offense count: 1
18
+ # Configuration parameters: Severity, Include.
19
+ # Include: **/*.gemspec
20
+ Gemspec/DuplicatedAssignment:
21
+ Exclude:
22
+ - 'maid.gemspec'
23
+
24
+ # Offense count: 2
25
+ # Configuration parameters: AllowComments, AllowEmptyLambdas.
26
+ Lint/EmptyBlock:
27
+ Exclude:
28
+ - 'spec/lib/maid/maid_spec.rb'
29
+
30
+ # Offense count: 1
31
+ Lint/MissingSuper:
32
+ Exclude:
33
+ - 'lib/maid/rake/task.rb'
34
+
35
+ # Offense count: 3
36
+ Lint/UselessAssignment:
37
+ Exclude:
38
+ - 'lib/maid/tools.rb'
39
+
40
+ # Offense count: 7
41
+ # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
42
+ Metrics/AbcSize:
43
+ Max: 33
44
+
45
+ # Offense count: 1
46
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
47
+ # AllowedMethods: refine
48
+ Metrics/BlockLength:
49
+ Max: 34
50
+
51
+ # Offense count: 1
52
+ # Configuration parameters: CountComments, CountAsOne.
53
+ Metrics/ClassLength:
54
+ Max: 128
55
+
56
+ # Offense count: 2
57
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
58
+ Metrics/CyclomaticComplexity:
59
+ Max: 10
60
+
61
+ # Offense count: 15
62
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
63
+ Metrics/MethodLength:
64
+ Max: 27
65
+
66
+ # Offense count: 4
67
+ # Configuration parameters: CountComments, CountAsOne.
68
+ Metrics/ModuleLength:
69
+ Max: 711
70
+
71
+ # Offense count: 2
72
+ # Configuration parameters: AllowedMethods, AllowedPatterns.
73
+ Metrics/PerceivedComplexity:
74
+ Max: 10
75
+
76
+ # Offense count: 3
77
+ # Configuration parameters: ForbiddenDelimiters.
78
+ # ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
79
+ Naming/HeredocDelimiterNaming:
80
+ Exclude:
81
+ - 'lib/maid/app.rb'
82
+
83
+ # Offense count: 5
84
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
85
+ # NamePrefix: is_, has_, have_
86
+ # ForbiddenPrefixes: is_, has_, have_
87
+ # AllowedMethods: is_a?
88
+ # MethodDefinitionMacros: define_method, define_singleton_method
89
+ Naming/PredicateName:
90
+ Exclude:
91
+ - 'spec/**/*'
92
+ - 'lib/maid/platform.rb'
93
+ - 'lib/maid/tools.rb'
94
+
95
+ # Offense count: 1
96
+ RSpec/BeforeAfterAll:
97
+ Exclude:
98
+ - 'spec/spec_helper.rb'
99
+ - 'spec/rails_helper.rb'
100
+ - 'spec/support/**/*.rb'
101
+ - 'spec/lib/maid/rake/task_spec.rb'
102
+
103
+ # Offense count: 17
104
+ # Configuration parameters: Prefixes, AllowedPatterns.
105
+ # Prefixes: when, with, without
106
+ RSpec/ContextWording:
107
+ Exclude:
108
+ - 'spec/lib/maid/rake/task_spec.rb'
109
+ - 'spec/lib/maid/tools_spec.rb'
110
+ - 'spec/lib/maid/trash_migration_spec.rb'
111
+
112
+ # Offense count: 1
113
+ # Configuration parameters: IgnoredMetadata.
114
+ RSpec/DescribeClass:
115
+ Exclude:
116
+ - '**/spec/features/**/*'
117
+ - '**/spec/requests/**/*'
118
+ - '**/spec/routing/**/*'
119
+ - '**/spec/system/**/*'
120
+ - '**/spec/views/**/*'
121
+ - 'spec/dependency_spec.rb'
122
+
123
+ # Offense count: 59
124
+ # This cop supports unsafe autocorrection (--autocorrect-all).
125
+ # Configuration parameters: SkipBlocks, EnforcedStyle.
126
+ # SupportedStyles: described_class, explicit
127
+ RSpec/DescribedClass:
128
+ Exclude:
129
+ - 'spec/dependency_spec.rb'
130
+ - 'spec/lib/maid/app_spec.rb'
131
+ - 'spec/lib/maid/maid_spec.rb'
132
+ - 'spec/lib/maid/rule_spec.rb'
133
+ - 'spec/lib/maid/tools_spec.rb'
134
+ - 'spec/lib/maid/user_agent_spec.rb'
135
+ - 'spec/lib/maid_spec.rb'
136
+
137
+ # Offense count: 8
138
+ # Configuration parameters: CountAsOne.
139
+ RSpec/ExampleLength:
140
+ Max: 8
141
+
142
+ # Offense count: 1
143
+ RSpec/ExpectInHook:
144
+ Exclude:
145
+ - 'spec/lib/maid/tools_spec.rb'
146
+
147
+ # Offense count: 5
148
+ # Configuration parameters: AssignmentOnly.
149
+ RSpec/InstanceVariable:
150
+ Exclude:
151
+ - 'spec/dependency_spec.rb'
152
+ - 'spec/lib/maid_spec.rb'
153
+
154
+ # Offense count: 57
155
+ # Configuration parameters: EnforcedStyle.
156
+ # SupportedStyles: have_received, receive
157
+ RSpec/MessageSpies:
158
+ Exclude:
159
+ - 'spec/lib/maid/app_spec.rb'
160
+ - 'spec/lib/maid/maid_spec.rb'
161
+ - 'spec/lib/maid/rake/single_rule_spec.rb'
162
+ - 'spec/lib/maid/rake/task_spec.rb'
163
+ - 'spec/lib/maid/tools_spec.rb'
164
+ - 'spec/lib/maid_spec.rb'
165
+
166
+ # Offense count: 2
167
+ RSpec/MultipleDescribes:
168
+ Exclude:
169
+ - 'spec/lib/maid/numeric_extensions_spec.rb'
170
+ - 'spec/lib/maid_spec.rb'
171
+
172
+ # Offense count: 42
173
+ RSpec/MultipleExpectations:
174
+ Max: 4
175
+
176
+ # Offense count: 1
177
+ # Configuration parameters: AllowSubject.
178
+ RSpec/MultipleMemoizedHelpers:
179
+ Max: 7
180
+
181
+ # Offense count: 16
182
+ # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
183
+ # SupportedStyles: always, named_only
184
+ RSpec/NamedSubject:
185
+ Exclude:
186
+ - 'spec/lib/maid/platform_spec.rb'
187
+ - 'spec/lib/maid/trash_migration_spec.rb'
188
+
189
+ # Offense count: 3
190
+ # This cop supports unsafe autocorrection (--autocorrect-all).
191
+ # Configuration parameters: Strict, EnforcedStyle, AllowedExplicitMatchers.
192
+ # SupportedStyles: inflected, explicit
193
+ RSpec/PredicateMatcher:
194
+ Exclude:
195
+ - 'spec/lib/maid/tools_spec.rb'
196
+
197
+ # Offense count: 13
198
+ RSpec/StubbedMock:
199
+ Exclude:
200
+ - 'spec/lib/maid/app_spec.rb'
201
+ - 'spec/lib/maid/maid_spec.rb'
202
+ - 'spec/lib/maid/rake/single_rule_spec.rb'
203
+ - 'spec/lib/maid/tools_spec.rb'
204
+
205
+ # Offense count: 1
206
+ # This cop supports unsafe autocorrection (--autocorrect-all).
207
+ # Configuration parameters: .
208
+ # SupportedStyles: constant, string
209
+ RSpec/VerifiedDoubleReference:
210
+ EnforcedStyle: string
211
+
212
+ # Offense count: 20
213
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
214
+ RSpec/VerifiedDoubles:
215
+ Exclude:
216
+ - 'spec/lib/maid/app_spec.rb'
217
+ - 'spec/lib/maid/maid_spec.rb'
218
+ - 'spec/lib/maid/rake/single_rule_spec.rb'
219
+ - 'spec/lib/maid/tools_spec.rb'
220
+ - 'spec/lib/maid/trash_migration_spec.rb'
221
+ - 'spec/lib/maid_spec.rb'
222
+
223
+ # Offense count: 1
224
+ # This cop supports safe autocorrection (--autocorrect).
225
+ Rake/Desc:
226
+ Exclude:
227
+ - 'Rakefile'
228
+
229
+ # Offense count: 11
230
+ # This cop supports unsafe autocorrection (--autocorrect-all).
231
+ # Configuration parameters: EnforcedStyle.
232
+ # SupportedStyles: nested, compact
233
+ Style/ClassAndModuleChildren:
234
+ Exclude:
235
+ - 'lib/maid/app.rb'
236
+ - 'lib/maid/downloading.rb'
237
+ - 'lib/maid/maid.rb'
238
+ - 'lib/maid/numeric_extensions.rb'
239
+ - 'lib/maid/platform.rb'
240
+ - 'lib/maid/repeat.rb'
241
+ - 'lib/maid/rule.rb'
242
+ - 'lib/maid/rule_container.rb'
243
+ - 'lib/maid/tools.rb'
244
+ - 'lib/maid/user_agent.rb'
245
+ - 'lib/maid/watch.rb'
246
+
247
+ # Offense count: 1
248
+ Style/ClassVars:
249
+ Exclude:
250
+ - 'lib/maid/maid.rb'
251
+
252
+ # Offense count: 1
253
+ # This cop supports unsafe autocorrection (--autocorrect-all).
254
+ Style/CollectionCompact:
255
+ Exclude:
256
+ - 'lib/maid/maid.rb'
257
+
258
+ # Offense count: 12
259
+ # Configuration parameters: AllowedConstants.
260
+ Style/Documentation:
261
+ Exclude:
262
+ - 'spec/**/*'
263
+ - 'test/**/*'
264
+ - 'lib/maid.rb'
265
+ - 'lib/maid/app.rb'
266
+ - 'lib/maid/downloading.rb'
267
+ - 'lib/maid/numeric_extensions.rb'
268
+ - 'lib/maid/platform.rb'
269
+ - 'lib/maid/rake/single_rule.rb'
270
+ - 'lib/maid/rake/task.rb'
271
+ - 'lib/maid/repeat.rb'
272
+ - 'lib/maid/rule.rb'
273
+ - 'lib/maid/rule_container.rb'
274
+ - 'lib/maid/trash_migration.rb'
275
+ - 'lib/maid/watch.rb'
276
+
277
+ # Offense count: 34
278
+ # This cop supports unsafe autocorrection (--autocorrect-all).
279
+ # Configuration parameters: EnforcedStyle.
280
+ # SupportedStyles: always, always_true, never
281
+ Style/FrozenStringLiteralComment:
282
+ Enabled: false
283
+
284
+ # Offense count: 2
285
+ # This cop supports unsafe autocorrection (--autocorrect-all).
286
+ Style/GlobalStdStream:
287
+ Exclude:
288
+ - 'lib/maid/app.rb'
289
+ - 'spec/lib/maid/app_spec.rb'
290
+
291
+ # Offense count: 4
292
+ # This cop supports unsafe autocorrection (--autocorrect-all).
293
+ # Configuration parameters: InverseMethods, InverseBlocks.
294
+ Style/InverseMethods:
295
+ Exclude:
296
+ - 'lib/maid/tools.rb'
297
+
298
+ # Offense count: 2
299
+ Style/MultilineBlockChain:
300
+ Exclude:
301
+ - 'lib/maid/tools.rb'
302
+
303
+ # Offense count: 1
304
+ # This cop supports unsafe autocorrection (--autocorrect-all).
305
+ # Configuration parameters: EnforcedStyle.
306
+ # SupportedStyles: literals, strict
307
+ Style/MutableConstant:
308
+ Exclude:
309
+ - 'lib/maid/rake/task.rb'
310
+
311
+ # Offense count: 6
312
+ # This cop supports unsafe autocorrection (--autocorrect-all).
313
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
314
+ # SupportedStyles: predicate, comparison
315
+ Style/NumericPredicate:
316
+ Exclude:
317
+ - 'spec/**/*'
318
+ - 'lib/maid/tools.rb'
319
+
320
+ # Offense count: 3
321
+ # This cop supports unsafe autocorrection (--autocorrect-all).
322
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
323
+ # AllowedMethods: present?, blank?, presence, try, try!
324
+ Style/SafeNavigation:
325
+ Exclude:
326
+ - 'lib/maid/rake/task.rb'
327
+ - 'lib/maid/rule_container.rb'
328
+ - 'spec/lib/maid/app_spec.rb'
329
+
330
+ # Offense count: 2
331
+ # This cop supports unsafe autocorrection (--autocorrect-all).
332
+ Style/SlicingWithRange:
333
+ Exclude:
334
+ - 'lib/maid/tools.rb'
335
+
336
+ # Offense count: 1
337
+ # This cop supports unsafe autocorrection (--autocorrect-all).
338
+ # Configuration parameters: RequireEnglish.
339
+ # SupportedStyles: use_perl_names, use_english_names, use_builtin_english_names
340
+ Style/SpecialGlobalVars:
341
+ EnforcedStyle: use_perl_names
342
+
343
+ # Offense count: 18
344
+ # This cop supports unsafe autocorrection (--autocorrect-all).
345
+ # Configuration parameters: Mode.
346
+ Style/StringConcatenation:
347
+ Exclude:
348
+ - 'lib/maid/tools.rb'
349
+ - 'lib/maid/trash_migration.rb'
350
+ - 'spec/dependency_spec.rb'
351
+ - 'spec/lib/maid/tools_spec.rb'
352
+
353
+ # Offense count: 1
354
+ # This cop supports unsafe autocorrection (--autocorrect-all).
355
+ Style/StructInheritance:
356
+ Exclude:
357
+ - 'lib/maid/rule.rb'
358
+
359
+ # Offense count: 4
360
+ # This cop supports unsafe autocorrection (--autocorrect-all).
361
+ # Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
362
+ # AllowedMethods: define_method
363
+ Style/SymbolProc:
364
+ Exclude:
365
+ - 'lib/maid/tools.rb'
366
+ - 'spec/dependency_spec.rb'
367
+
368
+ # Offense count: 4
369
+ # This cop supports unsafe autocorrection (--autocorrect-all).
370
+ Style/ZeroLengthPredicate:
371
+ Exclude:
372
+ - 'lib/maid/tools.rb'
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.3
1
+ 3.2.1
data/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # Changelog
2
+
3
+ ## [0.10.0-alpha.2](https://github.com/maid/maid/compare/v0.10.0-alpha.1...v0.10.0-alpha.2) (2023-03-28)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * update syntax for Ruby 3 ([#269](https://github.com/maid/maid/issues/269)) ([ce5b42b](https://github.com/maid/maid/commit/ce5b42b78e53b5ccb9b25926c5af19e31a5c0ed7))
9
+
10
+ ## [0.10.0-alpha.1](https://github.com/maid/maid/compare/v0.9.0.alpha.2...v0.10.0-alpha.1) (2023-03-28)
11
+
12
+
13
+ ### ⚠ BREAKING CHANGES
14
+
15
+ * Drop support for ruby < 2.7
16
+
17
+ ### Features
18
+
19
+ * Add ruby 3+ support ([008ee83](https://github.com/maid/maid/commit/008ee83f1655a81e3523431ed35bc2dd20c10c6e))
20
+ * Pass scheduler options to Rufus for repeating tasks ([06a01d3](https://github.com/maid/maid/commit/06a01d3e847537bf8f3f51e6550969bf6123d9a1))
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * Unsafe regex for hostname in example rules ([#229](https://github.com/maid/maid/issues/229)) ([ffc793a](https://github.com/maid/maid/commit/ffc793a9c1e0f1ce433d75710cbd96626fd3835a))
26
+ * Use HTTPS for rubygems.org ([#219](https://github.com/maid/maid/issues/219)) ([ad0f81c](https://github.com/maid/maid/commit/ad0f81c6ffaed1fff2b91ce71f9b568b3f11b022))
27
+
28
+
29
+ ### Code Refactoring
30
+
31
+ * Drop support for ruby &lt; 2.7 ([33838aa](https://github.com/maid/maid/commit/33838aaaeed481158613ce620aeb3a7dc5989ced))
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in maid.gemspec
4
4
  gemspec
data/Guardfile CHANGED
@@ -1,5 +1,32 @@
1
- guard :rspec, cmd: 'bundle exec rspec' do
2
- watch(%r{^spec/.+_spec\.rb$})
3
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{ m[1] }_spec.rb" }
4
- watch('spec/spec_helper.rb') { 'spec' }
1
+ guard :rspec, cmd: 'bundle exec rspec --format=Fuubar' do
2
+ require 'guard/rspec/dsl'
3
+ dsl = Guard::RSpec::Dsl.new(self)
4
+
5
+ # RSpec files
6
+ rspec = dsl.rspec
7
+ watch(rspec.spec_helper) { rspec.spec_dir }
8
+ watch(rspec.spec_support) { rspec.spec_dir }
9
+ watch(rspec.spec_files)
10
+
11
+ # Ruby files
12
+ ruby = dsl.ruby
13
+ dsl.watch_spec_files_for(ruby.lib_files)
14
+ end
15
+
16
+ guard :bundler do
17
+ require 'guard/bundler'
18
+ require 'guard/bundler/verify'
19
+ helper = Guard::Bundler::Verify.new
20
+
21
+ files = ['Gemfile']
22
+ files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
23
+
24
+ # Assume files are symlinked from somewhere
25
+ files.each { |file| watch(helper.real_path(file)) }
26
+ end
27
+
28
+ guard :rubocop, cli: ['--autocorrect', '--display-cop-names'] do
29
+ watch('Gemfile')
30
+ watch(%r{^(?!node_modules/).+\.rb$})
31
+ watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
5
32
  end
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Maid
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/maid.svg)](http://badge.fury.io/rb/maid)
4
- [![Build Status](https://secure.travis-ci.org/benjaminoakes/maid.svg)](http://travis-ci.org/benjaminoakes/maid)
5
- [![Code Climate](https://codeclimate.com/github/benjaminoakes/maid.svg)](https://codeclimate.com/github/benjaminoakes/maid)
6
- [![Hakiri](https://hakiri.io/github/benjaminoakes/maid/stable.svg)](https://hakiri.io/github/benjaminoakes/maid/stable)
4
+ [![Test](https://github.com/maid/maid/actions/workflows/test.yml/badge.svg)](https://github.com/maid/maid/actions/workflows/test.yml)
5
+ [![Code Climate](https://codeclimate.com/github/maid/maid.svg)](https://codeclimate.com/github/maid/maid)
6
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/3898063fb5b3caf24044/test_coverage)](https://codeclimate.com/github/maid/maid/test_coverage)
7
7
  [![StackOverflow](http://img.shields.io/badge/stackoverflow-maid-blue.svg)](http://stackoverflow.com/questions/tagged/maid)
8
8
 
9
9
  **Be lazy!** Let Maid clean up after you, based on rules you define.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require 'rake'
3
3
  require 'rspec/core/rake_task'
4
4
  require 'yard'
5
5
 
6
- task :default => :spec
6
+ task default: :spec
7
7
 
8
8
  Bundler::GemHelper.install_tasks
9
9
  RSpec::Core::RakeTask.new(:spec)