1

I know that I can use ProxyPass to serve up my yardoc server instance but since yard uses Rack, shouldn't it be possible to run yard via Passenger?

How would I go about setting this up? The Passenger Docs describe a public directory and a config.ru for Rack apps, but they're not available in Yardoc's source.

Montana Harkin
  • 399
  • 5
  • 13
  • Looks that this [guide](http://chrismdp.github.com/2010/03/multiple-ci-joes-with-rack-and-passenger/) has the best solution for cijoe, which has the same issues as I describe with yardoc – Montana Harkin Dec 23 '10 at 18:24

1 Answers1

0

Yard does not provide a convenience Rack integration AFAIK, but it features a rack adapter that allows you to run it inside a Rack Server like Passenger.

You need to write your own config.ru to configure Passenger to run a Yard Server using Yard's RackAdapter class. Also you need to tell Yard where it can find the documentation it should serve.

I have not tested this, but here is a rough guess at what the config.ru should look like:

require "yard/server/rack_adapter"

run YARD::Server::RackAdapter.new({
  "mylib" => [
    YARD::Server::LibraryVersion.new("mylib", "1.0", "/path/to/mylib/.yardoc")
  ]
})

Where mylib is the name of the library you want to serve.

See here:

Kristian Hanekamp
  • 2,429
  • 1
  • 21
  • 13