Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Rack-based Local YARD Server
require 'rubygems'
require 'yard'
libs = Hash.new {|hash,key| hash[key] = [] }
base = ENV['GEM_PATH'].split(':')[1][%r{^.+(?=/.+@global$)}] rescue nil
if base
Gem.paths = {
'GEM_PATH' => Dir["#{base}/ruby-*"].join(':'),
'GEM_HOME' => ENV['GEM_HOME']
}
Gem.source_index.find_name('').each do |spec|
libs[spec.name] << YARD::Server::LibraryVersion.new(spec.name, spec.version.to_s, nil, :gem)
end
end
run YARD::Server::RackAdapter.new(libs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.