class Drupid::Updater::UpdateLibraryAction

Public Class Methods

new(platform, library) click to toggle source
Calls superclass method Drupid::Updater::AbstractAction::new
    # File lib/drupid/updater.rb
667 def initialize(platform, library)
668   raise "#{library.extended_name} does not exist locally" unless library.exist?
669   super
670 end

Public Instance Methods

msg() click to toggle source
    # File lib/drupid/updater.rb
672 def msg
673   "#{Tty.blue}[Update]#{Tty.white}  Library #{component.extended_name}#{Tty.reset} (#{platform.contrib_path + component.target_path})"
674 end

Protected Instance Methods

_install() click to toggle source

Deploys a library into the specified location.

    # File lib/drupid/updater.rb
679 def _install
680   args = Array.new
681   args << '-a'
682   args << '--delete'
683   component.ignore_paths.each { |p| args << "--exclude=#{p}" }
684   dst_path = platform.local_path + platform.contrib_path + component.target_path
685   dont_debug { dst_path.mkpath }
686   args << component.local_path.to_s + '/'
687   args << dst_path.to_s + '/'
688   begin
689     runBabyRun 'rsync', args
690   rescue => ex
691     odie "Installing or updating library #{component.name} failed: #{ex}"
692   end
693 end