-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Filters Manage Dependencies #80
Filters Manage Dependencies #80
Conversation
* Add dependency management test cases for each `Filter` with a dependency * Add `assert_dependency_management_error` custom assertion which asserts a custom exception and message are raised if a dependency is missing * Move all `Filter` dependencies to `Gemfile` `:test` block for test cases and CI * Implement `TestingDependency` helper to abstract unloading and loading `Gemfile` `:test` block gems when asserting dependency management errors * Implement `MissingDependencyException` custom exception with `MESSAGE` constant as a format string, so each `Filter` raises a uniform exception * Add `begin..rescue..end` blocks around each `Filter` `require` statement to raise a `MissingDependencyException` when a gem can not be loaded * Update README.md detailing new dependency management with listing of `Filter` gem dependencies * Add gemspec post install message to inform users their apps must bundle `Filter` dependencies
Notes/Questions:
|
@@ -1,4 +1,9 @@ | |||
require 'emoji' | |||
begin | |||
require "gemoji" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gemoji.rb
is just a stub for emoji.rb
. Changing this back to require "emoji"
will eliminate a require
. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd leave it alone in case the gem ever decides to load more things in gemoji.rb
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
Thanks for the pull! I've left comments inline. |
* Copy edit README.md * In gemspec, link README.md dependencies and update post install message * Rename test helper to `assert_dependency` * Remove `TestingDependency` in favor of stubbing `Kernal#require`
…in #to_hash is only used by #assert_equal_html
@jch You're welcome! The latest Travis build was terminated. It hung on |
re: double gem. Sounds good. Job restarted. On Wed, Aug 28, 2013 at 11:06 AM, Simeon Willbanks <notifications@github.com
-Jerry |
Just an update, but I pinged some other GitHubbers for feedback. I think the code here is fine, but wanted to get a 2nd pair of 👀 on it before I released it. |
Sounds good! |
* `SyntaxHighlightFilter` - `github-linguist` | ||
* `TextileFilter` - `RedCloth` | ||
|
||
_Note:_ See [Gemfile](https://github.com/jch/html-pipeline/blob/master/Gemfile) `:test` block for version requirements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub markdown supports relative links now. So you can just do /Gemfile
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
@jch This Pull Request has many twists and turns. Before you merge, maybe you want to rebase? If so, for your convenience, here is a list of pertinent commit messages.
|
No need to rebase, just fetch and merge master into your branch. I like On Tuesday, October 22, 2013, Simeon Willbanks wrote:
-Jerry |
Cool. It's good to go. Last night, I fetched and merged master. |
I'll cut a new release after I try this out on a few applications first. |
Sounds good! |
@simeonwillbanks @jch The move to |
Fixes #77
Filter
with adependency
assert_dependency_management_error
custom assertion whichasserts a custom exception and message are raised if a dependency
is missing
Filter
dependencies toGemfile
:test
block fortest cases and CI
TestingDependency
helper to abstract unloading andloading
Gemfile
:test
block gems when asserting dependencymanagement errors
MissingDependencyException
custom exception withMESSAGE
constant as a format string, so eachFilter
raises auniform exception
begin..rescue..end
blocks around eachFilter
require
statement to raise a
MissingDependencyException
when a gem cannot be loaded
of
Filter
gem dependenciesbundle
Filter
dependencies