Class: Bundler::CLI::Config
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::Bundler::Thor
|
|
Instance Chain:
|
|
Inherits: |
Bundler::Thor
|
Defined in: | lib/bundler/cli/config.rb |
Constant Summary
::Bundler::Thor
- Inherited
AmbiguousTaskError, Correctable, DynamicTask, HELP_MAPPINGS, HiddenTask, TEMPLATE_EXTNAME, THOR_RESERVED_WORDS, Task, UndefinedTaskError, VERSION
Class Method Summary
- .scope_options private
::Bundler::Thor
- Inherited
.at_least_one | Alias for Thor.method_at_least_one. |
.check_unknown_options! | Extend check unknown options to accept a hash of conditions. |
.command_help | Prints help information for the given command. |
.default_command | Sets the default command when thor is executed without an explicit command to be called. |
.default_task | Alias for Thor.default_command. |
.desc | Defines the usage and the description of the next command. |
.disable_required_check! | Disable the check for required options for the given commands. |
.exclusive | Alias for Thor.method_exclusive. |
.help | Prints help information for this class. |
.long_desc | Defines the long description of the next command. |
.map | Maps an input to a command. |
.method_at_least_one | Adds and declares option group for required at least one of options in the block of arguments. |
.method_exclusive | Adds and declares option group for exclusive options in the block and arguments. |
.method_option | Adds an option to the set of method options. |
.method_options | Declares the options for the next command to be declared. |
.option | Alias for Thor.method_option. |
.options | Alias for Thor.method_options. |
.package_name | Allows for custom “Command” package naming. |
.printable_commands | Returns commands ready to be printed. |
.printable_tasks | Alias for Thor.printable_commands. |
.register | Registers another |
.stop_on_unknown_option! | Stop parsing of options as soon as an unknown option or a regular argument is encountered. |
.subcommand, .subcommand_classes, .subcommands, | |
.subtask | Alias for Thor.subcommand. |
.subtasks | Alias for Thor.subcommands. |
.task_help | Alias for Thor.command_help. |
.banner | The banner for this class. |
.create_task | Alias for Thor.create_command. |
.find_command_possibilities | this is the logic that takes the command name passed in by the user and determines whether it is an unambiguous substrings of a command or alias name. |
.find_task_possibilities | Alias for Thor.find_command_possibilities. |
.normalize_task_name | Alias for Thor.normalize_command_name. |
.retrieve_task_name | Alias for Thor.retrieve_command_name. |
.sort_commands! | Sort the commands, lexicographically by default. |
.subcommand_help, | |
.subtask_help | Alias for Thor.subcommand_help. |
.check_unknown_options? | Overwrite check_unknown_options? to take subcommands and options into account. |
.command_exists? | Checks if a specified command exists. |
.deprecation_warning, .disable_required_check?, .stop_on_unknown_option?, .baseclass, .create_command, | |
.disable_required_check | help command has the required check disabled by default. |
.dispatch | The method responsible for dispatching given the args. |
.dynamic_command_class, .initialize_added, | |
.method_at_least_one_option_names | Returns this class at least one of required options array set. |
.method_exclusive_option_names | Returns this class exclusive options array set. |
.normalize_command_name | receives a (possibly nil) command name and returns a name that is in the commands hash. |
.print_at_least_one_required_options, .print_exclusive_options, | |
.retrieve_command_name | Retrieve the command name from given args. |
.stop_on_unknown_option |
Instance Attribute Summary
::Bundler::Thor::Base
- Included
Instance Method Summary
::Bundler::Thor
- Inherited
::Bundler::Thor::Base
- Included
#initialize | It receives arguments in an Array and two hashes, one for options and other for configuration. |
Class Method Details
.scope_options (private)
[ GitHub ]# File 'lib/bundler/cli/config.rb', line 7
def self. method_option :global, type: :boolean, banner: "Only change the global config" method_option :local, type: :boolean, banner: "Only change the local config" end
Instance Method Details
#base(name = nil, *value)
[ GitHub ]# File 'lib/bundler/cli/config.rb', line 16
def base(name = nil, *value) new_args = if ARGV.size == 1 ["config", "list"] elsif ARGV.include?("--delete") ARGV.map {|arg| arg == "--delete" ? "unset" : arg } elsif ARGV.include?("--global") || ARGV.include?("--local") || ARGV.size == 3 ["config", "set", *ARGV[1..-1]] else ["config", "get", ARGV[1]] end = "Using the `config` command without a subcommand [list, get, set, unset] is deprecated and will be removed in the future. Use `bundle #{new_args.join(" ")}` instead." = "Using the `config` command without a subcommand [list, get, set, unset] is has been removed. Use `bundle #{new_args.join(" ")}` instead." SharedHelpers.major_deprecation 3, , removed_message: Base.new(, name, value, self).run end