Skip to content

Commit

Permalink
Change outputs over to the new setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Sutton committed Dec 19, 2011
1 parent 4a4853f commit acaa63b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/zencoder/output.rb
Expand Up @@ -2,8 +2,7 @@ module Zencoder
class Output < Resource

def self.progress(output_id, options={})
params = {:api_key => options.delete(:api_key) || api_key}
HTTP.get("#{options[:base_url] || base_url}/outputs/#{output_id}/progress", merge_params(options, params))
get("/outputs/#{output_id}/progress", options)
end

end
Expand Down
2 changes: 1 addition & 1 deletion test/zencoder/output_test.rb
Expand Up @@ -14,7 +14,7 @@ class Zencoder::OutputTest < Test::Unit::TestCase
end

should "GET the correct url and return a response" do
Zencoder::HTTP.stubs(:get).with(@url, {:params => {:api_key => @api_key}}).returns(Zencoder::Response.new)
Zencoder::HTTP.stubs(:get).with(@url, :headers => { "Zencoder-Api-Key" => @api_key }).returns(Zencoder::Response.new)
assert_equal Zencoder::Response, Zencoder::Output.progress(@output_id, :api_key => @api_key).class
end
end
Expand Down

0 comments on commit acaa63b

Please sign in to comment.