lib/aptly_file.rb in aptly_cli-0.2.1 vs lib/aptly_file.rb in aptly_cli-0.2.2
- old
+ new
@@ -10,9 +10,15 @@
# 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 initialize(file_uri=nil, package=nil, local_file_path=nil)