webdrivers 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/webdrivers.rb +0 -1
- data/lib/webdrivers/common.rb +10 -2
- data/lib/webdrivers/phantomjs.rb +2 -2
- data/spec/chromedriver_spec.rb +1 -1
- data/webdrivers.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d48dd7ab5521a67cc6fe9c30fa30878264ae2a82
|
4
|
+
data.tar.gz: eec19913069b05438341878692f4705ba2be4890
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 285e46750351b6a1e002c4b6aeb7839f1f2336fefb8b3e3c974378883f039e85e3b554d42823bcfee6685bab19f4f55ea4c8d4dd62cfdce2cd37995a418bca21
|
7
|
+
data.tar.gz: ce3eb1716aded508d92c16f09ca3b381b1d3509ae7d037f4e2183aee5524479fc3ab9b5b5ccda5dd0b946cf3157926e2a88c24225e5b0ece8b2d671e72622bf1
|
data/CHANGELOG.md
CHANGED
data/lib/webdrivers.rb
CHANGED
data/lib/webdrivers/common.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'rubygems/package'
|
2
|
+
require 'zip'
|
2
3
|
|
3
4
|
module Webdrivers
|
4
5
|
class Common
|
@@ -51,8 +52,15 @@ module Webdrivers
|
|
51
52
|
end
|
52
53
|
|
53
54
|
def unzip_file(filename)
|
54
|
-
|
55
|
-
|
55
|
+
Zip::ZipFile.open("#{Dir.pwd}/#{filename}") do |zip_file|
|
56
|
+
zip_file.each do |f|
|
57
|
+
@top_path ||= f.name
|
58
|
+
f_path = File.join(Dir.pwd, f.name)
|
59
|
+
FileUtils.mkdir_p(File.dirname(f_path))
|
60
|
+
zip_file.extract(f, f_path) unless File.exist?(f_path)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
@top_path
|
56
64
|
end
|
57
65
|
|
58
66
|
def download_url(version = nil)
|
data/lib/webdrivers/phantomjs.rb
CHANGED
@@ -10,7 +10,7 @@ module Webdrivers
|
|
10
10
|
|
11
11
|
def current_version
|
12
12
|
return nil unless File.exists?(binary_path)
|
13
|
-
%x(#{binary_path} --version).match(/
|
13
|
+
%x(#{binary_path} --version).strip.match(/(\d\.\d+\.\d+)/)[1]
|
14
14
|
end
|
15
15
|
|
16
16
|
def newest_version
|
@@ -32,7 +32,7 @@ module Webdrivers
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def extract_file(filename)
|
35
|
-
FileUtils.mv("#{platform_install_dir}/#{filename}
|
35
|
+
FileUtils.mv("#{platform_install_dir}/#{filename}bin/#{filename}", file_name)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
data/spec/chromedriver_spec.rb
CHANGED
@@ -12,7 +12,7 @@ describe Webdrivers::Chromedriver do
|
|
12
12
|
|
13
13
|
it { expect(chromedriver.newest_version.to_f).to be >= 2.25 }
|
14
14
|
|
15
|
-
it { expect(chromedriver.downloads.size).to be >=
|
15
|
+
it { expect(chromedriver.downloads.size).to be >= 25 }
|
16
16
|
|
17
17
|
context "on a linux platform" do
|
18
18
|
before { allow(chromedriver).to receive(:platform) { "linux32" } }
|
data/webdrivers.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "webdrivers"
|
6
|
-
s.version = "2.2.
|
6
|
+
s.version = "2.2.1"
|
7
7
|
s.authors = ["Titus Fortner"]
|
8
8
|
s.email = ["titusfortner@gmail.com"]
|
9
9
|
s.homepage = "https://github.com/titusfortner/webdrivers"
|
@@ -20,5 +20,5 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_development_dependency "rake", "~> 10.0"
|
21
21
|
|
22
22
|
s.add_runtime_dependency "nokogiri", "~> 1.6"
|
23
|
-
s.add_runtime_dependency "
|
23
|
+
s.add_runtime_dependency "zip"
|
24
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webdrivers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Titus Fortner
|
@@ -53,19 +53,19 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.6'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: zip
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0
|
61
|
+
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0
|
68
|
+
version: '0'
|
69
69
|
description: Run Selenium tests more easily with install and updates for all supported
|
70
70
|
webdrivers.
|
71
71
|
email:
|