module Repobrowse::GitAtom
Copyright (C) 2017-2018 all contributors <repobrowse-public@80x24.org> License: AGPL-3.0+ <www.gnu.org/licenses/agpl-3.0.txt>
Constants
- ATOM_ARGV
running git-log(1) here for now, path-limiting with libgit2|rugged seems like a pain to implement
- DATEFMT
Public Instance Methods
atom(r, repo, ref, path)
click to toggle source
/$REPO_NAME/atom/$REF:PATH
# File lib/repobrowse/git_atom.rb, line 99 def atom(r, repo, ref, path) git_disambiguate(r, repo, 'atom', ref, path) max = 50 argv = [ *ATOM_ARGV, *%W(-#{max} #{ref} --) ] argv << path if path rd = repo.driver.popen(argv) body = Body.new(rd, r, repo, ref, path) r.halt([ 200, { 'Content-Type' => 'application/atom+xml' }, body ]) end