Sha256: aef78610ee0c1fa0de755f3490a4c445b740537861f09292a7c855b1915eb990

Contents?: true

Size: 429 Bytes

Versions: 14

Compression:

Stored size: 429 Bytes

Contents

class Jasmine::SprocketsMapper
  def initialize(context, mount_point = 'assets')
    @context = context
    @mount_point = mount_point
  end

  def files(src_files)
    src_files.map do |src_file|
      filename = src_file.gsub(/^assets\//, '').gsub(/\.js$/, '')
      @context.find_asset(filename).to_a.map(&:logical_path).map(&:to_s)
    end.flatten.uniq.map{|path| File.join(@mount_point, path).to_s + "?body=true"}
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
rally-jasmine-1.2.0.18 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0.12 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0.11 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0.10 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0.8 lib/jasmine/sprockets_mapper.rb
jasmine-1.3.0 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0.7 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0.6 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0.5 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0.4 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0.3 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0.2 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0.1 lib/jasmine/sprockets_mapper.rb
rally-jasmine-1.2.0 lib/jasmine/sprockets_mapper.rb