lib/bundler/cli.rb in bundler-1.0.19.rc vs lib/bundler/cli.rb in bundler-1.0.20.rc
- old
+ new
@@ -148,16 +148,15 @@
"Do not allow the Gemfile.lock to be updated after this install"
method_option "deployment", :type => :boolean, :banner =>
"Install using defaults tuned for deployment environments"
def install(path = nil)
opts = options.dup
- opts[:without] ||= []
- if opts[:without].size == 1
- opts[:without] = opts[:without].map{|g| g.split(" ") }
+ if opts[:without]
+ opts[:without].map!{|g| g.split(" ") }
opts[:without].flatten!
+ opts[:without].map!{|g| g.to_sym }
end
- opts[:without] = opts[:without].map{|g| g.to_sym }
# Can't use Bundler.settings for this because settings needs gemfile.dirname
ENV['BUNDLE_GEMFILE'] = File.expand_path(opts[:gemfile]) if opts[:gemfile]
ENV['RB_USER_INSTALL'] = '1' if Bundler::FREEBSD
@@ -212,11 +211,11 @@
Bundler.settings[:path] = path if path
Bundler.settings[:path] = opts[:path] if opts[:path]
Bundler.settings[:bin] = opts["binstubs"] if opts[:binstubs]
Bundler.settings[:no_prune] = true if opts["no-prune"]
Bundler.settings[:disable_shared_gems] = Bundler.settings[:path] ? '1' : nil
- Bundler.settings.without = opts[:without] unless opts[:without].empty?
+ Bundler.settings.without = opts[:without]
Bundler.ui.be_quiet! if opts[:quiet]
Installer.install(Bundler.root, Bundler.definition, opts)
Bundler.load.cache if Bundler.root.join("vendor/cache").exist? && !options["no-cache"]
@@ -471,12 +470,13 @@
end
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 =~ /-/
+ constant_name = name.split('_').map{|p| p[0..0].upcase + p[1..-1] }.join
+ constant_name = constant_name.split('-').map{|q| q[0..0].upcase + q[1..-1] }.join('::') if constant_name =~ /-/
constant_array = constant_name.split('::')
git_author_name = `git config user.name`.chomp
git_author_email = `git config user.email`.chomp
author_name = git_author_name.empty? ? "TODO: Write your name" : git_author_name
author_email = git_author_email.empty? ? "TODO: Write your email address" : git_author_email