Class: DebugAssetMapper

Inherits:
Object
  • Object
show all
Defined in:
lib/middleman/jasmine/jasmine_sprockets_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sprockets) ⇒ DebugAssetMapper

Returns a new instance of DebugAssetMapper.



86
87
88
# File 'lib/middleman/jasmine/jasmine_sprockets_proxy.rb', line 86

def initialize(sprockets)
  @sprockets = sprockets
end

Instance Attribute Details

#sprocketsObject (readonly)

Returns the value of attribute sprockets.



85
86
87
# File 'lib/middleman/jasmine/jasmine_sprockets_proxy.rb', line 85

def sprockets
  @sprockets
end

Instance Method Details

#map_spec_paths(spec_paths) ⇒ Object



90
91
92
93
94
95
96
# File 'lib/middleman/jasmine/jasmine_sprockets_proxy.rb', line 90

def map_spec_paths(spec_paths)
  spec_paths.map do |path|
    sprockets[File.basename(path)].to_a.map do | dependency |
      "/__spec__/#{dependency.logical_path}?body=t"
    end
  end.flatten.uniq
end