Sha256: bc6197d38f8a735a93ea7fdab3d87d4169f644a1357b9ed0cfe0b03e7f1070c1
Contents?: true
Size: 1.05 KB
Versions: 2
Compression:
Stored size: 1.05 KB
Contents
require 'sinatra/base' require 'haml' require 'sass' require 'sprockets' require 'sprockets/sass' require 'sprockets/helpers' require 'compass' require 'coffee-script' require_relative '../lib/jst_pages' Compass.configuration do |config| config.project_path = File.dirname(__FILE__) config.sass_dir = 'assets/stylesheets' end module Furnace module Xray class App < Sinatra::Base register Sinatra::JstPages set :static, true set :public_folder, File.expand_path('../public', __FILE__) set :sprockets, Sprockets::Environment.new(root) set :assets_types, %w(javascripts stylesheets images) def self.run!(file, options={}) set :json_location, file assets_types.map{|x| sprockets.append_path ("#{root}/assets/#{x}") } super options end serve_jst '/jst.js' use Module.new { def self.new(app) Rack::Builder.new(app) do map('/assets') { run App.sprockets } end end } get '/' do haml :index end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
furnace-xray-1.1.0.pre2 | lib/furnace-xray/app/app.rb |
furnace-xray-1.1.0.pre1 | lib/furnace-xray/app/app.rb |