-
-
Notifications
You must be signed in to change notification settings - Fork 205
How to configure Typhoeus
William Entriken edited this page May 2, 2017
·
5 revisions
Typhoeus is responsible for the HTTP connection. We can configure much of html-proofers' behavior by configuring Typhoeus. For all of these configurations you will need to call html-proofer from Ruby and you cannot do this using the command-line version of the program.
TODO: Link to Typhoeus ruby documentation.
TODO MAKE THIS A REAL RUBY FILE
# Normal way to run
HTML::Proofer.new("out/").run
# How to run with Typhoeus changes
typhoeus_configuration = {
:timeout => 10,
:verbose => true
}
HTML::Proofer.new("out/", {:typhoeus => typhoeus_configuration}).run
TODO: Explain how someone who never used ruby before can get this to run.
This will log timeout failures and stop the connection attempt if no connection is made within 10 seconds.
typhoeus_configuration = {
:timeout => 10,
:verbose => true
}