Skip to content

Commit d89994d

Browse files
committedJan 30, 2013
updating the sauce rest stuff properly now not just thinking about it
1 parent f4c520d commit d89994d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎chemistrykit.gemspec

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
2525
s.add_dependency "rspec", "~> 2.12.0"
2626
s.add_dependency "selenium-webdriver", "~> 2.27.2"
2727
s.add_dependency "ci_reporter", "~> 1.8.3"
28+
s.add_dependency "rest-client", "~> 1.6.7"
2829

2930
s.add_development_dependency "rspec", "~> 2.12.0"
3031
s.add_development_dependency "rake", "~> 10.0.3"

‎lib/chemistrykit/shared_context.rb

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'rspec/core/shared_context'
22
require File.join(Dir.getwd, '_config', 'requires')
3+
require 'restclient'
34

45
module ChemistryKit
56
module SharedContext
@@ -78,13 +79,15 @@ def executor
7879
end
7980
}
8081
example_tags.compact!
81-
puts self.example.exception
82+
# puts self.example.exception
8283
payload = {
8384
:tags => example_tags,
8485
:name => self.example.metadata[:full_description],
8586
:passed => self.example.exception ? false : true
8687
}
87-
puts payload.to_json
88+
api_url = "http://#{SAUCE_CONFIG['username']}:#{SAUCE_CONFIG['key']}@saucelabs.com:80/rest/v1/#{SAUCE_CONFIG['username']}/jobs/#{session_id}"
89+
RestClient.put api_url, payload.to_json, {:content_type => :json}
90+
# puts payload.to_json
8891
end
8992
end
9093
end

0 commit comments

Comments
 (0)
Please sign in to comment.