maid 0.10.0.pre.alpha.1 → 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.
- checksums.yaml +4 -4
- data/.github/workflows/coverage.yml +29 -0
- data/.github/workflows/lint.yml +24 -0
- data/.github/workflows/release.yml +5 -2
- data/.gitignore +1 -0
- data/.release-please-manifest.json +1 -1
- data/.rubocop.yml +35 -0
- data/.rubocop_todo.yml +372 -0
- data/CHANGELOG.md +8 -1
- data/Guardfile +31 -4
- data/README.md +3 -3
- data/Rakefile +1 -1
- data/Vagrantfile +2 -2
- data/lib/maid/app.rb +48 -51
- data/lib/maid/maid.rb +38 -38
- data/lib/maid/numeric_extensions.rb +26 -25
- data/lib/maid/platform.rb +1 -1
- data/lib/maid/rake/task.rb +1 -1
- data/lib/maid/repeat.rb +8 -8
- data/lib/maid/rule_container.rb +3 -3
- data/lib/maid/rules.sample.rb +17 -17
- data/lib/maid/tools.rb +142 -127
- data/lib/maid/trash_migration.rb +4 -4
- data/lib/maid/user_agent.rb +2 -2
- data/lib/maid/version.rb +5 -2
- data/lib/maid/watch.rb +10 -12
- data/maid.gemspec +29 -22
- data/spec/dependency_spec.rb +9 -8
- data/spec/lib/maid/app_spec.rb +15 -7
- data/spec/lib/maid/maid_spec.rb +63 -41
- data/spec/lib/maid/numeric_extensions_spec.rb +1 -1
- data/spec/lib/maid/rake/single_rule_spec.rb +4 -5
- data/spec/lib/maid/rake/task_spec.rb +3 -5
- data/spec/lib/maid/rule_spec.rb +1 -1
- data/spec/lib/maid/tools_spec.rb +87 -85
- data/spec/lib/maid/trash_migration_spec.rb +7 -6
- data/spec/lib/maid_spec.rb +1 -1
- data/spec/spec_helper.rb +18 -3
- metadata +161 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8d0fa40b9069dd973a12021c729407e1f98719ea96e8ede17aff4426cd8d9eb
|
4
|
+
data.tar.gz: ed334d76e2cdc9ba723e600a6f371efab241ea24c080e7009425dee9a99d52f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4be4e2a2771566d670b9b7a5d5966c334e3ca58c7c204dab7182654821b47b6076dc2ceb0e880de1a2e6966f110fee7422d289ffa058c9ba6861287afd2f60be
|
7
|
+
data.tar.gz: 124d6e7f02282b4772b4a849acfad62efdc3277c08ea0696cd32b57672e199104bf314e53b609c47960e026b2073f4aba55d441de5061600fa9f499f9e90ceae
|
@@ -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
|
@@ -39,7 +39,7 @@ jobs:
|
|
39
39
|
# Uncomment for pre-releases, see
|
40
40
|
# https://github.com/maid/maid/wiki/Release-Process
|
41
41
|
prerelease: true
|
42
|
-
release-as: v0.10.0-alpha.
|
42
|
+
release-as: v0.10.0-alpha.2
|
43
43
|
- name: Set up Ruby
|
44
44
|
uses: ruby/setup-ruby@v1
|
45
45
|
with:
|
@@ -53,7 +53,10 @@ jobs:
|
|
53
53
|
run: |
|
54
54
|
mkdir -p $HOME/.gem
|
55
55
|
touch $HOME/.gem/credentials
|
56
|
+
chmod 0600 $HOME/.gem/credentials
|
56
57
|
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
58
|
+
gem build *.gemspec
|
59
|
+
gem push *.gem
|
57
60
|
env:
|
58
|
-
GEM_HOST_API_KEY: secrets.RUBYGEMS_AUTH_TOKEN
|
61
|
+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
|
59
62
|
if: ${{ steps.release.outputs.release_created }}
|
data/.gitignore
CHANGED
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/CHANGELOG.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [0.10.0-alpha.
|
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)
|
4
11
|
|
5
12
|
|
6
13
|
### ⚠ BREAKING CHANGES
|
data/Guardfile
CHANGED
@@ -1,5 +1,32 @@
|
|
1
|
-
guard :rspec, cmd: 'bundle exec rspec' do
|
2
|
-
|
3
|
-
|
4
|
-
|
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
|
[](http://badge.fury.io/rb/maid)
|
4
|
-
[](https://github.com/maid/maid/actions/workflows/test.yml)
|
5
|
+
[](https://codeclimate.com/github/maid/maid)
|
6
|
+
[](https://codeclimate.com/github/maid/maid/test_coverage)
|
7
7
|
[](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
data/Vagrantfile
CHANGED
@@ -3,12 +3,12 @@
|
|
3
3
|
|
4
4
|
Vagrant.configure('2') do |config|
|
5
5
|
# See also: `script/vagrant-test`, `script/vagrant-test-all`
|
6
|
-
config.vm.box
|
6
|
+
config.vm.box = ENV['MAID_TARGET_BOX'] || 'hashicorp/precise64'
|
7
7
|
|
8
8
|
config.vm.provider :virtualbox do |vb|
|
9
9
|
# Maid has very low system requirements
|
10
10
|
vb.customize ['modifyvm', :id, '--cpus', 1, '--memory', 192]
|
11
11
|
end
|
12
12
|
|
13
|
-
config.vm.provision(:shell, :
|
13
|
+
config.vm.provision(:shell, path: 'script/vagrant-provision', args: ENV['MAID_TARGET_RUBY'] || '1.9.3')
|
14
14
|
end
|