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
Generate empty lib/<project-name>.rb
file
#762
Conversation
@@ -44,7 +44,6 @@ | |||
# lib/<project>.rb | |||
# | |||
expect("lib/#{project}.rb").to have_file_content <<-END |
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.
can this be changed to just ""
(or "\n"?
) instead of using the HEREDOC?
Also, do we need this file at all, if it's blank? If so, could we put a comment in here saying something like
# This file is intentionally blank.
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.
@cllns Yeah, I'm gonna switch from HEREDOC to simpler string representation.
I was thinking to define a blank module like:
module Bookshelf
end
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.
Ohh. I like this! (empty module)
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 like an empty module too :)
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 idea with the empty module 👍
Maybe we also add the comment with this PR? I'm sure that some developers will have questions about this module in future.
Just to confirm. This fixes #758 for me :D |
Example: $ hanami new cool_project $ cd cool_project $ cat lib/cool_project.rb module CoolProject end
This PR implements a suggested solution to fix #758
/cc @ixti and @hanami/core for review.