pivotal-selenium-rc 1.2.20090112 → 1.3.20090112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 1
3
- :minor: 2
3
+ :minor: 3
4
4
  :patch: 20090112
5
5
  :jar_url: http://release.seleniumhq.org/selenium-remote-control/1.0-beta-2/selenium-remote-control-1.0-beta-2-dist.zip
@@ -14,10 +14,6 @@ module SeleniumRC
14
14
  ENV["SELENIUM_SERVER_PORT"] || "4444"
15
15
  end
16
16
 
17
- def timeout
18
- ENV["SELENIUM_SERVER_TIMEOUT"] || 15
19
- end
20
-
21
17
  def service_is_running?
22
18
  begin
23
19
  socket = TCPSocket.new(host, port)
@@ -39,7 +35,6 @@ module SeleniumRC
39
35
  def start
40
36
  command = "java -jar \"#{jar_path}\""
41
37
  command << " -port #{self.class.port}"
42
- command << " -timeout #{self.class.timeout}"
43
38
  puts "Running: #{command}"
44
39
  system(command)
45
40
  end
@@ -81,10 +76,6 @@ module SeleniumRC
81
76
  self.class.port
82
77
  end
83
78
 
84
- def timeout
85
- self.class.timeout
86
- end
87
-
88
79
  def service_is_running?
89
80
  self.class.service_is_running?
90
81
  end
@@ -92,6 +83,7 @@ module SeleniumRC
92
83
  protected
93
84
  def wait_for_service_with_timeout
94
85
  start_time = Time.now
86
+ timeout = 15
95
87
 
96
88
  until self.class.service_is_running?
97
89
  if timeout && (Time.now > (start_time + timeout))
data/lib/selenium_rc.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  dir = File.dirname(__FILE__)
2
2
  require "socket"
3
3
  require "#{dir}/selenium_rc/server"
4
+ require "net/http"
@@ -11,7 +11,7 @@ describe "bin/selenium-rc" do
11
11
  end
12
12
 
13
13
  after do
14
- system("lsof -i tcp:4444 | grep '(LISTEN)' | awk '{print $2}' | xargs kill -9")
14
+ SeleniumRC::Server.new.stop
15
15
  TCPSocket.wait_for_service_termination(:host => "0.0.0.0", :port => 4444)
16
16
  end
17
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotal-selenium-rc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.20090112
4
+ version: 1.3.20090112
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal Labs