Class: Debci::HTML::Feed

Inherits:
Rooted
  • Object
show all
Defined in:
lib/debci/html.rb

Instance Attribute Summary

Attributes inherited from Rooted

#datadir, #root

Instance Method Summary collapse

Constructor Details

#initializeFeed

Returns a new instance of Feed.



108
109
110
111
# File 'lib/debci/html.rb', line 108

def initialize
  @datadir = 'feeds'
  super
end

Instance Method Details

#package(pkg) ⇒ Object



113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/debci/html.rb', line 113

def package(pkg)
  news = pkg.news
  write_feed(news, root / pkg.prefix / "#{pkg.name}.xml") do |feed|
    feed.channel.title = "#{pkg.name} CI news feed"
    feed.channel.about = Debci.config.url_base + "/packages/#{pkg.prefix}/#{pkg.name}/"
    feed.channel.description = [
      "News for #{pkg.name}.",
      'Includes only state transitions (pass-fail, and fail-pass).',
      'Full history is available in the package page and in the published data files.',
    ].join(' ')
  end
end