class Drupid::DownloadStrategy::Fossil

Public Class Methods

new(url, dest, name, download_specs = {}) click to toggle source
Calls superclass method Drupid::DownloadStrategy::Base::new
    # File lib/drupid/download_strategy.rb
539 def initialize  url, dest, name, download_specs = {}
540   super
541   @clone = @dest + @name
542 end

Public Instance Methods

fetch() click to toggle source
    # File lib/drupid/download_strategy.rb
544 def fetch
545   raise "You must install fossil first" unless which "fossil"
546 
547   blah "Cloning #{@url}"
548   unless @clone.exist?
549     url=@url.sub(%r[^fossil://], '')
550     runBabyRun 'fossil', ['clone', url, @clone]
551   else
552     blah "Updating #{@clone}"
553     runBabyRun 'fossil', ['pull', '-R', @clone]
554   end
555 end
stage() click to toggle source
    # File lib/drupid/download_strategy.rb
557 def stage
558   # TODO: The 'open' and 'checkout' commands are very noisy and have no '-q' option.
559   runBabyRun 'fossil', ['open', @clone]
560   #if @spec and @ref
561   # ohai "Checking out #{@spec} #{@ref}"
562   # safe_system 'fossil', 'checkout', @ref
563   #end
564 end