lib/appraisal/gemfile.rb in appraisal-0.3.4 vs lib/appraisal/gemfile.rb in appraisal-0.3.5
- old
+ new
@@ -29,16 +29,16 @@
def to_s
[source_entry, dependencies_entry, gemspec_entry].join("\n\n")
end
def dup
- Gemfile.new.tap do |gemfile|
- gemfile.source @source
- dependencies.values.each do |dependency|
- gemfile.gem(dependency.name, *dependency.requirements)
- end
- gemfile.gemspec(@gemspec.options) if @gemspec
+ gemfile = Gemfile.new
+ gemfile.source @source
+ dependencies.values.each do |dependency|
+ gemfile.gem(dependency.name, *dependency.requirements)
end
+ gemfile.gemspec(@gemspec.options) if @gemspec
+ gemfile
end
def gemspec(options = {})
@gemspec = Gemspec.new(options)
end