Class: Debci::HTML::Feed

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

Instance Attribute Summary

Attributes inherited from Rooted

#root

Instance Method Summary collapse

Methods inherited from Rooted

#initialize

Constructor Details

This class inherits a constructor from Debci::HTML::Rooted

Instance Method Details

#datadirObject



203
204
205
# File 'lib/debci/html.rb', line 203

def datadir
  'feeds'
end

#package(pkg) ⇒ Object



207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/debci/html.rb', line 207

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