module CocoapodsRepoUpdate::Helper
Public Class Methods
no_spec_found?(exception)
click to toggle source
# File lib/cocoapods_repo_update/helper.rb, line 21 def self.no_spec_found?(exception) exception.is_a?(Pod::NoSpecFoundError) end
specs_need_update?(exception)
click to toggle source
# File lib/cocoapods_repo_update/helper.rb, line 17 def self.specs_need_update?(exception) no_spec_found?(exception) || version_conflict?(exception) end
suppress_output() { || ... }
click to toggle source
Suppress stdout & stderr while the block is run
@yield invokes the block with output suppressed
# File lib/cocoapods_repo_update/helper.rb, line 7 def self.suppress_output original_stdout, original_stderr = $stdout.clone, $stderr.clone $stderr.reopen File.new('/dev/null', 'w') $stdout.reopen File.new('/dev/null', 'w') yield ensure $stdout.reopen original_stdout $stderr.reopen original_stderr end
version_conflict?(exception)
click to toggle source
# File lib/cocoapods_repo_update/helper.rb, line 25 def self.version_conflict?(exception) exception.cause.is_a?(Molinillo::VersionConflict) end