Sha256: 9a921a1de67ec1c99f84493cd95d24da71bd427ef706e38973943703ed80dfa0

Contents?: true

Size: 592 Bytes

Versions: 2

Compression:

Stored size: 592 Bytes

Contents

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

module AptlyCli
  class AptlyMisc

    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 get_graph(extension)
      uri = "/graph.#{extension}"
      self.class.get(uri)
    end

    def get_version()
      uri = "/version"
      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_misc.rb
aptly_cli-0.2.0 lib/aptly_misc.rb