Sha256: 6c42c9b94fe170110030ef3235b7da088e9674e424061c03e60e39482d29f9e1
Contents?: true
Size: 509 Bytes
Versions: 12
Compression:
Stored size: 509 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.first.to_s end def asset(file) File.read(asset_path(file)) end class << self alias [] asset_path alias read asset end end end end
Version data entries
12 entries across 12 versions & 1 rubygems