Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add :verbose option to HTML::Proofer to give progress as it goes #43

Merged
merged 4 commits into from
May 22, 2014
Merged

Conversation

parkr
Copy link
Contributor

@parkr parkr commented May 21, 2014

This gives users insight into the progress of HTML Proofer as well as mitigates a Travis timeout due to lack of output.

  • Add --verbose to CLI
  • Add :verbose to HTML Proofer, defaults to false
  • Add debug output for checks (using Yell)
  • Upgrade to HTML Pipeline 1.8 and escape_utils 1.0 (to fix Ruby 2.1 problem)

@parkr
Copy link
Contributor Author

parkr commented May 21, 2014

Wanted to add output for each item that the hydra instance is running but no luck. @i0rek, would it be possible to add #debug output for each item as it's performed in multi.perform?

@hanshasselberg
Copy link

hey @parkr, I see you found the verbose option - did that help?

@parkr
Copy link
Contributor Author

parkr commented May 21, 2014

@i0rek: Thanks! I receive only this output, however:

Checking 395 external links...
ETHON: Libcurl initialized
Running requests for all 395 external URLs...
ETHON: started MULTI
^C/Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/ethon-0.7.0/lib/ethon/easy/callbacks.rb:39:in `block in body_write_callback': Interrupt
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/ethon-0.7.0/lib/ethon/easy/operations.rb:23:in `call'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/ethon-0.7.0/lib/ethon/easy/operations.rb:23:in `easy_perform'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/ethon-0.7.0/lib/ethon/easy/operations.rb:23:in `perform'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/request/operations.rb:16:in `run'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/request/cacheable.rb:18:in `run'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/request/block_connection.rb:31:in `run'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/request/stubbable.rb:23:in `run'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/request/before.rb:26:in `run'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/request/actions.rb:22:in `get'
    from /Users/parker/code/html-proofer/lib/html/proofer.rb:100:in `response_handler'
    from /Users/parker/code/html-proofer/lib/html/proofer.rb:63:in `block (2 levels) in run'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/request/callbacks.rb:129:in `call'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/request/callbacks.rb:129:in `block in execute_callbacks'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/request/callbacks.rb:128:in `map'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/request/callbacks.rb:128:in `execute_callbacks'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/request/operations.rb:35:in `finish'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/easy_factory.rb:105:in `block in set_callback'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/ethon-0.7.0/lib/ethon/easy/response_callbacks.rb:65:in `call'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/ethon-0.7.0/lib/ethon/easy/response_callbacks.rb:65:in `block in complete'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/ethon-0.7.0/lib/ethon/easy/response_callbacks.rb:65:in `each'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/ethon-0.7.0/lib/ethon/easy/response_callbacks.rb:65:in `complete'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/ethon-0.7.0/lib/ethon/multi/operations.rb:148:in `check'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/ethon-0.7.0/lib/ethon/multi/operations.rb:161:in `run'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/ethon-0.7.0/lib/ethon/multi/operations.rb:43:in `perform'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/hydra/runnable.rb:21:in `run'
    from /Users/parker/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/typhoeus-0.6.8/lib/typhoeus/hydra/memoizable.rb:51:in `run'
    from /Users/parker/code/html-proofer/lib/html/proofer.rb:67:in `run'
    from ./bin/htmlproof:40:in `block (2 levels) in <main>'

Then it just sits there for a while...

@hanshasselberg
Copy link

@parkr I don't think you're using the verbose option from Typhoeus/Ethon. You could however use the on_complete hook to show progress... verbose is pretty verbose.

@parkr
Copy link
Contributor Author

parkr commented May 22, 2014

It's all in the details, @i0rek. I decided to add a debug statement of my own to our response handler (called by the proc for #on_complete). Vielen Dank, Hans! Hoffe, dass es dir gut geht. 😃

@parkr
Copy link
Contributor Author

parkr commented May 22, 2014

@gjtorikian All set to go, methinks.

gjtorikian added a commit that referenced this pull request May 22, 2014
Add :verbose option to HTML::Proofer to give progress as it goes
@gjtorikian gjtorikian merged commit 99fa962 into gjtorikian:master May 22, 2014
@parkr parkr deleted the verbose branch May 22, 2014 23:04
@parkr
Copy link
Contributor Author

parkr commented May 22, 2014

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants