Sha256: 3965ce14c7ce51b5a0291b101ea52d3719477ac69fabbf9b991b64760978f955

Contents?: true

Size: 1.06 KB

Versions: 15

Compression:

Stored size: 1.06 KB

Contents

$:.unshift File.expand_path('../../../lib', __FILE__)

require 'sinatra/base'
require 'sinatra/assetpack'
require 'compass'
require 'sinatra/support'

Encoding.default_external = 'utf-8'  if defined?(::Encoding)

class App < Sinatra::Base
  disable :show_exceptions
  enable  :raise_exceptions

  set :root, File.dirname(__FILE__)

  # This is a convenient way of setting up Compass in a Sinatra
  # project without mucking around with load paths and such.
  register Sinatra::CompassSupport

  # ### Compass sprite configuration
  # Skip this section if you don't need sprite images.
  #
  # Configure Compass so it knows where to look for sprites.  This tells
  # Compass to look for images in `app/images`, dump sprite images in the same
  # folder, and link to it with HTTP images path.
  #
  c = Compass.configuration
  c.project_path     = root
  c.images_dir       = "app/images"
  c.http_images_path = "/images"

  # Asset Pack.
  register Sinatra::AssetPack
  assets do
    css :main, ['/css/*.css']
  end

  get '/' do
    erb :index
  end
end

if __FILE__ == $0
  App.run!
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
sinatra-assetpack-0.2.0 examples/compass/app.rb
sinatra-assetpack-0.1.7 examples/compass/app.rb
sundawg-sinatra-assetpack-fork-0.1.6 examples/compass/app.rb
sinatra-assetpack-0.1.6 examples/compass/app.rb
sinatra-assetpack-0.1.5 examples/compass/app.rb
sinatra-assetpack-0.1.4 examples/compass/app.rb
sinatra-assetpack-0.1.3 examples/compass/app.rb
sinatra-assetpack-0.1.2 examples/compass/app.rb
sinatra-assetpack-0.1.1 examples/compass/app.rb
sinatra-assetpack-0.1.0 examples/compass/app.rb
sinatra-assetpack-flexible-compression-0.0.1 examples/compass/app.rb
sundawg-sinatra-assetpack-fork-0.0.12.pre1 examples/compass/app.rb
sinatra-assetpack-0.0.12.pre1 examples/compass/app.rb
sinatra-assetpack-0.0.11 examples/compass/app.rb
sinatra-assetpack-0.0.10 examples/compass/app.rb