use sprockets vendored gems

This commit is contained in:
John Bintz 2012-03-09 10:06:27 -05:00
parent b1e99d46c6
commit 860e411435
2 changed files with 4 additions and 2 deletions

View File

@ -28,4 +28,5 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency 'rack'
gem.add_runtime_dependency 'sprockets'
gem.add_runtime_dependency 'coffee-script'
gem.add_runtime_dependency 'sprockets-vendor_gems'
end

View File

@ -1,6 +1,7 @@
require 'sprockets'
require 'sprockets/engines'
require 'forwardable'
require 'sprockets-vendor_gems'
module Flowerbox::Delivery
class SprocketsHandler
@ -8,7 +9,7 @@ module Flowerbox::Delivery
attr_reader :files, :options
def_delegators :environment, :append_path
def_delegators :environment, :append_path, :register_engine
def initialize(options)
@options = options
@ -27,7 +28,7 @@ module Flowerbox::Delivery
def environment
return @environment if @environment
@environment = Sprockets::Environment.new
@environment = Sprockets::EnvironmentWithVendoredGems.new
@environment.unregister_postprocessor('application/javascript', Sprockets::SafetyColons)
@environment.register_postprocessor('application/javascript', Flowerbox::Delivery::Tilt::EnsureSavedFile)
@environment.unregister_bundle_processor('text/css', Sprockets::CharsetNormalizer)