Sha256: 6fc6a10dca36c89560228d531ee62265b682ef56779fe518c0fe59f2be3082cb

Contents?: true

Size: 1.23 KB

Versions: 5

Compression:

Stored size: 1.23 KB

Contents

xml.instruct! :xml, :version => '1.0', :encoding => 'utf-8'
xml.feed :'xml:lang' => 'en-US', :xmlns => 'http://www.w3.org/2005/Atom' do
  base_title = "#{@repo.name}: "
  base_url = "http://#{hostname}/#{@repo.param}"
  if params[:ref]
    url = base_url + "/#{params[:ref]}"
    title = base_title + params[:ref]
  else
    url = base_url
    title = base_title + "master"
  end
  xml.id url
  xml.link :type => 'text/html', :href => url, :rel => 'alternate'
  xml.link :type => 'application/atom+xml', :href => "#{url}.atom", :rel => 'self'
  xml.title title
  xml.subtitle "#{h(@repo.description)}"
  xml.updated(@commits.first ? rfc_date(@commits.first.committed_date) : rfc_date(Time.now.utc))
  @commits.each do |commit|
    xml.entry do |entry|
      entry.id "#{base_url}/commit/#{commit.id_abbrev}"
      entry.link :type => 'text/html', :href => "#{base_url}/commit/#{commit.id_abbrev}", :rel => 'alternate'
      entry.updated rfc_date(commit.committed_date)
      entry.title   "Commit #{commit.id_abbrev} to #{@repo.name}"
      entry.summary h(commit.short_message)
      entry.content h(commit.message)
      entry.author do |author|
        author.name  commit.author.name
        author.email commit.author.email
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
lenary-ginatra-2.0.2 views/atom.builder
ginatra-2.1.1 views/atom.builder
ginatra-2.1.0 views/atom.builder
ginatra-2.0.2 views/atom.builder
ginatra-2.0.1 views/atom.builder