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 |
# File 'lib/command/update.rb', line 28 def initialize(argv) self.log = argv.flag?('verbose') self.repo_update = argv.flag?('repo-update') 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
34 35 36 37 38 39 |
# File 'lib/command/update.rb', line 34 def run begin_time = Time.now.to_i LgPodPlugin::Main.run("update", { :verbose => self.log, :repo_update => self.repo_update}) end_time = Time.now.to_i LgPodPlugin.log_blue "`lg update`安装所需时间: #{end_time - begin_time}" end |