Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Start pulling in HTTParty for making REST calls to Sauce Labs

  • Loading branch information...
commit 9068aac8e554202d529ac7a04c0b9fa8a922a651 1 parent b2adeff
@rtyler authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.