Sha256: 08cac8a6430c4d74bf71dffd7835d5ccdef0df28e6bf8be2455b2370120f3871
Contents?: true
Size: 471 Bytes
Versions: 1
Compression:
Stored size: 471 Bytes
Contents
module Git::Lighttp class Treeish < Application set :authenticate, false helpers GitHelpers before do authenticate! if settings.authenticate end get %r{/(.*?)/(.*?/{0,1}.*)$} do |name, path| content_type :json path = path.split("/") ref = path.shift tree = repository.tree(ref, path.join("/")) tree.to_json(:max_nesting => tree.size*6) end private helpers AuthenticationHelpers end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
git-lighttp-0.3.0 | lib/git/lighttp/treeish.rb |