Skip to content

Instantly share code, notes, and snippets.

@ilpoldo
Forked from granth/config.ru
Created September 1, 2012 17:31
Show Gist options
  • Save ilpoldo/3581082 to your computer and use it in GitHub Desktop.
Save ilpoldo/3581082 to your computer and use it in GitHub Desktop.
# Rack file for local Rubygems server, using YARD
require "rubygems"
require "yard"
libraries = {}
Gem.source_index.find_name('').each do |spec|
libraries[spec.name] ||= []
libraries[spec.name] << YARD::Server::LibraryVersion.new(spec.name, spec.version.to_s, nil, :gem)
end
options = {:single_library => false}
server_options = {}
run YARD::Server::RackAdapter.new(libraries, options, server_options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment