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

Only load Rubocop tasks if available #299

Merged
merged 1 commit into from
Jan 10, 2017

Conversation

gudmundur
Copy link
Member

Fixes #296.

cc: @mathias

@gudmundur gudmundur requested a review from brandur January 9, 2017 11:13
@gudmundur
Copy link
Member Author

I think a follow up to this should be an automated way to detect whether the template has broken in this way. That is, can a freshly created app be started on Heroku.

@@ -1,6 +1,7 @@
if Gem.loaded_specs.has_key?("rubocop-rspec")
Copy link
Member

Choose a reason for hiding this comment

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

Much nicer than a require + rescue.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I spent a while trying to find an alternative way for that. The rescue LoadError makes me cringe.

Copy link
Member

@brandur brandur left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks again @gudmundur.

@gudmundur gudmundur merged commit 86c681b into master Jan 10, 2017
@gudmundur gudmundur deleted the load-rubocop-tasks-if-available branch January 10, 2017 10:08
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.

2 participants