Sha256: e95e9c6903cec70cff135bed9627296258652658a2c07b0e99a630520ec39e31

Contents?: true

Size: 632 Bytes

Versions: 17

Compression:

Stored size: 632 Bytes

Contents

require 'sass'

module Sprockets
  class SassCacheStore < ::Sass::CacheStores::Base
    attr_reader :environment

    def initialize(environment)
      @environment = environment
    end

    def _store(key, version, sha, contents)
      environment.cache_set("sass/#{key}", {:version => version, :sha => sha, :contents => contents})
    end

    def _retrieve(key, version, sha)
      if obj = environment.cache_get("sass/#{key}")
        return unless obj[:version] == version
        return unless obj[:sha] == sha
        obj[:contents]
      else
        nil
      end
    end

    def path_to(key)
      key
    end
  end
end

Version data entries

17 entries across 17 versions & 5 rubygems

Version Path
sprockets-2.12.5 lib/sprockets/sass_cache_store.rb
arcabouco-0.2.13 vendor/bundle/gems/sprockets-2.12.4/lib/sprockets/sass_cache_store.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/sprockets-2.12.4/lib/sprockets/sass_cache_store.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/sprockets-2.12.3/lib/sprockets/sass_cache_store.rb
sprockets-2.12.4 lib/sprockets/sass_cache_store.rb
sprockets-2.12.3 lib/sprockets/sass_cache_store.rb
sprockets-2.11.3 lib/sprockets/sass_cache_store.rb
sprockets-2.10.2 lib/sprockets/sass_cache_store.rb
sprockets-2.9.4 lib/sprockets/sass_cache_store.rb
sprockets-2.12.2 lib/sprockets/sass_cache_store.rb
sprockets-2.12.1 lib/sprockets/sass_cache_store.rb
sprockets-2.12.0 lib/sprockets/sass_cache_store.rb
sprockets-2.11.0 lib/sprockets/sass_cache_store.rb
sprockets-2.10.1 lib/sprockets/sass_cache_store.rb
challah-1.0.0 vendor/bundle/gems/sprockets-2.10.0/lib/sprockets/sass_cache_store.rb
sprockets-2.10.0 lib/sprockets/sass_cache_store.rb
sprockets-2.9.3 lib/sprockets/sass_cache_store.rb