lib/travis/tools/assets.rb in travis-1.9.2.travis.1288.9 vs lib/travis/tools/assets.rb in travis-1.9.2.travis.1303.9
- 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