Project

gitfeed

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby gem to create RSS feeds from commits in a Git stream and an optional Sinatra based server
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0
>= 0
 Project Readme

gitfeed¶ ↑

Produces an RSS v2 XML stream for a Git repository. Can be used inline in an application or as a stand-alone server.

Usage¶ ↑

Gitfeed can be used inline in an application to produce a string with the RSS commits:

require 'rubygems'
require 'gitfeed'

gf = Gitfeed.new('/home/git/repository')
puts gf.feed

It can also be used as a standalone server inside of an application:

require 'rubygems'
require 'gitfeed'

Gitfeed::Server.start('/home/git/repository')

Or it can be used on the command line:

gitfeed /home/git/repository

Customizing the output¶ ↑

You can specify a Haml file to be used for each entry, the default is:

/  
%p
  %strong Author:
  = entry.author.name
  <
  %a{ :href => "mailto:#{entry.author.email}" }
    = entry.author.email
  >
%p
  %strong Date:
  = entry.author.date
%p
  %strong Message:
  = entry.message
%p
  %strong SHA:
  = entry.objectish
- if @include_diffs && !entry.parents.empty?
  %pre
    = @git.diff(entry.parents.first.objectish, entry.objectish)

This can be passed as a configuration option either to the construtor, server or command line:

gitfeed --template=template.haml /home/git/repository

Copyright © 2010 Scott Wheeler. See LICENSE for details.