ruby-link-checker 0.5.1 → 0.6.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +153 -19
- data/UPGRADING.md +46 -0
- data/lib/ruby-link-checker/async/http/checker.rb +19 -6
- data/lib/ruby-link-checker/async/http/result.rb +1 -1
- data/lib/ruby-link-checker/cache.rb +90 -21
- data/lib/ruby-link-checker/checker.rb +136 -13
- data/lib/ruby-link-checker/config.rb +79 -0
- data/lib/ruby-link-checker/net/http/checker.rb +3 -2
- data/lib/ruby-link-checker/net/http/result.rb +1 -1
- data/lib/ruby-link-checker/redirect.rb +11 -0
- data/lib/ruby-link-checker/result.rb +96 -1
- data/lib/ruby-link-checker/tasks.rb +24 -12
- data/lib/ruby-link-checker/typhoeus/hydra/checker.rb +59 -11
- data/lib/ruby-link-checker/typhoeus/hydra/result.rb +1 -1
- data/lib/ruby-link-checker/version.rb +1 -1
- data/lib/ruby-link-checker.rb +1 -0
- metadata +18 -51
- data/.github/workflows/coverage.yml +0 -24
- data/.github/workflows/danger-comment.yml +0 -17
- data/.github/workflows/danger.yml +0 -12
- data/.github/workflows/lint.yml +0 -20
- data/.github/workflows/release.yml +0 -14
- data/.github/workflows/test.yml +0 -25
- data/.gitignore +0 -6
- data/.rspec +0 -2
- data/.rubocop.yml +0 -26
- data/.rubocop_todo.yml +0 -332
- data/AGENTS.md +0 -23
- data/CONTRIBUTING.md +0 -129
- data/Dangerfile +0 -6
- data/Gemfile +0 -27
- data/RELEASING.md +0 -37
- data/Rakefile +0 -26
- data/benchmarks/check.rb +0 -38
- data/benchmarks/data/opensearch.org/links.txt +0 -4270
- data/benchmarks/data/opensearch.org/small.txt +0 -100
- data/ruby-link-checker.gemspec +0 -22
- data/spec/fixtures/200.yml +0 -65
- data/spec/fixtures/301_200.yml +0 -102
- data/spec/fixtures/301_301.yml +0 -114
- data/spec/fixtures/301_400_301_200.yml +0 -185
- data/spec/fixtures/301_403.yml +0 -78
- data/spec/fixtures/308_429.yml +0 -108
- data/spec/fixtures/404.yml +0 -57
- data/spec/fixtures/404_200.yml +0 -89
- data/spec/fixtures/404_404.yml +0 -81
- data/spec/fixtures/429_200.yml +0 -135
- data/spec/fixtures/429_429_200.yml +0 -201
- data/spec/ruby-link-checker/async/http/checker_spec.rb +0 -184
- data/spec/ruby-link-checker/callbacks_spec.rb +0 -76
- data/spec/ruby-link-checker/checker_spec.rb +0 -97
- data/spec/ruby-link-checker/config_spec.rb +0 -45
- data/spec/ruby-link-checker/errors/redirect_loop_error_spec.rb +0 -18
- data/spec/ruby-link-checker/net/http/checker_spec.rb +0 -93
- data/spec/ruby-link-checker/result_error_spec.rb +0 -34
- data/spec/ruby-link-checker/result_spec.rb +0 -41
- data/spec/ruby-link-checker/task_spec.rb +0 -20
- data/spec/ruby-link-checker/tasks_spec.rb +0 -91
- data/spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb +0 -180
- data/spec/ruby-link-checker/version_spec.rb +0 -9
- data/spec/spec_helper.rb +0 -19
- data/spec/support/config.rb +0 -8
- data/spec/support/link_checker.rb +0 -609
- data/spec/support/vcr.rb +0 -13
- data/spec/support/with_result.rb +0 -15
- data/spec/support/with_url.rb +0 -14
data/.rubocop_todo.yml
DELETED
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
# This configuration was generated by
|
|
2
|
-
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-08-18 00:50:15 UTC using RuboCop version 1.84.0.
|
|
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: 2
|
|
10
|
-
# Configuration parameters: EnforcedStyle, AllowedGems.
|
|
11
|
-
# SupportedStyles: Gemfile, gems.rb, gemspec
|
|
12
|
-
Gemspec/DevelopmentDependencies:
|
|
13
|
-
Exclude:
|
|
14
|
-
- 'ruby-link-checker.gemspec'
|
|
15
|
-
|
|
16
|
-
# Offense count: 1
|
|
17
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
18
|
-
# Configuration parameters: EnforcedStyleAlignWith.
|
|
19
|
-
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
20
|
-
Layout/BlockAlignment:
|
|
21
|
-
Exclude:
|
|
22
|
-
- 'spec/ruby-link-checker/checker_spec.rb'
|
|
23
|
-
|
|
24
|
-
# Offense count: 1
|
|
25
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
26
|
-
Layout/EmptyLineAfterGuardClause:
|
|
27
|
-
Exclude:
|
|
28
|
-
- 'lib/ruby-link-checker/checker.rb'
|
|
29
|
-
|
|
30
|
-
# Offense count: 3
|
|
31
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
32
|
-
Layout/EmptyLineAfterMagicComment:
|
|
33
|
-
Exclude:
|
|
34
|
-
- 'lib/ruby-link-checker/logger.rb'
|
|
35
|
-
- 'spec/ruby-link-checker/checker_spec.rb'
|
|
36
|
-
- 'spec/ruby-link-checker/config_spec.rb'
|
|
37
|
-
|
|
38
|
-
# Offense count: 3
|
|
39
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
40
|
-
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
41
|
-
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
42
|
-
Layout/IndentationWidth:
|
|
43
|
-
Exclude:
|
|
44
|
-
- 'spec/ruby-link-checker/checker_spec.rb'
|
|
45
|
-
- 'spec/ruby-link-checker/config_spec.rb'
|
|
46
|
-
|
|
47
|
-
# Offense count: 4
|
|
48
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
49
|
-
# Configuration parameters: EnforcedStyle.
|
|
50
|
-
# SupportedStyles: final_newline, final_blank_line
|
|
51
|
-
Layout/TrailingEmptyLines:
|
|
52
|
-
Exclude:
|
|
53
|
-
- 'lib/ruby-link-checker/logger.rb'
|
|
54
|
-
- 'spec/ruby-link-checker/checker_spec.rb'
|
|
55
|
-
- 'spec/ruby-link-checker/config_spec.rb'
|
|
56
|
-
- 'spec/spec_helper.rb'
|
|
57
|
-
|
|
58
|
-
# Offense count: 1
|
|
59
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
60
|
-
# Configuration parameters: AllowInHeredoc.
|
|
61
|
-
Layout/TrailingWhitespace:
|
|
62
|
-
Exclude:
|
|
63
|
-
- 'spec/ruby-link-checker/config_spec.rb'
|
|
64
|
-
|
|
65
|
-
# Offense count: 2
|
|
66
|
-
# Configuration parameters: AllowedMethods.
|
|
67
|
-
# AllowedMethods: enums
|
|
68
|
-
Lint/ConstantDefinitionInBlock:
|
|
69
|
-
Exclude:
|
|
70
|
-
- 'spec/ruby-link-checker/async/http/checker_spec.rb'
|
|
71
|
-
- 'spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb'
|
|
72
|
-
|
|
73
|
-
# Offense count: 1
|
|
74
|
-
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
|
75
|
-
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
|
|
76
|
-
# 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
|
|
77
|
-
Naming/FileName:
|
|
78
|
-
Exclude:
|
|
79
|
-
- 'Rakefile.rb'
|
|
80
|
-
- 'lib/ruby-link-checker.rb'
|
|
81
|
-
|
|
82
|
-
# Offense count: 1
|
|
83
|
-
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
84
|
-
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
|
85
|
-
Naming/MethodParameterName:
|
|
86
|
-
Exclude:
|
|
87
|
-
- 'lib/ruby-link-checker/callbacks.rb'
|
|
88
|
-
|
|
89
|
-
# Offense count: 3
|
|
90
|
-
RSpec/AnyInstance:
|
|
91
|
-
Exclude:
|
|
92
|
-
- 'spec/ruby-link-checker/net/http/checker_spec.rb'
|
|
93
|
-
- 'spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb'
|
|
94
|
-
|
|
95
|
-
# Offense count: 1
|
|
96
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
97
|
-
# Configuration parameters: EnforcedStyle.
|
|
98
|
-
# SupportedStyles: be, be_nil
|
|
99
|
-
RSpec/BeNil:
|
|
100
|
-
Exclude:
|
|
101
|
-
- 'spec/ruby-link-checker/config_spec.rb'
|
|
102
|
-
|
|
103
|
-
# Offense count: 3
|
|
104
|
-
RSpec/BeforeAfterAll:
|
|
105
|
-
Exclude:
|
|
106
|
-
- '**/spec/spec_helper.rb'
|
|
107
|
-
- '**/spec/rails_helper.rb'
|
|
108
|
-
- '**/spec/support/**/*.rb'
|
|
109
|
-
- 'spec/ruby-link-checker/async/http/checker_spec.rb'
|
|
110
|
-
- 'spec/ruby-link-checker/net/http/checker_spec.rb'
|
|
111
|
-
- 'spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb'
|
|
112
|
-
|
|
113
|
-
# Offense count: 36
|
|
114
|
-
# Configuration parameters: Prefixes, AllowedPatterns.
|
|
115
|
-
# Prefixes: when, with, without
|
|
116
|
-
RSpec/ContextWording:
|
|
117
|
-
Exclude:
|
|
118
|
-
- 'spec/ruby-link-checker/async/http/checker_spec.rb'
|
|
119
|
-
- 'spec/ruby-link-checker/callbacks_spec.rb'
|
|
120
|
-
- 'spec/ruby-link-checker/checker_spec.rb'
|
|
121
|
-
- 'spec/ruby-link-checker/config_spec.rb'
|
|
122
|
-
- 'spec/ruby-link-checker/net/http/checker_spec.rb'
|
|
123
|
-
- 'spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb'
|
|
124
|
-
- 'spec/support/link_checker.rb'
|
|
125
|
-
|
|
126
|
-
# Offense count: 1
|
|
127
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
128
|
-
# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
|
|
129
|
-
# SupportedStyles: described_class, explicit
|
|
130
|
-
RSpec/DescribedClass:
|
|
131
|
-
Exclude:
|
|
132
|
-
- 'spec/ruby-link-checker/checker_spec.rb'
|
|
133
|
-
|
|
134
|
-
# Offense count: 3
|
|
135
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
136
|
-
# Configuration parameters: AllowConsecutiveOneLiners.
|
|
137
|
-
RSpec/EmptyLineAfterExample:
|
|
138
|
-
Exclude:
|
|
139
|
-
- 'spec/ruby-link-checker/config_spec.rb'
|
|
140
|
-
|
|
141
|
-
# Offense count: 14
|
|
142
|
-
# Configuration parameters: CountAsOne.
|
|
143
|
-
RSpec/ExampleLength:
|
|
144
|
-
Max: 9
|
|
145
|
-
|
|
146
|
-
# Offense count: 4
|
|
147
|
-
RSpec/ExpectInHook:
|
|
148
|
-
Exclude:
|
|
149
|
-
- 'spec/ruby-link-checker/async/http/checker_spec.rb'
|
|
150
|
-
- 'spec/ruby-link-checker/net/http/checker_spec.rb'
|
|
151
|
-
- 'spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb'
|
|
152
|
-
|
|
153
|
-
# Offense count: 6
|
|
154
|
-
# Configuration parameters: AssignmentOnly.
|
|
155
|
-
RSpec/InstanceVariable:
|
|
156
|
-
Exclude:
|
|
157
|
-
- 'spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb'
|
|
158
|
-
- 'spec/support/link_checker.rb'
|
|
159
|
-
- 'spec/support/with_result.rb'
|
|
160
|
-
|
|
161
|
-
# Offense count: 6
|
|
162
|
-
RSpec/LeakyConstantDeclaration:
|
|
163
|
-
Exclude:
|
|
164
|
-
- 'spec/ruby-link-checker/async/http/checker_spec.rb'
|
|
165
|
-
- 'spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb'
|
|
166
|
-
|
|
167
|
-
# Offense count: 2
|
|
168
|
-
# Configuration parameters: EnforcedStyle.
|
|
169
|
-
# SupportedStyles: have_received, receive
|
|
170
|
-
RSpec/MessageSpies:
|
|
171
|
-
Exclude:
|
|
172
|
-
- 'spec/ruby-link-checker/async/http/checker_spec.rb'
|
|
173
|
-
- 'spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb'
|
|
174
|
-
|
|
175
|
-
# Offense count: 23
|
|
176
|
-
RSpec/MultipleExpectations:
|
|
177
|
-
Max: 9
|
|
178
|
-
|
|
179
|
-
# Offense count: 58
|
|
180
|
-
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
|
|
181
|
-
# SupportedStyles: always, named_only
|
|
182
|
-
RSpec/NamedSubject:
|
|
183
|
-
Exclude:
|
|
184
|
-
- 'spec/ruby-link-checker/callbacks_spec.rb'
|
|
185
|
-
- 'spec/support/link_checker.rb'
|
|
186
|
-
- 'spec/support/with_result.rb'
|
|
187
|
-
- 'spec/support/with_url.rb'
|
|
188
|
-
|
|
189
|
-
# Offense count: 26
|
|
190
|
-
# Configuration parameters: AllowedGroups.
|
|
191
|
-
RSpec/NestedGroups:
|
|
192
|
-
Max: 6
|
|
193
|
-
|
|
194
|
-
# Offense count: 8
|
|
195
|
-
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
|
|
196
|
-
# SupportedInflectors: default, active_support
|
|
197
|
-
RSpec/SpecFilePathFormat:
|
|
198
|
-
Exclude:
|
|
199
|
-
- '**/spec/routing/**/*'
|
|
200
|
-
- 'spec/ruby-link-checker/async/http/checker_spec.rb'
|
|
201
|
-
- 'spec/ruby-link-checker/callbacks_spec.rb'
|
|
202
|
-
- 'spec/ruby-link-checker/checker_spec.rb'
|
|
203
|
-
- 'spec/ruby-link-checker/config_spec.rb'
|
|
204
|
-
- 'spec/ruby-link-checker/errors/redirect_loop_error_spec.rb'
|
|
205
|
-
- 'spec/ruby-link-checker/net/http/checker_spec.rb'
|
|
206
|
-
- 'spec/ruby-link-checker/result_error_spec.rb'
|
|
207
|
-
- 'spec/ruby-link-checker/result_spec.rb'
|
|
208
|
-
- 'spec/ruby-link-checker/task_spec.rb'
|
|
209
|
-
- 'spec/ruby-link-checker/tasks_spec.rb'
|
|
210
|
-
- 'spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb'
|
|
211
|
-
- 'spec/ruby-link-checker/version_spec.rb'
|
|
212
|
-
|
|
213
|
-
# Offense count: 39
|
|
214
|
-
RSpec/SubjectStub:
|
|
215
|
-
Exclude:
|
|
216
|
-
- 'spec/ruby-link-checker/callbacks_spec.rb'
|
|
217
|
-
- 'spec/support/link_checker.rb'
|
|
218
|
-
- 'spec/support/with_result.rb'
|
|
219
|
-
|
|
220
|
-
# Offense count: 2
|
|
221
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
222
|
-
# Configuration parameters: AllowOnConstant, AllowOnSelfClass.
|
|
223
|
-
Style/CaseEquality:
|
|
224
|
-
Exclude:
|
|
225
|
-
- 'spec/support/link_checker.rb'
|
|
226
|
-
|
|
227
|
-
# Offense count: 3
|
|
228
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
229
|
-
Style/ComparableBetween:
|
|
230
|
-
Exclude:
|
|
231
|
-
- 'lib/ruby-link-checker/async/http/result.rb'
|
|
232
|
-
- 'lib/ruby-link-checker/net/http/result.rb'
|
|
233
|
-
- 'lib/ruby-link-checker/typhoeus/hydra/result.rb'
|
|
234
|
-
|
|
235
|
-
# Offense count: 25
|
|
236
|
-
# Configuration parameters: AllowedConstants.
|
|
237
|
-
Style/Documentation:
|
|
238
|
-
Enabled: false
|
|
239
|
-
|
|
240
|
-
# Offense count: 1
|
|
241
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
242
|
-
# Configuration parameters: EnforcedStyle.
|
|
243
|
-
# SupportedStyles: trailing_conditional, ternary
|
|
244
|
-
Style/EmptyStringInsideInterpolation:
|
|
245
|
-
Exclude:
|
|
246
|
-
- 'lib/ruby-link-checker/result.rb'
|
|
247
|
-
|
|
248
|
-
# Offense count: 18
|
|
249
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
250
|
-
# Configuration parameters: EnforcedStyle.
|
|
251
|
-
# SupportedStyles: always, always_true, never
|
|
252
|
-
Style/FrozenStringLiteralComment:
|
|
253
|
-
Enabled: false
|
|
254
|
-
|
|
255
|
-
# Offense count: 1
|
|
256
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
257
|
-
Style/GlobalStdStream:
|
|
258
|
-
Exclude:
|
|
259
|
-
- 'lib/ruby-link-checker/logger.rb'
|
|
260
|
-
|
|
261
|
-
# Offense count: 1
|
|
262
|
-
Style/MissingRespondToMissing:
|
|
263
|
-
Exclude:
|
|
264
|
-
- 'lib/ruby-link-checker/callbacks.rb'
|
|
265
|
-
|
|
266
|
-
# Offense count: 4
|
|
267
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
268
|
-
# Configuration parameters: EnforcedStyle, Autocorrect.
|
|
269
|
-
# SupportedStyles: module_function, extend_self, forbidden
|
|
270
|
-
Style/ModuleFunction:
|
|
271
|
-
Exclude:
|
|
272
|
-
- 'lib/ruby-link-checker/async/http/config.rb'
|
|
273
|
-
- 'lib/ruby-link-checker/config.rb'
|
|
274
|
-
- 'lib/ruby-link-checker/net/http/config.rb'
|
|
275
|
-
- 'lib/ruby-link-checker/typhoeus/hydra/config.rb'
|
|
276
|
-
|
|
277
|
-
# Offense count: 2
|
|
278
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
279
|
-
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
|
|
280
|
-
# SupportedStyles: predicate, comparison
|
|
281
|
-
Style/NumericPredicate:
|
|
282
|
-
Exclude:
|
|
283
|
-
- 'spec/**/*'
|
|
284
|
-
- 'lib/ruby-link-checker/tasks.rb'
|
|
285
|
-
|
|
286
|
-
# Offense count: 1
|
|
287
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
288
|
-
Style/RescueModifier:
|
|
289
|
-
Exclude:
|
|
290
|
-
- 'lib/ruby-link-checker/tasks.rb'
|
|
291
|
-
|
|
292
|
-
# Offense count: 1
|
|
293
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
294
|
-
# Configuration parameters: Mode.
|
|
295
|
-
Style/StringConcatenation:
|
|
296
|
-
Exclude:
|
|
297
|
-
- 'lib/ruby-link-checker/result.rb'
|
|
298
|
-
|
|
299
|
-
# Offense count: 2
|
|
300
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
301
|
-
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
302
|
-
# SupportedStyles: single_quotes, double_quotes
|
|
303
|
-
Style/StringLiterals:
|
|
304
|
-
Exclude:
|
|
305
|
-
- 'lib/ruby-link-checker/checker.rb'
|
|
306
|
-
|
|
307
|
-
# Offense count: 3
|
|
308
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
309
|
-
Style/SuperArguments:
|
|
310
|
-
Exclude:
|
|
311
|
-
- 'lib/ruby-link-checker/net/http/checker.rb'
|
|
312
|
-
- 'lib/ruby-link-checker/typhoeus/hydra/checker.rb'
|
|
313
|
-
- 'spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb'
|
|
314
|
-
|
|
315
|
-
# Offense count: 7
|
|
316
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
317
|
-
Style/SuperWithArgsParentheses:
|
|
318
|
-
Exclude:
|
|
319
|
-
- 'lib/ruby-link-checker/errors/redirect_loop_error.rb'
|
|
320
|
-
- 'lib/ruby-link-checker/net/http/checker.rb'
|
|
321
|
-
- 'lib/ruby-link-checker/net/http/result.rb'
|
|
322
|
-
- 'lib/ruby-link-checker/result.rb'
|
|
323
|
-
- 'lib/ruby-link-checker/typhoeus/hydra/checker.rb'
|
|
324
|
-
- 'lib/ruby-link-checker/typhoeus/hydra/result.rb'
|
|
325
|
-
- 'spec/ruby-link-checker/typhoeus/hydra/checker_spec.rb'
|
|
326
|
-
|
|
327
|
-
# Offense count: 1
|
|
328
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
329
|
-
# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
330
|
-
# URISchemes: http, https
|
|
331
|
-
Layout/LineLength:
|
|
332
|
-
Max: 123
|
data/AGENTS.md
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Contributor instructions
|
|
2
|
-
|
|
3
|
-
Keep changes focused and preserve existing behavior unless a change is explicitly requested. Follow CONTRIBUTING.md and document public behavior in README.md.
|
|
4
|
-
|
|
5
|
-
## Changelog and pull requests
|
|
6
|
-
|
|
7
|
-
Add entries under the current `(Next)` heading in CHANGELOG.md and retain `Your contribution here`. Include the implementation PR number, its URL, and contributor attribution using this format:
|
|
8
|
-
|
|
9
|
-
```markdown
|
|
10
|
-
* [#123](https://github.com/dblock/ruby-link-checker/pull/123): Describe the change - [@contributor](https://github.com/contributor).
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Predict the PR number before opening a new PR, then verify the assigned number and correct the entry if necessary. Issue references may supplement but do not replace the implementation PR link.
|
|
14
|
-
|
|
15
|
-
Keep Markdown paragraphs on one line. Keep each PR branch to one commit, squash follow-up changes before pushing, and use `--force-with-lease` when updating rewritten PR history. Never force-push the default branch.
|
|
16
|
-
|
|
17
|
-
## Validation
|
|
18
|
-
|
|
19
|
-
Run focused RSpec tests for behavior changes and `bundle exec rubocop` before committing. `bundle exec rake` runs both the full specs and RuboCop. Avoid repeated intermediate test runs; rerun when failures or subsequent changes require it.
|
|
20
|
-
|
|
21
|
-
For changelog or README changes, run `bundle exec danger dry_run --base=origin/main`; Danger checks changelog entries and README table-of-contents consistency. Keep the temporary `git < 6` dependency pin until Danger supports git 6; the Gemfile comment links the upstream fix.
|
|
22
|
-
|
|
23
|
-
Do not commit Gemfile.lock; this repository ignores it. Include `Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>` in AI-assisted commits and disclose AI involvement when posting GitHub comments on behalf of the user.
|
data/CONTRIBUTING.md
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# Contributing to ruby-link-checker
|
|
2
|
-
|
|
3
|
-
This project is work of [many contributors](https://github.com/dblock/ruby-link-checker/graphs/contributors).
|
|
4
|
-
|
|
5
|
-
You're encouraged to submit [pull requests](https://github.com/dblock/ruby-link-checker/pulls), [propose features and discuss issues](https://github.com/dblock/ruby-link-checker/issues).
|
|
6
|
-
|
|
7
|
-
In the examples below, substitute your Github username for `contributor` in URLs.
|
|
8
|
-
|
|
9
|
-
### Fork the Project
|
|
10
|
-
|
|
11
|
-
Fork the [project on Github](https://github.com/dblock/ruby-link-checker) and check out your copy.
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
git clone https://github.com/contributor/ruby-link-checker.git
|
|
15
|
-
cd ruby-link-checker
|
|
16
|
-
git remote add upstream https://github.com/dblock/ruby-link-checker.git
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### Bundle Install and Test
|
|
20
|
-
|
|
21
|
-
Ensure that you can build the project and run tests.
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
bundle install
|
|
25
|
-
bundle exec rake
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Contribute Code
|
|
29
|
-
|
|
30
|
-
### Create a Topic Branch
|
|
31
|
-
|
|
32
|
-
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
git checkout main
|
|
36
|
-
git pull upstream main
|
|
37
|
-
git checkout -b my-feature-branch
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Write Tests
|
|
41
|
-
|
|
42
|
-
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build. Add tests to [spec](spec).
|
|
43
|
-
|
|
44
|
-
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
|
|
45
|
-
|
|
46
|
-
### Write Code
|
|
47
|
-
|
|
48
|
-
Implement your feature or bug fix.
|
|
49
|
-
|
|
50
|
-
Ruby style is enforced with [Rubocop](https://github.com/bbatsov/rubocop). Run `bundle exec rubocop` and fix any style issues highlighted, auto-correct issues when possible with `bundle exec rubocop -a`. To silence generally ingored issues, including line lengths or code complexity metrics, run `bundle exec rubocop --auto-gen-config`.
|
|
51
|
-
|
|
52
|
-
Make sure that `bundle exec rake` completes without errors.
|
|
53
|
-
|
|
54
|
-
### Write Documentation
|
|
55
|
-
|
|
56
|
-
Document any external behavior in the [README](README.md).
|
|
57
|
-
|
|
58
|
-
### Update Changelog
|
|
59
|
-
|
|
60
|
-
Add a line to [CHANGELOG](CHANGELOG.md) under *Next Release*. Don't remove *Your contribution here*.
|
|
61
|
-
|
|
62
|
-
Make it look like every other line, including a link to the issue being fixed, your name and link to your Github account.
|
|
63
|
-
|
|
64
|
-
### Commit Changes
|
|
65
|
-
|
|
66
|
-
Make sure git knows your name and email address:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
git config --global user.name "Your Name"
|
|
70
|
-
git config --global user.email "contributor@example.com"
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Writing good commit logs is important. A commit log should describe what changed and why.
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
git add ...
|
|
77
|
-
git commit
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### Push
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
git push origin my-feature-branch
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Make a Pull Request
|
|
87
|
-
|
|
88
|
-
Go to https://github.com/contributor/ruby-link-checker and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
|
|
89
|
-
|
|
90
|
-
### Update CHANGELOG Again
|
|
91
|
-
|
|
92
|
-
Update the [CHANGELOG](CHANGELOG.md) with the pull request number. A typical entry looks as follows.
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
* [#123](https://github.com/dblock/ruby-link-checker/pull/123): Reticulated splines - [@contributor](https://github.com/contributor).
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Amend your previous commit and force push the changes.
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
git commit --amend
|
|
102
|
-
git push origin my-feature-branch -f
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Rebase
|
|
106
|
-
|
|
107
|
-
If you've been working on a change for a while, rebase with upstream/main.
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
git fetch upstream
|
|
111
|
-
git rebase upstream/main
|
|
112
|
-
git push origin my-feature-branch -f
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Check on Your Pull Request
|
|
116
|
-
|
|
117
|
-
Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
|
|
118
|
-
|
|
119
|
-
### Be Patient
|
|
120
|
-
|
|
121
|
-
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
|
|
122
|
-
|
|
123
|
-
## Releases
|
|
124
|
-
|
|
125
|
-
See [RELEASING.md](RELEASING.md) for the manual release workflow and one-time Trusted Publishing setup.
|
|
126
|
-
|
|
127
|
-
## Thank You
|
|
128
|
-
|
|
129
|
-
Please do know that we really appreciate and value your time and work. We love you, really.
|
data/Dangerfile
DELETED
data/Gemfile
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
source 'http://rubygems.org'
|
|
4
|
-
|
|
5
|
-
gemspec
|
|
6
|
-
|
|
7
|
-
gem 'rake'
|
|
8
|
-
|
|
9
|
-
group :development, :test do
|
|
10
|
-
gem 'danger'
|
|
11
|
-
gem 'danger-changelog', '0.8.0'
|
|
12
|
-
gem 'danger-pr-comment'
|
|
13
|
-
gem 'danger-toc', '0.2.0'
|
|
14
|
-
# Temporary until Danger's git 6 support lands: https://github.com/danger/danger/pull/1561
|
|
15
|
-
gem 'git', '< 6', require: false
|
|
16
|
-
gem 'rspec', '~> 3.0'
|
|
17
|
-
gem 'rubocop', '~> 1.0'
|
|
18
|
-
gem 'rubocop-rake'
|
|
19
|
-
gem 'rubocop-rspec'
|
|
20
|
-
gem 'ruby-gem-release', '~> 0.3.1', require: false
|
|
21
|
-
gem 'vcr'
|
|
22
|
-
gem 'webmock'
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
group :test do
|
|
26
|
-
gem 'simplecov', require: false
|
|
27
|
-
end
|
data/RELEASING.md
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Releasing ruby-link-checker
|
|
2
|
-
|
|
3
|
-
There are no hard rules about when to release ruby-link-checker. Release bug fixes frequently, features not so frequently and breaking API changes rarely.
|
|
4
|
-
|
|
5
|
-
Releases use [ruby-gem-release](https://github.com/dblock/ruby-gem-release/tree/v0.3.1) and the manual [Release workflow](.github/workflows/release.yml). Merges do not publish. Every workflow dispatch performs a real release.
|
|
6
|
-
|
|
7
|
-
## One-Time Setup
|
|
8
|
-
|
|
9
|
-
Create a GitHub environment named `release` in this repository. Restrict deployment to `main` and require approval when available.
|
|
10
|
-
|
|
11
|
-
On [RubyGems.org](https://rubygems.org/gems/ruby-link-checker/trusted_publishers), configure a trusted publisher with repository owner `dblock`, repository name `ruby-link-checker`, workflow filename `release.yml`, and environment `release`. Set the separate workflow repository owner to `dblock` and name to `ruby-gem-release` because publication uses its reusable workflow. No stored RubyGems API key is needed.
|
|
12
|
-
|
|
13
|
-
The workflow requests `contents: write` and `id-token: write`. Branch rules must allow the release identity to push fast-forward release and next-version commits to `main` and create tags, without allowing force pushes or deletion. Adding the workflow does not configure these permissions or the trusted publisher.
|
|
14
|
-
|
|
15
|
-
## Prepare and Publish
|
|
16
|
-
|
|
17
|
-
Prepare the intended version in `lib/ruby-link-checker/version.rb` and its matching `### VERSION (Next)` section in `CHANGELOG.md` through a PR. Keep exactly one `* Your contribution here.` placeholder in that section. The workflow releases the current version, dates the changelog, and removes the placeholder; it does not select a new release version.
|
|
18
|
-
|
|
19
|
-
Run tests and RuboCop locally and review the release changes before merging:
|
|
20
|
-
|
|
21
|
-
```sh
|
|
22
|
-
bundle exec rake
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
After merging, explicit release approval, and successful Trusted Publishing setup, dispatch from `main`:
|
|
26
|
-
|
|
27
|
-
```sh
|
|
28
|
-
gh workflow run release.yml --ref main
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
The workflow runs `bundle exec rake`, publishes the verified gem to RubyGems, pushes the release commit and tag atomically, and creates a GitHub Release with the gem attached. It then increments the patch version and pushes a new development commit with a fresh changelog section. Actions-token pushes do not trigger ordinary push workflows, so the release workflow runs tests and RuboCop before publication.
|
|
32
|
-
|
|
33
|
-
## Verify and Recover
|
|
34
|
-
|
|
35
|
-
Verify the published RubyGems version, matching tag and GitHub Release, attached gem, and next development version on `main`.
|
|
36
|
-
|
|
37
|
-
Never automatically rerun a failed or timed-out publication: RubyGems may have accepted the upload. Check registry and GitHub state first. Do not republish an existing version or move its tag. Available `release.gem`, `release.json`, and `release.bundle` recovery artifacts are retained for 30 days; follow the [upstream recovery instructions](https://github.com/dblock/ruby-gem-release/blob/v0.3.1/RELEASING.md#verify-and-recover) to complete only the missing steps.
|
data/Rakefile
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'rubygems'
|
|
4
|
-
require 'bundler/gem_tasks'
|
|
5
|
-
|
|
6
|
-
Bundler.setup :default, :development
|
|
7
|
-
|
|
8
|
-
require 'rspec/core'
|
|
9
|
-
require 'rspec/core/rake_task'
|
|
10
|
-
|
|
11
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
|
12
|
-
spec.pattern = FileList['spec/**/*_spec.rb']
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
require 'rubocop/rake_task'
|
|
16
|
-
RuboCop::RakeTask.new(:rubocop)
|
|
17
|
-
|
|
18
|
-
require 'ruby-gem-release/workflow/ruby_gem'
|
|
19
|
-
require 'ruby-gem-release/changelog'
|
|
20
|
-
|
|
21
|
-
RubyGemRelease::Workflow::RubyGem.new(
|
|
22
|
-
version: RubyGemRelease::Version::RubyConstant.new(path: 'lib/ruby-link-checker/version.rb', constant: 'VERSION'),
|
|
23
|
-
changelog: RubyGemRelease::Changelog::Intridea.new(placeholder: '* Your contribution here.')
|
|
24
|
-
).install_tasks
|
|
25
|
-
|
|
26
|
-
task default: %i[rubocop spec]
|
data/benchmarks/check.rb
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
require 'benchmark'
|
|
2
|
-
require 'net/http'
|
|
3
|
-
require 'typhoeus'
|
|
4
|
-
require 'async'
|
|
5
|
-
require 'async/http'
|
|
6
|
-
require 'ruby-link-checker'
|
|
7
|
-
|
|
8
|
-
input = File.readlines(File.join(__dir__, 'data/opensearch.org/small.txt')).map(&:strip)
|
|
9
|
-
|
|
10
|
-
CHECKERS = [
|
|
11
|
-
# LinkChecker::Net::HTTP::Checker,
|
|
12
|
-
LinkChecker::Typhoeus::Hydra::Checker,
|
|
13
|
-
LinkChecker::Async::HTTP::Checker
|
|
14
|
-
].freeze
|
|
15
|
-
|
|
16
|
-
Benchmark.bm(40) do |benchmark|
|
|
17
|
-
CHECKERS.each do |checker_klass|
|
|
18
|
-
benchmark.report(checker_klass.name) do
|
|
19
|
-
checker = checker_klass.new
|
|
20
|
-
checker.logger.level = Logger::INFO
|
|
21
|
-
case checker
|
|
22
|
-
when LinkChecker::Typhoeus::Hydra::Checker
|
|
23
|
-
checker.timeout = 5 # 1/12th of the default 60s
|
|
24
|
-
checker.connecttimeout = 1 # 1/10th of the default 10s
|
|
25
|
-
else
|
|
26
|
-
checker.read_timeout = 5 # 1/12th of the default 60s
|
|
27
|
-
checker.open_timeout = 5 # 1/12th of the default 60s
|
|
28
|
-
end
|
|
29
|
-
input.each do |url|
|
|
30
|
-
checker.check url
|
|
31
|
-
end
|
|
32
|
-
checker.run if checker.respond_to?(:run)
|
|
33
|
-
checker.results.each_pair do |bucket, results|
|
|
34
|
-
puts "#{bucket}: #{results.size}"
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|