lib/buildbox/api.rb in buildbox-0.5 vs lib/buildbox/api.rb in buildbox-0.6.beta1

- old
+ new

@@ -39,20 +39,28 @@ raise ServerError.new(e, e.response) end end def next_build(access_token) - build = get("#{access_token}/builds/queue/next").build + response = get("#{access_token}/builds/queue/next") - if build + if build = response.build Buildbox::Build.new(build) else nil end end def update_build(access_token, build, options) put("#{access_token}/builds/#{build.id}", options) + end + + def create_artifact(access_token, build, options) + post("#{access_token}/builds/#{build.id}/artifacts", options) + end + + def update_artifact(access_token, build, artifact_id, options) + put("#{access_token}/builds/#{build.id}/artifacts/#{artifact_id}", options) end private def connection