Class: LgPodPlugin::Command::Update
- Inherits:
-
LgPodPlugin::Command
- Object
- CLAide::Command
- LgPodPlugin::Command
- LgPodPlugin::Command::Update
- Defined in:
- lib/command/update.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Update
constructor
A new instance of Update.
- #run ⇒ Object
Methods inherited from LgPodPlugin::Command
Constructor Details
#initialize(argv) ⇒ Update
Returns a new instance of Update.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/command/update.rb', line 28 def initialize(argv) self.log = argv.flag?('verbose') repo_flag = argv.flag?('repo-update') if repo_flag.nil? self.repo_update = true else self.repo_update = repo_flag end if argv.flag?('clean-install').nil? @clean_install = false else @clean_install = true end super end |
Class Method Details
.options ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/command/update.rb', line 18 def self. [ ["--sources=#{Pod::TrunkSource::TRUNK_REPO_URL}", 'The sources from which to update dependent pods. ' \ 'Multiple sources must be comma-delimited'], ['--exclude-pods=podName', 'Pods to exclude during update. Multiple pods must be comma-delimited'], ['--clean-install', 'Ignore the contents of the project cache and force a full pod installation. This only ' \ 'applies to projects that have enabled incremental installation'], ].concat(super) end |
Instance Method Details
#run ⇒ Object
44 45 46 47 48 49 |
# File 'lib/command/update.rb', line 44 def run begin_time = Time.now.to_i LgPodPlugin::Main.run("update", { :verbose => self.log, :repo_update => self.repo_update, :clean_install => self.clean_install }) end_time = Time.now.to_i LgPodPlugin.log_blue "`lg update`安装所需时间: #{end_time - begin_time}" end |