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



209
210
211
# File 'lib/debci/html.rb', line 209

def datadir
  'feeds'
end

#package(pkg) ⇒ Object



213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/debci/html.rb', line 213

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