mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
be7b592912
* lib/bundler, spec/bundler: Merge bundler-1.16.0. * common.mk: rspec examples of bundler-1.16.0 needs require option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
22 lines
637 B
Ruby
22 lines
637 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Bundler
|
|
class CLI::List
|
|
def initialize(options)
|
|
@options = options
|
|
end
|
|
|
|
def run
|
|
specs = Bundler.load.specs.reject {|s| s.name == "bundler" }.sort_by(&:name)
|
|
return specs.each {|s| Bundler.ui.info s.name } if @options["name-only"]
|
|
|
|
return Bundler.ui.info "No gems in the Gemfile" if specs.empty?
|
|
Bundler.ui.info "Gems included by the bundle:"
|
|
specs.each do |s|
|
|
Bundler.ui.info " * #{s.name} (#{s.version}#{s.git_version})"
|
|
end
|
|
|
|
Bundler.ui.info "Use `bundle info` to print more detailed information about a gem"
|
|
end
|
|
end
|
|
end
|