-
-
Notifications
You must be signed in to change notification settings - Fork 193
/
configuration.rb
61 lines (54 loc) · 1.47 KB
/
configuration.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
module HTMLProofer
module Configuration
require_relative 'version'
PROOFER_DEFAULTS = {
:allow_hash_href => false,
:alt_ignore => [],
:assume_extension => false,
:check_external_hash => false,
:check_favicon => false,
:check_html => false,
:check_img_http => false,
:check_opengraph => false,
:checks_to_ignore => [],
:directory_index_file => 'index.html',
:disable_external => false,
:empty_alt_ignore => false,
:enforce_https => false,
:error_sort => :path,
:extension => '.html',
:external_only => false,
:file_ignore => [],
:http_status_ignore => [],
:internal_domains => [],
:log_level => :info,
:only_4xx => false,
:url_ignore => [],
:url_swap => {}
}
TYPHOEUS_DEFAULTS = {
:followlocation => true,
:headers => {
'User-Agent' => "Mozilla/5.0 (compatible; HTML Proofer/#{HTMLProofer::VERSION}; +https://github.com/gjtorikian/html-proofer)"
}
}
HYDRA_DEFAULTS = {
:max_concurrency => 50
}
PARALLEL_DEFAULTS = {}
VALIDATION_DEFAULTS = {
:report_script_embeds => false,
:report_missing_names => false,
:report_invalid_tags => false,
:report_missing_doctype => false
}
CACHE_DEFAULTS = {}
def self.to_regex?(item)
if item.start_with?('/') && item.end_with?('/')
Regexp.new item[1...-1]
else
item
end
end
end
end