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 = {})<br> config[:shell] ||= Bundler::Thor::Base.shell.new<br> dispatch(nil, given_args.dup, nil, config)
.dispatch(nil, given_args.dup, nil, config)
...<br>config[:current_command] = command<br> config[:command_options] = command.options<br><br> instance = new(args, opts, config)<br> yield instance if block_given?<br> args = instance.args<br> trailing = args[Range.new(arguments.size, -1)]<br> instance.invoke_command(command, trailing || [])<br>
include Invocation
require "bundler/vendor/thor/lib/thor/invocation"
# Invoke the given command if the given args.<br> def invoke_command(command, *args) #:nodoc:<br> current = @_invocations[self.class]<br><br> unless current.include?(command.name)<br> current << command.name<br> command.run(self, *args)<br> end<br> end<br> alias_method :invoke_task, :invoke_command
class Bundler::CLI
exe/bundle
Bundler::CLI.start(args, :debug => true)<br>
.start
def self.start(*)<br> super<br> rescue Exception => e
super = Bundler::Thor
CLI::Install
.run
约定方法
CLI::Viz
gem "ruby-graphviz"
brew install graphviz
.run
bundle install, bundle exec
0 条评论
下一页