Sha256: 8bff59778629a57d0809e95063029118a640222f95a626a71e59d4e54501abdd

Contents?: true

Size: 525 Bytes

Versions: 2

Compression:

Stored size: 525 Bytes

Contents

require "aptly_cli/version"
require "aptly_load"
require "httmultiparty"
require "json"

module AptlyCli
  class AptlyPackage

    include HTTMultiParty

    # Load aptly-cli.conf and establish base_uri
    config = AptlyCli::AptlyLoad.new.configure_with("/etc/aptly-cli.conf")
    base_uri "http://#{config[:server]}:#{config[:port]}/api"

    if config[:debug] == true
      debug_output $stdout
    end

    def package_show(package_key)
      uri = "/packages/#{package_key}"
      self.class.get(uri)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aptly_cli-0.2.1 lib/aptly_package.rb
aptly_cli-0.2.0 lib/aptly_package.rb