Sha256: b343f37fef2105b857938b8c266c70583a326bf18085b744382ccf0efb864414
Contents?: true
Size: 729 Bytes
Versions: 2
Compression:
Stored size: 729 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[:username] if config[:password] basic_auth "#{config[:username]}", "#{config[:password]}" end end 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.3 | lib/aptly_misc.rb |
aptly_cli-0.2.2 | lib/aptly_misc.rb |