lib/travis/tools/assets.rb in travis-1.10.0.pre.rc2 vs lib/travis/tools/assets.rb in travis-1.10.0.pre.rc3
- old
+ new
@@ -6,14 +6,14 @@
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.first.to_s
end
def asset(file)
- File.read(asset_path(file).first)
+ File.read(asset_path(file))
end
class << self
alias [] asset_path
alias read asset