lib/rocktumbler/group.rb in rocktumbler-0.1.3 vs lib/rocktumbler/group.rb in rocktumbler-0.2.0

- old
+ new

@@ -4,11 +4,11 @@ attr_accessor :name def initialize(name, gem_dependencies, opts) @name = name @opts = opts - @gems = gem_dependencies.map { |g| Rocktumbler::Gem.new(g, @opts) } + @gems = gems_from_dependencies(gem_dependencies) end def print str = "\n" prepend_spacing = (@name == :default) ? '' : ' ' @@ -16,8 +16,12 @@ str += "\ngroup #{@name.to_s.gsub(/[\[\]]/, '')} do\n" end str += @gems.map { |g| g.print(prepend_spacing) }.join("\n") str += "\nend\n" if @name != :default str + end + + def gems_from_dependencies(gem_dependencies) + gem_dependencies.map { |g| Rocktumbler::Gem.new(g, @opts) } end end end