Permalink
Browse files

Start pulling in HTTParty for making REST calls to Sauce Labs

  • Loading branch information...
1 parent b2adeff commit 9068aac8e554202d529ac7a04c0b9fa8a922a651 @rtyler committed Aug 5, 2012
Showing with 6 additions and 4 deletions.
  1. +1 −0 Gemfile
  2. +5 −4 lib/saucetv/api.rb
View
1 Gemfile
@@ -2,6 +2,7 @@ source :gemcutter
gem 'rake'
gem 'foreman'
+gem 'httparty'
gem 'sinatra'
gem 'haml'
gem 'thin'
View
9 lib/saucetv/api.rb
@@ -1,12 +1,13 @@
+require 'rubygems'
+require 'httparty'
module SauceTV
class API
- attr_accessor :username
- attr_writer :api_key
+ include HTTParty
+ base_uri 'saucelabs.com/rest'
def initialize(username, api_key)
- @username = username
- @api_key = api_key
+ @auth = {:username => username, :password => api_key}
end
def recent_jobs

0 comments on commit 9068aac

Please sign in to comment.