lib/rails/generators/actions.rb in railties-5.0.0.beta1.1 vs lib/rails/generators/actions.rb in railties-5.0.0.beta2
- old
+ new
@@ -18,11 +18,11 @@
options = args.extract_options!
name, version = args
# Set the message to be shown in logs. Uses the git repo if one is given,
# otherwise use name (version).
- parts, message = [ quote(name) ], name
+ parts, message = [ quote(name) ], name.dup
if version ||= options.delete(:version)
parts << quote(version)
message << " (#{version})"
end
message = options[:git] if options[:git]
@@ -73,10 +73,10 @@
def add_source(source, options={}, &block)
log :source, source
in_root do
if block
- append_file "Gemfile", "source #{quote(source)} do", force: true
+ append_file "Gemfile", "\nsource #{quote(source)} do", force: true
@in_group = true
instance_eval(&block)
@in_group = false
append_file "Gemfile", "\nend\n", force: true
else