forked from spryker/spryker-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
104 lines (97 loc) · 2.79 KB
/
Rakefile
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
task "assets:precompile" do
exec("jekyll build --config=_config.yml,_config_production.yml")
end
require 'html-proofer'
commonOptions = {
:allow_hash_href => true,
:url_ignore => [
/mysprykershop.com\/[\.\w\-\/\?]+/,
/b2c-demo-shop.local\/[\.\w\-\/\?]+/,
/zed.de.b2b-demo-shop.local\/[\.\w\-\/\?]+/,
/mydomain.com\/[\.\w\-\/\?]+/,
/demoshop.local\/[\.\w\-\/\?]+/,
/mysprykershop.com:10007\/[\.\w\-\/\?]+/,
/www.pexels.com\/[@\.\w\-\/\?]+/,
/pixabay.com\/[\.\w\-\/\?]+/,
/xentral.com\/[\.\w\-\/\?]+/,
/github.com\/[\.\w\-\/]+\.md/
],
:file_ignore => [],
:typhoeus => {
:ssl_verifypeer => false,
:ssl_verifyhost => 0
},
:disable_external => false,
:check_html => true,
:validation => {
:report_eof_tags => true,
:report_invalid_tags => true,
:report_mismatched_tags => true,
:report_missing_doctype => true,
:report_missing_names => true,
:report_script_embeds => true,
},
:empty_alt_ignore => true,
:only_4xx => true,
:http_status_ignore => [429],
:parallel => { :in_processes => 4},
:cache => { :timeframe => '2w' }
}
task :check_cloud do
options = commonOptions.dup
options[:file_ignore] = [
/docs\/scos\/.+/,
/docs\/marketplace\/.+/,
]
HTMLProofer.check_directory("./_site", options).run
end
task :check_mp_dev do
options = commonOptions.dup
options[:file_ignore] = [
/docs\/scos\/.+/,
/docs\/cloud\/.+/,
/docs\/marketplace\/user\/.+/,
]
HTMLProofer.check_directory("./_site", options).run
end
task :check_mp_user do
options = commonOptions.dup
options[:file_ignore] = [
/docs\/scos\/.+/,
/docs\/cloud\/.+/,
/docs\/marketplace\/dev\/.+/,
]
HTMLProofer.check_directory("./_site", options).run
end
task :check_scos_dev do
options = commonOptions.dup
options[:file_ignore] = [
/docs\/marketplace\/.+/,
/docs\/cloud\/.+/,
/docs\/scos\/user\/.+/,
/docs\/scos\/\w+\/[\w-]+\/201811\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/201903\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/201907\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/202001\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/202005\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/202009\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/202200\.0\/.+/
]
HTMLProofer.check_directory("./_site", options).run
end
task :check_scos_user do
options = commonOptions.dup
options[:file_ignore] = [
/docs\/marketplace\/.+/,
/docs\/cloud\/.+/,
/docs\/scos\/dev\/.+/,
/docs\/scos\/\w+\/[\w-]+\/201811\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/201903\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/201907\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/202001\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/202005\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/202009\.0\/.+/,
/docs\/scos\/\w+\/[\w-]+\/202200\.0\/.+/
]
HTMLProofer.check_directory("./_site", options).run
end