Skip to content

Commit

Permalink
mapping all dirs under public to assets. Moved coffeescript from view…
Browse files Browse the repository at this point in the history
…s/ to public/
  • Loading branch information
andreashallberg committed Sep 27, 2011
1 parent b7f58a5 commit 2d66ae5
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions config.ru
Expand Up @@ -3,16 +3,19 @@ $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
environment.append_path 'public/javascripts'
environment.append_path 'public/lib/jasmine-1.1.0'
environment.append_path 'views/coffeescript'

# 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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2d66ae5

Please sign in to comment.