summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2011-09-17 13:49:26 -0700
committerAndre Arko <andre@arko.net>2011-09-17 13:49:27 -0700
commit667f0017badfef3c36046e725fb3c9b696494067 (patch)
tree1c0acd39a20b3ce498abb16d3e2f15ead321751f
parentd758698c4eff5d13eabe33c8e62cbbfc19d648db (diff)
downloadbundler-667f0017badfef3c36046e725fb3c9b696494067.tar.gz
Remove trailing slashes in gem names
fixes #1372
-rw-r--r--lib/bundler/cli.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index beb01543f0..4ed5b7ab1c 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -473,6 +473,7 @@ module Bundler
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 =~ /-/