Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (28 sloc) 0.721 kb
$LOAD_PATH.unshift File.dirname(__FILE__) + '/lib'
$LOAD_PATH.unshift File.dirname(__FILE__) + '/views'
require 'sprockets'
require 'neo-viz'
require 'find'
map '/' do
run Neo::Viz::App
end
map '/assets' do
environment = Sprockets::Environment.new
# map all dirs under /public to /assets
Find.find(File.join(Neo::Viz.install_path, "public")) do |path|
environment.append_path(path) if FileTest.directory?(path)
end
environment.instance_eval do
@context_class.instance_eval do
define_method :root_url do
'.'
end
end
end
run environment
end
map '/specs' do
environment = Sprockets::Environment.new
environment.append_path 'spec/coffeescripts'
run environment
end
Jump to Line
Something went wrong with that request. Please try again.