Sha256: 4f29d31460a7b4d9415080af798bda644cbd055200347cefcbd89ab2db3c0fa0

Contents?: true

Size: 420 Bytes

Versions: 2

Compression:

Stored size: 420 Bytes

Contents

require 'sprockets/cache'
require 'sprockets/erb_processor'

module Rack::Manifest::Sprockets
  def load_yaml path
    input = {
      environment: Rails.application.assets,
      filename: 'manifest.yml.erb',
      content_type: 'text/yaml',
      data: File.read(path),
      metadata: {},
      cache: Sprockets::Cache.new
    }
    result = Sprockets::ERBProcessor.call(input)
    YAML.load(result[:data])
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-manifest-0.1.4 lib/rack/manifest/sprockets.rb
rack-manifest-0.1.3 lib/rack/manifest/sprockets.rb