lib/travis/client/repository.rb in travis-1.1.3 vs lib/travis/client/repository.rb in travis-1.2.0

- old
+ new

@@ -102,10 +102,10 @@ def job(number) build_number = number.to_s[/^\d+/] build = build(build_number) job = build.jobs.detect { |j| j.number == number } if number != build_number - job ||= build.jobs.first if build.jobs.size == 1 + job ||= build.jobs.first if build and build.jobs.size == 1 job end def set_hook(flag) result = session.put_raw('/hooks/', :hook => { :id => id, :active => flag })