Sha256: f998462c41c35f181c18366149dc6d1a140bd7f748aecc990eca1c49e89bd4aa

Contents?: true

Size: 1.37 KB

Versions: 36

Compression:

Stored size: 1.37 KB

Contents

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

  module Sass::Plugin::Configuration
    # Different default options in a rails envirionment.
    def default_options
      @default_options ||= {
        :always_update      => false,
        :template_location => Sass::Util.rails_root + '/public/stylesheets/sass',
        :css_location      => Sass::Util.rails_root + '/public/stylesheets',
        :cache_location    => Sass::Util.rails_root + '/tmp/sass-cache',
        :always_check      => Sass::Util.rails_env == "development",
        :quiet             => Sass::Util.rails_env != "production",
        :full_exception    => Sass::Util.rails_env != "production"
      }.freeze
    end
  end

  Sass::Plugin.options.reverse_merge!(Sass::Plugin.default_options)

  if defined?(ActionController::Metal)
    # Rails >= 3.0
    require 'sass/plugin/rack'
    Rails.configuration.middleware.use(Sass::Plugin::Rack)
  elsif defined?(ActionController::Dispatcher) &&
      defined?(ActionController::Dispatcher.middleware)
    # Rails >= 2.3
    require 'sass/plugin/rack'
    ActionController::Dispatcher.middleware.use(Sass::Plugin::Rack)
  else
    module ActionController
      class Base
        alias_method :sass_old_process, :process
        def process(*args)
          Sass::Plugin.check_for_updates
          sass_old_process(*args)
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
haml-3.1.0.alpha.33 vendor/sass/lib/sass/plugin/rails.rb
sass-3.1.0.alpha.29 lib/sass/plugin/rails.rb
sass-3.1.0.alpha.28 lib/sass/plugin/rails.rb
sass-3.1.0.alpha.27 lib/sass/plugin/rails.rb
sass-3.1.0.alpha.26 lib/sass/plugin/rails.rb
sass-3.1.0.alpha.25 lib/sass/plugin/rails.rb
sass-3.1.0.alpha.24 lib/sass/plugin/rails.rb
haml-3.1.0.alpha.30 vendor/sass/lib/sass/plugin/rails.rb
sass-3.1.0.alpha.23 lib/sass/plugin/rails.rb
haml-3.1.0.alpha.28 vendor/sass/lib/sass/plugin/rails.rb
haml-3.1.0.alpha.27 vendor/sass/lib/sass/plugin/rails.rb
sass-3.1.0.alpha.22 lib/sass/plugin/rails.rb
haml-3.1.0.alpha.26 vendor/sass/lib/sass/plugin/rails.rb
sass-3.1.0.alpha.21 lib/sass/plugin/rails.rb
haml-3.1.0.alpha.23 vendor/sass/lib/sass/plugin/rails.rb
sass-3.1.0.alpha.20 lib/sass/plugin/rails.rb
haml-3.1.0.alpha.22 vendor/sass/lib/sass/plugin/rails.rb
sass-3.1.0.alpha.19 lib/sass/plugin/rails.rb
sass-3.1.0.alpha.18 lib/sass/plugin/rails.rb
haml-3.1.0.alpha.19 vendor/sass/lib/sass/plugin/rails.rb