Skip to content

Commit 2bcc020

Browse files
committed
Remove HOST constant
HOST was only used by validate-website-static via the check:markup task, but it has no significance, since the task checks the local files and not the specified URL.
1 parent 455e796 commit 2bcc020

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Rakefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ rescue LoadError => e
88
exit -1
99
end
1010

11-
HOST = 'www.ruby-lang.org'
1211
LANGUAGES = %w[bg de en es fr id it ja ko pl pt ru tr vi zh_cn zh_tw]
1312
CONFIG = "_config.yml"
1413

@@ -127,6 +126,6 @@ namespace :check do
127126
desc 'Validate _site markup with validate-website'
128127
task :markup do
129128
require_relative "lib/markup_checker"
130-
MarkupChecker.new.check(host: HOST)
129+
MarkupChecker.new.check
131130
end
132131
end

lib/markup_checker.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
class MarkupChecker
22

33
# Validate _site markup with validate-website
4-
def check(host:)
5-
url = "https://#{host}/"
6-
4+
def check
75
Dir.chdir("_site") do
8-
system("validate-website-static",
9-
"--verbose",
10-
"--exclude", "examples",
11-
"--site", "#{url}")
6+
system(
7+
"validate-website-static",
8+
"--verbose",
9+
"--exclude", "examples"
10+
)
11+
1212
exit($?.exitstatus)
1313
end
1414
end

0 commit comments

Comments
 (0)