diff options
author | José Valim <jose.valim@gmail.com> | 2011-11-25 09:44:14 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-11-25 09:44:14 -0800 |
commit | 2dab493867d35d27015e3ba00d20ee6d2337320e (patch) | |
tree | da6299cf2d9bcde99187f725d572832ef6b278ee /railties/lib/rails | |
parent | 6f5fdf81799d3d7596ca3821b1c04ce2b36fcd87 (diff) | |
parent | 95e9b5fbfd87b81bf2d2b16a6df6d9ddbfdb686d (diff) | |
download | rails-2dab493867d35d27015e3ba00d20ee6d2337320e.tar.gz rails-2dab493867d35d27015e3ba00d20ee6d2337320e.tar.bz2 rails-2dab493867d35d27015e3ba00d20ee6d2337320e.zip |
Merge pull request #3756 from johnmdonahue/update-gem-action-linebreaks-and-indentation
Updating newline fix to maintain existing linebreaks and indentation and...
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index 184cb2866b..ca93f9ef9d 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -68,8 +68,9 @@ module Rails end in_root do - str = "\ngem #{parts.join(", ")}\n" + str = "gem #{parts.join(", ")}" str = " " + str if @in_group + str = "\n" + str append_file "Gemfile", str, :verbose => false end end @@ -87,13 +88,13 @@ module Rails log :gemfile, "group #{name}" in_root do - append_file "Gemfile", "\ngroup #{name} do\n", :force => true + append_file "Gemfile", "\ngroup #{name} do", :force => true @in_group = true instance_eval(&block) @in_group = false - append_file "Gemfile", "end\n", :force => true + append_file "Gemfile", "\nend\n", :force => true end end |