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

Modularize the gem #296

Merged
merged 16 commits into from
Jan 31, 2016
Merged

Modularize the gem #296

merged 16 commits into from
Jan 31, 2016

Conversation

gjtorikian
Copy link
Owner

The main goal of this PR is to continue to break up the HTMLProofer components into smaller subclasses. This PR introduces a new API to use the gem. Rather than call HTMLProofer.new, users will need to call a method specific to their need. These are now:

  • HTMLProofer.check_file -- used when running on just one file
  • HTMLProofer.check_directories -- used to run Proofer on one or more directories
  • HTMLProofer.check_links -- used to run Proofer on an array of links

It felt like the old HTMLProofer.new(...).run pattern was overloaded to do too many things, and was a little too magical. It also prevented the ability to run across multiple directories, since passing an array automatically meant it was an array of links.

I'm curious to hear thoughts from @penibelst on this direction (or from anyone, really). As it's a breaking change, it's slated for 3.0.

gjtorikian added a commit that referenced this pull request Jan 31, 2016
@gjtorikian gjtorikian merged commit 8498121 into proofer-three-oh Jan 31, 2016
@gjtorikian gjtorikian deleted the modularize branch January 31, 2016 12:19
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.

1 participant