selenium-webdriver 2.39.0 → 2.40.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -15,7 +15,7 @@ This gem provides Ruby bindings for WebDriver and has been tested to work on MRI
15
15
 
16
16
  ## License
17
17
 
18
- Copyright 2009-2013 Software Freedom Conservancy
18
+ Copyright 2009-2014 Software Freedom Conservancy
19
19
 
20
20
  Licensed under the Apache License, Version 2.0 (the "License");
21
21
  you may not use this file except in compliance with the License.
@@ -18,7 +18,8 @@ module Selenium
18
18
  end
19
19
 
20
20
  def tmp_files
21
- @tmp_files ||= []
21
+ @tmp_files ||= Hash.new { |hash, pid| hash[pid] = [] }
22
+ @tmp_files[Process.pid]
22
23
  end
23
24
 
24
25
  def <<(file)
@@ -36,11 +37,17 @@ module Selenium
36
37
  end
37
38
 
38
39
  def reap!
39
- tmp_files.each { |file| FileUtils.rm_rf(file) } if reap?
40
+ if reap?
41
+ tmp_files.each { |file| FileUtils.rm_rf(file) }
42
+ true
43
+ else
44
+ false
45
+ end
40
46
  end
41
47
  end
42
48
 
43
- Platform.exit_hook { reap! }
49
+ # we *do* want child process reaping, so not using Platform.exit_hook here.
50
+ at_exit { reap! }
44
51
 
45
52
  end # FileReaper
46
53
  end # WebDriver
@@ -413,7 +413,7 @@ module Selenium
413
413
 
414
414
  def upload(local_file)
415
415
  unless File.file?(local_file)
416
- raise WebDriverError::Error, "you may only upload files: #{local_file.inspect}"
416
+ raise Error::WebDriverError, "you may only upload files: #{local_file.inspect}"
417
417
  end
418
418
 
419
419
  execute :uploadFile, {}, :file => Zipper.zip_file(local_file)
@@ -14,13 +14,13 @@ module Selenium
14
14
  def path
15
15
  @path ||= (
16
16
  path = case Platform.os
17
- when :windows
18
- Platform.find_in_program_files("Safari\\Safari.exe")
19
- when :macosx
20
- "/Applications/Safari.app/Contents/MacOS/Safari"
21
- else
22
- Platform.find_binary("Safari")
23
- end
17
+ when :windows
18
+ Platform.find_in_program_files("Safari\\Safari.exe")
19
+ when :macosx
20
+ "/Applications/Safari.app/Contents/MacOS/Safari"
21
+ else
22
+ Platform.find_binary("Safari")
23
+ end
24
24
 
25
25
  unless File.file?(path) && File.executable?(path)
26
26
  raise Error::WebDriverError, "unable to find the Safari executable, please set Selenium::WebDriver::Safari.path= or add it to your PATH."
@@ -47,6 +47,7 @@ module Selenium
47
47
  return if @installed
48
48
 
49
49
  if install_directory.exist?
50
+ backup_directory.rmtree if backup_directory.exist?
50
51
  FileUtils.mv install_directory.to_s, backup_directory.to_s
51
52
  end
52
53
 
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium-webdriver
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 2.39.0
4
+ prerelease: 7
5
+ version: 2.40.0.rc1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jari Bakken
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-12-17 00:00:00 +01:00
13
+ date: 2014-01-27 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -247,9 +247,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
247
247
  required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  none: false
249
249
  requirements:
250
- - - ">="
250
+ - - ">"
251
251
  - !ruby/object:Gem::Version
252
- version: "0"
252
+ version: 1.3.1
253
253
  requirements: []
254
254
 
255
255
  rubyforge_project: