Class: Debci::HTML

Inherits:
Object
  • Object
show all
Includes:
HTMLHelpers
Defined in:
lib/debci/html.rb,
lib/debci/html/cli.rb

Defined Under Namespace

Classes: CLI, Feed, JSON, Rooted

Constant Summary

Constants included from HTMLHelpers

Debci::HTMLHelpers::ICONS

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from HTMLHelpers

#expand_pin_packages, #expand_url, #filesize, #history_url, #icon, #package_url, #title_test_trigger_pin

Constructor Details

#initialize(root_directory = Debci.config.html_dir) ⇒ HTML

Returns a new instance of HTML.



138
139
140
141
142
143
144
# File 'lib/debci/html.rb', line 138

def initialize(root_directory=Debci.config.html_dir)
  @root_directory = root_directory
  @package_prefixes = Debci::Package.prefixes

  @head = read_config_file('head.html')
  @footer = read_config_file('footer.html')
end

Instance Attribute Details

#root_directoryObject (readonly)

Returns the value of attribute root_directory.



136
137
138
# File 'lib/debci/html.rb', line 136

def root_directory
  @root_directory
end

Class Method Details

.updateObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/debci/html.rb', line 23

def update
  html = Debci::HTML.new

  Debci.config.suite_list.each do |suite|
    Debci.config.arch_list.each do |arch|
      json = Debci::HTML::JSON.new(suite, arch)
      json.status
      json.history
      json.packages
    end
  end

  html.index('index.html')
end

.update_package(package) ⇒ Object



38
39
40
41
# File 'lib/debci/html.rb', line 38

def update_package(package)
  feed = Debci::HTML::Feed.new
  feed.package(package)
end

Instance Method Details

#index(filename) ⇒ Object



146
147
148
# File 'lib/debci/html.rb', line 146

def index(filename)
  expand_template(:index, filename)
end