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

Refactor html-proofer #147

Merged
merged 40 commits into from
Jan 28, 2015
Merged

Refactor html-proofer #147

merged 40 commits into from
Jan 28, 2015

Conversation

gjtorikian
Copy link
Owner

This refactors html-proofer into much more manageable and smaller chunks. Notably, it:

  • Moves the logging logic into its own class.
  • Moves the external URL checking logic into its own class.
  • Renames the horrible HTML::Proofer::Checks::Check to a more sane HTML::Proofer::Runner.
  • Simplifies custom test logic

It also namespaces Typheous/Hydra option passing; hence this will be a major version bump when merged.

Fixes #131, fixes #114, fixes #129.

Although none of you are under any obligation whatsoever to do so, a review from @penibelst / @benbalter / @parkr might be nice, to make sure I'm not missing something.

@gjtorikian gjtorikian closed this Jan 24, 2015
@gjtorikian gjtorikian reopened this Jan 24, 2015
options[:verbose] = opts['verbose'] unless opts['verbose'].nil?
options[:directory_index_file] = opts['directory_index_file'] unless opts['directory_index_file'].nil?
options[:validate_html] = opts['validate_html'] unless opts['validate_html'].nil?
options[:check_external_hash] = opts['check_external_hash'] unless opts['check_external_hash'].nil?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be DRY'd?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh probably. I was thinking about removing the bin entirely but I guess that's Not The Right Thing To Do ™️.

@parkr
Copy link
Contributor

parkr commented Jan 24, 2015

❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️ ❤️

@doktorbro
Copy link

Really nice.

With smaller chunks we could sometimes test classes instead of the whole thing. I’ve added tests for the new Utils class in 7006132.

@gjtorikian gjtorikian mentioned this pull request Jan 28, 2015
gjtorikian added a commit that referenced this pull request Jan 28, 2015
@gjtorikian gjtorikian merged commit e2bc8a0 into master Jan 28, 2015
@gjtorikian gjtorikian deleted the refactor branch January 28, 2015 23:02
@doktorbro
Copy link

Nice run.

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.

Add throttle options Refactor run method Namespace Typhoeus options
3 participants