Sha256: bd5eaff22bf32836102645e13c90a4c487392660baa19661bb3d736f10940e20
Contents?: true
Size: 824 Bytes
Versions: 65
Compression:
Stored size: 824 Bytes
Contents
module Jasmine class PathMapper def initialize(config) @config = config end def map_src_paths(paths) map(paths, @config.src_dir, @config.src_path) end def map_spec_paths(paths) map(paths, @config.spec_dir, @config.spec_path) end def map_boot_paths(paths) map(paths, @config.boot_dir, @config.boot_path) end def map_runner_boot_paths(paths) map(paths, @config.runner_boot_dir, @config.runner_boot_path) end def map_jasmine_paths(paths) map(paths, @config.jasmine_dir, @config.jasmine_path) end private def map(paths, remove_path, add_path) paths.map do |path| if path[0..3] == 'http' path else File.join(add_path, (path.sub(remove_path, ''))) end end end end end
Version data entries
65 entries across 50 versions & 2 rubygems