Skip to content

Commit

Permalink
Don't return duplicate gemset names
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed Jan 2, 2011
1 parent 11fdcaf commit 80e3df1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/gem_template/gems.rb
Expand Up @@ -84,10 +84,13 @@ def gemset=(gemset)
end

def gemset_names
[ :default, :solo ] + @gemsets[gemspec.name.to_sym].inject([]) { |array, (key, value)|
array.push(key) if value.is_a?(::Hash)
array
}
(
[ :default, :solo ] +
@gemsets[gemspec.name.to_sym].inject([]) { |array, (key, value)|
array.push(key) if value.is_a?(::Hash)
array
}
).uniq
end

def gemspec(reload=false)
Expand Down

0 comments on commit 80e3df1

Please sign in to comment.