class Guard::CocoaPods

Constants

VERSION

Public Instance Methods

cli?() click to toggle source
# File lib/guard/cocoapods.rb, line 30
def cli?
  !!options[:cli]
end
reload() click to toggle source
# File lib/guard/cocoapods.rb, line 14
def reload
  refresh_podfile
end
run_all() click to toggle source
# File lib/guard/cocoapods.rb, line 18
def run_all
  refresh_podfile
end
run_on_additions(paths = []) click to toggle source
# File lib/guard/cocoapods.rb, line 22
def run_on_additions(paths = [])
  refresh_podfile
end
run_on_modifications(paths = []) click to toggle source
# File lib/guard/cocoapods.rb, line 26
def run_on_modifications(paths = [])
  refresh_podfile
end
start() click to toggle source
# File lib/guard/cocoapods.rb, line 10
def start
  refresh_podfile
end

Private Instance Methods

needs_refresh?() click to toggle source
# File lib/guard/cocoapods.rb, line 51
def needs_refresh?
  true
end
refresh_podfile() click to toggle source
# File lib/guard/cocoapods.rb, line 36
def refresh_podfile
  if needs_refresh?
    ::Guard::UI.info 'Refresh podfile', :reset => true
    start_at = Time.now
    # @result = Pod::Command::Install.new.run
    @result = system("pod install#{" #{options[:cli]}" if options[:cli]}")
    Notifier.notify(@result, Time.now - start_at)
    @result
  else
    UI.info 'Podfile already up-to-date', :reset => true
    Notifier.notify('up-to-date', nil)
    true
  end
end