Method: Bundler::CLI#cli_help

Defined in:
lib/bundler/cli.rb

#cli_helpObject

[View source]

88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/bundler/cli.rb', line 88

def cli_help
  version
  Bundler.ui.info "\n"

  primary_commands = ["install", "update", "cache", "exec", "config", "help"]

  list = self.class.printable_commands(true)
  by_name = list.group_by {|name, _message| name.match(/^bundle (\w+)/)[1] }
  utilities = by_name.keys.sort - primary_commands
  primary_commands.map! {|name| (by_name[name] || raise("no primary command #{name}")).first }
  utilities.map! {|name| by_name[name].first }

  shell.say "Bundler commands:\n\n"

  shell.say "  Primary commands:\n"
  shell.print_table(primary_commands, indent: 4, truncate: true)
  shell.say
  shell.say "  Utilities:\n"
  shell.print_table(utilities, indent: 4, truncate: true)
  shell.say
  self.class.send(:class_options_help, shell)
end