Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (17 sloc) 314 Bytes
require 'rubygems'
require 'sinatra'
require 'apty.rb'
before do
@apty = Apty.new("/home/zaargy/tmp")
end
get '/' do
Dir.glob("/home/zaargy/tmp/*.deb").sort
end
post '/' do
package_uri = params[:uri]
@apty.add(package_uri)
end
delete '/' do
package = params[:package]
@apty.remove(package)
end