Permalink
Browse files

Remove trailing slashes in gem names

fixes #1372
  • Loading branch information...
1 parent d758698 commit 667f0017badfef3c36046e725fb3c9b696494067 @indirect indirect committed Sep 17, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/bundler/cli.rb
View
@@ -473,6 +473,7 @@ def viz
desc "gem GEM", "Creates a skeleton for creating a rubygem"
method_option :bin, :type => :boolean, :default => false, :aliases => '-b', :banner => "Generate a binary for your library."
def gem(name)
+ name = name.chomp("/") # remove trailing slash if present
target = File.join(Dir.pwd, name)
constant_name = name.split('_').map{|p| p.capitalize}.join
constant_name = constant_name.split('-').map{|q| q.capitalize}.join('::') if constant_name =~ /-/

0 comments on commit 667f001

Please sign in to comment.