Module: Rack::Manifest::Sprockets

Included in:
Rack::Manifest
Defined in:
lib/rack/manifest/sprockets.rb

Instance Method Summary collapse

Instance Method Details

#load_yaml(path) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/rack/manifest/sprockets.rb', line 5

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