bundler
2018-06-20 11:46:58 3 举报
AI智能生成
bundler class digram
作者其他创作
大纲/内容
Bundler.settings
Settings
.bundle
user wide settings?
Bundler::Thor
from vendored_thor.rb
借助thor库能力
内嵌版本
require "bundler/vendor/thor/lib/thor"
include Bundler::Thor::Base
def start(given_args = ARGV, config = {})
config[:shell] ||= Bundler::Thor::Base.shell.new
dispatch(nil, given_args.dup, nil, config)
config[:shell] ||= Bundler::Thor::Base.shell.new
dispatch(nil, given_args.dup, nil, config)
.dispatch(nil, given_args.dup, nil, config)
...
config[:current_command] = command
config[:command_options] = command.options
instance = new(args, opts, config)
yield instance if block_given?
args = instance.args
trailing = args[Range.new(arguments.size, -1)]
instance.invoke_command(command, trailing || [])
config[:current_command] = command
config[:command_options] = command.options
instance = new(args, opts, config)
yield instance if block_given?
args = instance.args
trailing = args[Range.new(arguments.size, -1)]
instance.invoke_command(command, trailing || [])
include Invocation
require "bundler/vendor/thor/lib/thor/invocation"
# Invoke the given command if the given args.
def invoke_command(command, *args) #:nodoc:
current = @_invocations[self.class]
unless current.include?(command.name)
current << command.name
command.run(self, *args)
end
end
alias_method :invoke_task, :invoke_command
def invoke_command(command, *args) #:nodoc:
current = @_invocations[self.class]
unless current.include?(command.name)
current << command.name
command.run(self, *args)
end
end
alias_method :invoke_task, :invoke_command
class Bundler::CLI
exe/bundle
Bundler::CLI.start(args, :debug => true)
.start
def self.start(*)
super
rescue Exception => e
super
rescue Exception => e
super = Bundler::Thor
CLI::Install
.run
约定方法
CLI::Viz
gem "ruby-graphviz"
brew install graphviz
.run
bundle install, bundle exec
0 条评论
下一页