Skip to content

Instantly share code, notes, and snippets.

@granth
Created September 2, 2010 15:39
Show Gist options
  • Save granth/562448 to your computer and use it in GitHub Desktop.
Save granth/562448 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)
@granth
Copy link
Author

granth commented Sep 2, 2010

You can use this to make a gems.local site in OS X, using PassengerPane. You'll have to create a public directory, too, because PassengerPane insists on setting DocumentRoot Rails-style.

@betawaffle
Copy link

I adapted this to pull from all gemsets (assuming you use rvm).

https://gist.github.com/1313488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment