Sha256: 1d50e3f9a1ef0d6be3d4abfad376a39cedf4c05929c0450a1447438e62ca1b32
Contents?: true
Size: 942 Bytes
Versions: 4
Compression:
Stored size: 942 Bytes
Contents
#!/usr/bin/env ruby # encoding: utf-8 $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__)) require 'logger' require 'open-uri' require 'zlib' require 'yajl' require 'ansi' require 'archive/tar/minitar' module Aurb #:nodoc: autoload :Aur, 'aurb/aur' class AurbError < StandardError def self.status_code(code = nil) return @code unless code @code = code end def status_code self.class.status_code end end class AurbDownloadError < AurbError; status_code(10); end class AurbArgumentError < AurbError; status_code(12); end class << self def logger @logger ||= Logger.new(STDOUT) end def aur_rpc_path(type, arg) "http://aur.archlinux.org/rpc.php?type=#{type}&arg=#{arg}" end def aur_download_path(pkg) "http://aur.archlinux.org/packages/#{pkg}/#{pkg}.tar.gz" end def aur @aur ||= Aur.new end end end require 'aurb/core_ext'
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
aurb-1.2.4 | lib/aurb.rb |
aurb-1.2.3 | lib/aurb.rb |
aurb-1.2.2 | lib/aurb.rb |
aurb-1.2.1 | lib/aurb.rb |