1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Sass] Make Merb work. Really.

Closes gh-163
This commit is contained in:
Nathan Weizenbaum 2010-05-13 23:22:41 -07:00
parent 16cd0a85bb
commit 7ce70d5334
2 changed files with 16 additions and 2 deletions

View file

@ -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, )`.

View file

@ -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