Sha256: 0d6749b0298d16f42ee67748ac0517a1c9b44fcbba103d5ab2dfced76300f43f

Contents?: true

Size: 1.39 KB

Versions: 91

Compression:

Stored size: 1.39 KB

Contents

unless defined?(Sass::MERB_LOADED)
  Sass::MERB_LOADED = true

  version = Merb::VERSION.split('.').map { |n| n.to_i }
  if version[0] <= 0 && version[1] < 5
    root = MERB_ROOT
    env  = MERB_ENV
  else
    root = Merb.root.to_s
    env  = Merb.environment
  end

  Sass::Plugin.options.merge!(:template_location => root + '/public/stylesheets/sass',
                              :css_location      => root + '/public/stylesheets',
                              :cache_location    => root + '/tmp/sass-cache',
                              :always_check      => env != "production",
                              :full_exception    => env != "production")
  config = Merb::Plugins.config[:sass] || Merb::Plugins.config["sass"] || {}

  if defined? config.symbolize_keys!
    config.symbolize_keys!
  end

  Sass::Plugin.options.merge!(config)

  if version[0] > 0 || version[1] >= 9

    class Merb::Rack::Application
      def call_with_sass(env)
        Sass::Plugin.check_for_updates
        call_without_sass(env)
      end
      alias_method :call_without_sass, :call
      alias_method :call, :call_with_sass
    end

  else

    class MerbHandler
      def process_with_sass(request, response)
        Sass::Plugin.check_for_updates
        process_without_sass(request, response)
      end
      alias_method :process_without_sass, :process
      alias_method :process, :process_with_sass
    end

  end
end

Version data entries

91 entries across 90 versions & 6 rubygems

Version Path
radiantcms-couchrest_model-0.1.4 vendor/plugins/haml/lib/sass/plugin/merb.rb
radiant-0.9.1 vendor/plugins/haml/lib/sass/plugin/merb.rb
haml-2.2.24 lib/sass/plugin/merb.rb
radiant-0.9.0.rc2 vendor/plugins/haml/lib/sass/plugin/merb.rb
haml-2.2.23 lib/sass/plugin/merb.rb
haml-edge-2.3.197 lib/sass/plugin/merb.rb
haml-edge-2.3.196 lib/sass/plugin/merb.rb
haml-edge-2.3.195 lib/sass/plugin/merb.rb
haml-edge-2.3.194 lib/sass/plugin/merb.rb
haml-edge-2.3.193 lib/sass/plugin/merb.rb
haml-edge-2.3.192 lib/sass/plugin/merb.rb
haml-edge-2.3.191 lib/sass/plugin/merb.rb
haml-edge-2.3.190 lib/sass/plugin/merb.rb
haml-edge-2.3.189 lib/sass/plugin/merb.rb
haml-edge-2.3.188 lib/sass/plugin/merb.rb
haml-edge-2.3.187 lib/sass/plugin/merb.rb
haml-edge-2.3.186 lib/sass/plugin/merb.rb
haml-edge-2.3.185 lib/sass/plugin/merb.rb
haml-edge-2.3.184 lib/sass/plugin/merb.rb
haml-3.0.0.beta.1 lib/sass/plugin/merb.rb