Sha256: 1b17fa7cf149ec4b6f60dee61e8e1d5cbe62925f107562cc64002b8ce766525d

Contents?: true

Size: 1.05 KB

Versions: 3

Compression:

Stored size: 1.05 KB

Contents

$:.unshift File.dirname(__FILE__)

require 'webrick'
require 'file_processor'

module BuildMaster

class AboutHandler < WEBrick::HTTPServlet::AbstractServlet
# uncomment the following for automatic servlet reloading
#  def SourceFileHandler.get_instance config, *options
#    load __FILE__
#    SourceFileHandler.new config, *options
#  end

  def initialize(server, spec)
    super
    @config = server.config
    @logger = @config[:Logger]
    @spec = spec
  end
  
  def service(req, res)
    content = <<CONTENT
<html>
  <head><title>About BuildMaster</title>
  <body>
    <h1>About <a href="http://buildmaster.rubyforge.org" >BuildMaster</a></h1>
    <pre>
Version       : #{@spec.properties['buildmaster_version']}
Build Number  : #{@spec.properties['buildmaster_buildnumber']}
Licence       : <a href="http://buildmaster.rubyforge.org/license.html">Apache Licence, Version 2.0</a>
  </body>
</html>
CONTENT
    res['content-type'] = 'text/html'
    res['content-length'] = content.length
    res['last-modified'] = DateTime.new
    res.body = content
  end
  
end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
BuildMaster-1.0.6 lib/buildmaster/site/about_handler.rb
BuildMaster-1.0.9 lib/buildmaster/site/about_handler.rb
BuildMaster-1.1.9 lib/buildmaster/site/about_handler.rb