Sha256: 6697f4a350c969ee6e4c37118cc1f3af148cdbefd67122005378e19ea1cef977
Contents?: true
Size: 504 Bytes
Versions: 6
Compression:
Stored size: 504 Bytes
Contents
require 'pathname' module Travis module Tools module Assets BASE = File.expand_path('../../../../assets', __FILE__) extend self def asset_path(file) Pathname.glob(File.expand_path(file, BASE)).tap do |x| raise Travis::Client::AssetNotFound.new(file) if x.empty? end end def asset(file) File.read(asset_path(file).first) end class << self alias [] asset_path alias read asset end end end end
Version data entries
6 entries across 6 versions & 1 rubygems