diff --git a/doc-src/SASS_CHANGELOG.md b/doc-src/SASS_CHANGELOG.md index 7be33bde..69bbff1a 100644 --- a/doc-src/SASS_CHANGELOG.md +++ b/doc-src/SASS_CHANGELOG.md @@ -5,6 +5,13 @@ ## 3.0.3 (Unreleased) +### Merb Support + +Merb, including 1.1.0 as well as earlier versions, +should *really* work with this release. + +### Bug Fixes + * Raise an informative error when mixin arguments have a mispaced comma, as in `@include foo(bar, )`. diff --git a/lib/sass/plugin/merb.rb b/lib/sass/plugin/merb.rb index 00801d60..c5724b84 100644 --- a/lib/sass/plugin/merb.rb +++ b/lib/sass/plugin/merb.rb @@ -25,6 +25,13 @@ unless defined?(Sass::MERB_LOADED) Sass::Plugin.options.merge!(config) require 'sass/plugin/rack' - # Merb::Config is used in Merb >= 1.1.0 - (Merb::Config[:app] || Merb::Config).use Sass::Plugin::Rack + class Sass::Plugin::MerbBootLoader < Merb::BootLoader + after Merb::BootLoader::RackUpApplication + + def self.run + # Apparently there's no better way than this to add Sass + # to Merb's Rack stack. + Merb::Config[:app] = Sass::Plugin::Rack.new(Merb::Config[:app]) + end + end end