Module: RoadForest

Defined in:
lib/roadforest.rb,
lib/roadforest/rdf.rb,
lib/roadforest/http.rb,
lib/roadforest/debug.rb,
lib/roadforest/model.rb,
lib/roadforest/server.rb,
lib/roadforest/blob-model.rb,
lib/roadforest/application.rb,
lib/roadforest/application.rb,
lib/roadforest/remote-host.rb,
lib/roadforest/http/message.rb,
lib/roadforest/authorization.rb,
lib/roadforest/http/keychain.rb,
lib/roadforest/http/user-agent.rb,
lib/roadforest/rdf/graph-copier.rb,
lib/roadforest/resource/rdf/list.rb,
lib/roadforest/http/adapters/excon.rb,
lib/roadforest/http/graph-response.rb,
lib/roadforest/http/graph-transfer.rb,
lib/roadforest/test-support/matchers.rb,
lib/roadforest/application/dispatcher.rb,
lib/roadforest/application/parameters.rb,
lib/roadforest/resource/rdf/leaf-item.rb,
lib/roadforest/resource/rdf/read-only.rb,
lib/roadforest/resource/role/writable.rb,
lib/roadforest/utility/class-registry.rb,
lib/roadforest/content-handling/engine.rb,
lib/roadforest/resource/rdf/parent-item.rb,
lib/roadforest/test-support/http-client.rb,
lib/roadforest/application/path-provider.rb,
lib/roadforest/application/route-adapter.rb,
lib/roadforest/application/services-host.rb,
lib/roadforest/resource/role/has-children.rb,
lib/roadforest/content-handling/media-type.rb,
lib/roadforest/test-support/trace-formatter.rb,
lib/roadforest/content-handling/handler-wrap.rb,
lib/roadforest/content-handling/type-handler.rb,
lib/roadforest/test-support/dispatcher-facade.rb,
lib/roadforest/rdf/source-rigor/http-investigator.rb,
lib/roadforest/content-handling/type-handlers/rdfa.rb,
lib/roadforest/content-handling/type-handlers/jsonld.rb,
lib/roadforest/content-handling/type-handlers/rdfpost.rb,
lib/roadforest/content-handling/type-handlers/rdf-handler.rb

Defined Under Namespace

Modules: Authorization, ContentHandling, HTTP, MediaType, RDF, Resource, TestSupport, Testing, Utility Classes: Application, BlobModel, Dispatcher, Model, PathProvider, ProcessingSequenceError, RDFModel, RemoteHost, TraceFormatter

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.debug_ioObject

Returns the value of attribute debug_io.



3
4
5
# File 'lib/roadforest/debug.rb', line 3

def debug_io
  @debug_io
end

Class Method Details

.debug(message) ⇒ Object



5
6
7
8
# File 'lib/roadforest/debug.rb', line 5

def debug(message)
  return if @debug_io.nil?
  @debug_io.puts(message)
end

.serve(application, services) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/roadforest/server.rb', line 6

def self.serve(application, services)
  require 'webrick/accesslog'
  application.services = services

  logfile = services.logger
  logfile.info("#{Time.now.to_s}: Starting Roadforest server")

  application.configure do |config|
    config.adapter_options = {
      :Logger => WEBrick::Log.new(logfile),
      :AccessLog => [
        [logfile, WEBrick::AccessLog::COMMON_LOG_FORMAT ],
        [logfile, WEBrick::AccessLog::REFERER_LOG_FORMAT ]
    ]
    }
    yield config if block_given?
  end
  application.run
end