class Contraption::Orchestrator

Public Class Methods

new(options) click to toggle source
# File lib/contraption/orchestrator.rb, line 7
def initialize options
  @options = options
end

Public Instance Methods

run!() click to toggle source
# File lib/contraption/orchestrator.rb, line 11
def run!
  source.finalize_completed_drafts handlers
  site.build_all_individuals
  site.build_month_pages
  site.build_year_pages
  site.build_tag_pages
  site.build_tag_cloud
  site.build_recent
  site.build_landing
  site.build_rss
  site.build_archive_navigation
  copy_static_files

  post_run
end

Private Instance Methods

copy_static_files() click to toggle source
# File lib/contraption/orchestrator.rb, line 46
def copy_static_files
  `cp -r #{source.static_file_path}/* #{site.root}` unless (Dir[source.static_file_path.to_s + "/*"]).length == 0
end
formatter() click to toggle source
# File lib/contraption/orchestrator.rb, line 38
def formatter
  @formatter ||= source.formatter
end
handlers() click to toggle source
# File lib/contraption/orchestrator.rb, line 50
def handlers
  [ HttpHandler.new ]
end
post_run() click to toggle source
# File lib/contraption/orchestrator.rb, line 36
def post_run; end
posts() click to toggle source
# File lib/contraption/orchestrator.rb, line 42
def posts
  @posts ||= source.posts
end
site() click to toggle source
# File lib/contraption/orchestrator.rb, line 28
def site
  @site ||= Site.new @options.destination, posts, formatter
end
source() click to toggle source
# File lib/contraption/orchestrator.rb, line 32
def source
  raise "Not implemented"
end