Sha256: 4c328e6695c218ebc909a234c660c9634f885175bd5649c7af93e27a878df9ba

Contents?: true

Size: 1.38 KB

Versions: 661

Compression:

Stored size: 1.38 KB

Contents

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

  module Sass::Plugin::Configuration
    # Different default options in a m envirionment.
    def default_options
      @default_options ||= begin
        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

        {
          :always_update      => false,
          :template_location => root + '/public/stylesheets/sass',
          :css_location      => root + '/public/stylesheets',
          :cache_location    => root + '/tmp/sass-cache',
          :always_check      => env != "production",
          :quiet             => env != "production",
          :full_exception    => env != "production"
        }.freeze
      end
    end
  end

  config = Merb::Plugins.config[:sass] || Merb::Plugins.config["sass"] || {}

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

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

  require '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

Version data entries

661 entries across 375 versions & 18 rubygems

Version Path
classiccms-0.7.3 vendor/bundle/gems/haml-3.1.5/vendor/sass/lib/sass/plugin/merb.rb
classiccms-0.7.3 vendor/bundle/gems/haml-3.1.4/vendor/sass/lib/sass/plugin/merb.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/sass-3.2.19/lib/sass/plugin/merb.rb
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/sass-3.2.5/lib/sass/plugin/merb.rb
xass-0.1.0 lib/sass/plugin/merb.rb
oreorenasass-3.4.14 lib/sass/plugin/merb.rb
oreorenasass-3.4.13 lib/sass/plugin/merb.rb
oreorenasass-3.4.12 lib/sass/plugin/merb.rb
oreorenasass-3.4.11 lib/sass/plugin/merb.rb
oreorenasass-3.4.9 lib/sass/plugin/merb.rb
oreorenasass-3.4.7 lib/sass/plugin/merb.rb
oreorenasass-3.4.5 lib/sass/plugin/merb.rb
sadui-0.0.4 vendor/bundle/ruby/2.0.0/gems/sass-3.2.14/lib/sass/plugin/merb.rb
sadui-0.0.4 vendor/bundle/ruby/2.1.0/gems/sass-3.2.14/lib/sass/plugin/merb.rb
sass-3.2.19 lib/sass/plugin/merb.rb
sass-3.2.18 lib/sass/plugin/merb.rb
sass-3.2.17 lib/sass/plugin/merb.rb
sass-3.2.16 lib/sass/plugin/merb.rb
sass-3.2.15 lib/sass/plugin/merb.rb
sass-3.2.14 lib/sass/plugin/merb.rb