Skip to content

Instantly share code, notes, and snippets.

@johnmdonahue
Created November 25, 2011 07:33
Show Gist options
  • Save johnmdonahue/1392998 to your computer and use it in GitHub Desktop.
Save johnmdonahue/1392998 to your computer and use it in GitHub Desktop.
Modified gem action str with leading newline
# http://github.com/rails/rails/blob/master/railties/lib/rails/generators/actions.rb#L70-74
# rails/railties/lib/rails/generators/actions.rb
# FROM:
in_root do
str = "gem #{parts.join(", ")}\n"
str = " " + str if @in_group
append_file "Gemfile", str, :verbose => false
end
# TO:
in_root do
str = "\ngem #{parts.join(", ")}\n"
str = " " + str if @in_group
append_file "Gemfile", str, :verbose => false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment