Module: RoadForest

Defined in:
lib/roadforest.rb,
lib/roadforest/http.rb,
lib/roadforest/debug.rb,
lib/roadforest/graph.rb,
lib/roadforest/server.rb,
lib/roadforest/application.rb,
lib/roadforest/application.rb,
lib/roadforest/remote-host.rb,
lib/roadforest/http/message.rb,
lib/roadforest/path-matcher.rb,
lib/roadforest/source-rigor.rb,
lib/roadforest/http/keychain.rb,
lib/roadforest/interface/rdf.rb,
lib/roadforest/resource/list.rb,
lib/roadforest/interface/blob.rb,
lib/roadforest/http/user-agent.rb,
lib/roadforest/augment/augmenter.rb,
lib/roadforest/augment/affordance.rb,
lib/roadforest/graph/graph-copier.rb,
lib/roadforest/resource/leaf-item.rb,
lib/roadforest/resource/read-only.rb,
lib/roadforest/type-handlers/rdfa.rb,
lib/roadforest/http/adapters/excon.rb,
lib/roadforest/http/graph-response.rb,
lib/roadforest/http/graph-transfer.rb,
lib/roadforest/source-rigor/engine.rb,
lib/roadforest/source-rigor/parcel.rb,
lib/roadforest/augment/augmentation.rb,
lib/roadforest/authorization/policy.rb,
lib/roadforest/resource/parent-item.rb,
lib/roadforest/type-handlers/jsonld.rb,
lib/roadforest/authorization/manager.rb,
lib/roadforest/interface/application.rb,
lib/roadforest/test-support/matchers.rb,
lib/roadforest/type-handlers/handler.rb,
lib/roadforest/type-handlers/rdfpost.rb,
lib/roadforest/application/dispatcher.rb,
lib/roadforest/application/parameters.rb,
lib/roadforest/resource/role/writable.rb,
lib/roadforest/utility/class-registry.rb,
lib/roadforest/content-handling/engine.rb,
lib/roadforest/interface/utility/grant.rb,
lib/roadforest/source-rigor/graph-store.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/authorization/auth-entity.rb,
lib/roadforest/type-handlers/rdf-handler.rb,
lib/roadforest/interface/utility/backfill.rb,
lib/roadforest/resource/role/has-children.rb,
lib/roadforest/authorization/grant-builder.rb,
lib/roadforest/authorization/grants-holder.rb,
lib/roadforest/content-handling/media-type.rb,
lib/roadforest/graph/nav-affordance-builder.rb,
lib/roadforest/interface/utility/grant-list.rb,
lib/roadforest/source-rigor/rigorous-access.rb,
lib/roadforest/test-support/trace-formatter.rb,
lib/roadforest/content-handling/handler-wrap.rb,
lib/roadforest/source-rigor/http-investigator.rb,
lib/roadforest/test-support/dispatcher-facade.rb,
lib/roadforest/content-handling/common-engines.rb,
lib/roadforest/authorization/authentication-chain.rb,
lib/roadforest/authorization/default-authentication-store.rb,
lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb

Defined Under Namespace

Modules: AffordanceClient, Augment, Authorization, ContentHandling, Graph, HTTP, Interface, Resource, SSL, SourceRigor, TestSupport, Testing, TypeHandlers, Utility Classes: Application, Dispatcher, PathMatcher, PathProvider, Payload, 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(services) ⇒ Object



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

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

  application = RoadForest::Application.new(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, WEBrick::BasicLog::DEBUG ),
      :AccessLog => [
        [logfile, WEBrick::AccessLog::COMMON_LOG_FORMAT ],
        [logfile, WEBrick::AccessLog::REFERER_LOG_FORMAT ]
    ]
    }
    yield config if block_given?
  end
  application.run
end