Class: Bundler::CLI::Config
Defined Under Namespace
Classes: Base
Constant Summary
Constants inherited from Thor
Thor::AmbiguousTaskError, Thor::Correctable, Thor::DynamicTask, Thor::HELP_MAPPINGS, Thor::HiddenTask, Thor::TEMPLATE_EXTNAME, Thor::THOR_RESERVED_WORDS, Thor::Task, Thor::UndefinedTaskError, Thor::VERSION
Instance Attribute Summary
Attributes included from Thor::Base
#args, #options, #parent_options
Instance Method Summary collapse
- #base(name = nil, *value) ⇒ Object
- #get(name) ⇒ Object
- #list ⇒ Object
- #set(name, value, *value_) ⇒ Object
- #unset(name) ⇒ Object
Methods inherited from Thor
check_unknown_options!, check_unknown_options?, command_exists?, command_help, default_command, deprecation_warning, desc, disable_required_check!, disable_required_check?, #help, help, long_desc, map, method_at_least_one, method_exclusive, method_option, method_options, package_name, printable_commands, register, stop_on_unknown_option!, stop_on_unknown_option?, subcommand, subcommand_classes, subcommands
Methods included from Thor::Base
included, #initialize, register_klass_file, subclass_files, subclasses
Instance Method Details
#base(name = nil, *value) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# 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 |
#get(name) ⇒ Object
41 42 43 |
# File 'lib/bundler/cli/config.rb', line 41 def get(name) Base.new(, name, nil, self).run end |
#list ⇒ Object
36 37 38 |
# File 'lib/bundler/cli/config.rb', line 36 def list Base.new(, nil, nil, self).run end |