Sha256: 0bf6816ecd88ea791060204da0c3be82f0042ae243f033555b3805cdaab86394

Contents?: true

Size: 695 Bytes

Versions: 20

Compression:

Stored size: 695 Bytes

Contents

module Sprinkle
  module Errors
    
    class TransferFailure < PrettyFailure #:nodoc:
            
      def self.no_permission(installer,e)
        tf=TransferFailure.new(installer, {}, e)
        tf.details[:error]=e.message
        tf
      end
      
      def print_summary
        summary
        # log "Command", @details[:command]
        log "ERROR", @details[:error]
        if details[:error] =~ /Permission denied/
          log "HINTS", "You may want to try passing the :sudo option to transfer."
        end
      end
      
      def summary
        boxed("Package '#{@installer.package.name}' could not transfer #{@installer.source}")
      end
         
    end
    
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
sprinkle-0.7.7 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.7.6.2 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.7.6.1 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.7.6 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.7.5 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.7.4 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.7.3 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.7.2 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.7.1.1 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.7.1 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.7 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.6.2 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.6.1.1 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.6.1 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.6.0 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.5.2 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.5.1.1 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.5.1 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.5.0 lib/sprinkle/errors/transfer_failure.rb
sprinkle-0.5.0.rc1 lib/sprinkle/errors/transfer_failure.rb