testingbot 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,7 +53,7 @@ module TestingBot
53
53
  uri = URI(API_URL + '/v' + VERSION.to_s + url)
54
54
  req = Net::HTTP::Get.new(uri.request_uri)
55
55
  req.basic_auth @config[:client_key], @config[:client_secret]
56
- res = Net::HTTP.start(uri.hostname, uri.port) {|http|
56
+ res = Net::HTTP.start(uri.host, uri.port) {|http|
57
57
  http.request(req)
58
58
  }
59
59
 
@@ -71,7 +71,7 @@ module TestingBot
71
71
  req = Net::HTTP::Put.new(uri.request_uri)
72
72
  req.basic_auth @config[:client_key], @config[:client_secret]
73
73
  req.set_form_data(params)
74
- res = Net::HTTP.start(uri.hostname, uri.port) {|http|
74
+ res = Net::HTTP.start(uri.host, uri.port) {|http|
75
75
  http.request(req)
76
76
  }
77
77
 
@@ -89,7 +89,7 @@ module TestingBot
89
89
  req = Net::HTTP::Delete.new(uri.request_uri)
90
90
  req.basic_auth @config[:client_key], @config[:client_secret]
91
91
  req.set_form_data(params)
92
- res = Net::HTTP.start(uri.hostname, uri.port) {|http|
92
+ res = Net::HTTP.start(uri.host, uri.port) {|http|
93
93
  http.request(req)
94
94
  }
95
95
 
@@ -231,19 +231,20 @@ module TestingBot
231
231
  end
232
232
 
233
233
  def teardown
234
+ return super if @browser.nil?
234
235
  api = TestingBot::Api.new
235
236
  params = {
236
- "session_id" => browser.session_id,
237
+ "session_id" => @browser.session_id,
237
238
  "status_message" => @exception || "",
238
239
  "success" => passed? ? 1 : 0,
239
240
  "name" => self.to_s,
240
241
  "kind" => 2
241
242
  }
242
243
 
243
- data = api.update_test(browser.session_id, params)
244
+ data = api.update_test(@browser.session_id, params)
244
245
 
245
246
  if ENV['JENKINS_HOME'] && (TestingBot.get_config[:jenkins_output] == true)
246
- puts "TestingBotSessionID=" + browser.session_id
247
+ puts "TestingBotSessionID=" + @browser.session_id
247
248
  end
248
249
  super
249
250
  end
@@ -261,6 +262,7 @@ begin
261
262
  require 'test/unit/testcase'
262
263
  module TestingBot
263
264
  class TestCase < Test::Unit::TestCase
265
+ undef_method :default_test
264
266
  include SeleniumForTestUnit
265
267
  end
266
268
  end
@@ -1,3 +1,3 @@
1
1
  module Testingbot
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testingbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-23 00:00:00.000000000 Z
12
+ date: 2012-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70309646999820 !ruby/object:Gem::Requirement
16
+ requirement: &70240239906940 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70309646999820
24
+ version_requirements: *70240239906940
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: net-http-persistent
27
- requirement: &70309646999400 !ruby/object:Gem::Requirement
27
+ requirement: &70240239906520 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70309646999400
35
+ version_requirements: *70240239906520
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: selenium-webdriver
38
- requirement: &70309646998980 !ruby/object:Gem::Requirement
38
+ requirement: &70240239906100 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70309646998980
46
+ version_requirements: *70240239906100
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70309646998460 !ruby/object:Gem::Requirement
49
+ requirement: &70240239905580 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.9.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70309646998460
57
+ version_requirements: *70240239905580
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
- requirement: &70309646998040 !ruby/object:Gem::Requirement
60
+ requirement: &70240239905160 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70309646998040
68
+ version_requirements: *70240239905160
69
69
  description: This gem makes using our Selenium grid on testingbot.com easy
70
70
  email:
71
71
  - info@testingbot.com