Class: Bundler::Dependencies::CLI
- Inherits:
-
Thor
- Object
- Thor
- Bundler::Dependencies::CLI
show all
- Defined in:
- lib/bundler/dependencies/cli.rb,
lib/bundler/dependencies/cli/find.rb,
lib/bundler/dependencies/cli/count.rb,
lib/bundler/dependencies/cli/graph.rb,
lib/bundler/dependencies/cli/command.rb,
lib/bundler/dependencies/cli/with_gem.rb
Defined Under Namespace
Modules: WithGem
Classes: Command, Count, Find, Graph
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.shared_options ⇒ Object
10
11
12
13
14
15
|
# File 'lib/bundler/dependencies/cli.rb', line 10
def self.shared_options
method_option :path, type: :string, desc: 'Path to Gemfile.lock to scan'
method_option :without, type: :array, desc: 'Gems to ignore', aliases: ['-W']
method_option :without_rails, type: :boolean, default: false, desc: 'Ignore all Rails gems', aliases: ['-R']
method_option :color, type: :boolean, default: true, desc: 'Colorize output'
end
|
Instance Method Details
#count(*args) ⇒ Object
29
30
31
32
33
|
# File 'lib/bundler/dependencies/cli.rb', line 29
def count(*args)
return help(:count) if args.first == 'help'
Count.new(options).output
end
|
#find(gem = nil) ⇒ Object
48
49
50
51
52
|
# File 'lib/bundler/dependencies/cli.rb', line 48
def find(gem = nil)
return help(:find) if gem.nil? || gem == 'help'
Find.new(gem, options).output
end
|
#graph(gem = nil) ⇒ Object
38
39
40
41
42
|
# File 'lib/bundler/dependencies/cli.rb', line 38
def graph(gem = nil)
return help(:graph) if gem == 'help'
Graph.new(gem, options).output
end
|
#version ⇒ Object
21
22
23
|
# File 'lib/bundler/dependencies/cli.rb', line 21
def version
puts "#{File.basename($PROGRAM_NAME)} #{VERSION}"
end
|