chromedriver-helper 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +7 -1
- data/README.md +16 -1
- data/bin/chromedriver-update +5 -0
- data/lib/chromedriver/helper.rb +11 -5
- data/lib/chromedriver/helper/version.rb +1 -1
- metadata +19 -7
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
Changelog
|
2
2
|
==========
|
3
3
|
|
4
|
-
0.0.
|
4
|
+
0.0.4 - 1 Aug 2012
|
5
|
+
----------
|
6
|
+
|
7
|
+
* Including `chromedriver-update` to easily allow people to force-upgrade. (#3)
|
8
|
+
|
9
|
+
|
10
|
+
0.0.3 - 20 Mar 2012
|
5
11
|
----------
|
6
12
|
|
7
13
|
* Updated download URL. #2 (Thanks, Alistair Hutchison!)
|
data/README.md
CHANGED
@@ -33,9 +33,24 @@ then, in your specs:
|
|
33
33
|
end
|
34
34
|
|
35
35
|
|
36
|
+
# Updating Chromedriver
|
37
|
+
|
38
|
+
If you'd like to force-upgrade to the latest version of chromedriver,
|
39
|
+
run the script `chromedriver-update` that also comes packaged with
|
40
|
+
this gem.
|
41
|
+
|
42
|
+
This might be necessary on platforms on which Chrome auto-updates,
|
43
|
+
which has been known to introduce incompatibilities with older
|
44
|
+
versions of chromedriver (see
|
45
|
+
[Issue #3](https://github.com/flavorjones/chromedriver-helper/issues/3)
|
46
|
+
for an example).
|
47
|
+
|
48
|
+
|
36
49
|
# Support
|
37
50
|
|
38
|
-
The code lives at
|
51
|
+
The code lives at
|
52
|
+
[http://github.com/flavorjones/chromedriver-helper](http://github.com/flavorjones/chromedriver-helper).
|
53
|
+
Open a Github Issue, or send a pull request! Thanks! You're the best.
|
39
54
|
|
40
55
|
|
41
56
|
# License
|
data/lib/chromedriver/helper.rb
CHANGED
@@ -12,18 +12,24 @@ module Chromedriver
|
|
12
12
|
exec binary_path, *args
|
13
13
|
end
|
14
14
|
|
15
|
-
def download
|
16
|
-
return if File.exists?
|
15
|
+
def download hit_network=false
|
16
|
+
return if File.exists?(binary_path) && ! hit_network
|
17
17
|
url = download_url
|
18
18
|
filename = File.basename url
|
19
19
|
Dir.chdir platform_install_dir do
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
unless File.exists? filename
|
21
|
+
system("wget -c -O #{filename} #{url}") || system("curl -C - -o #{filename} #{url}")
|
22
|
+
raise "Could not download #{url}" unless File.exists? filename
|
23
|
+
system "unzip -o #{filename}"
|
24
|
+
end
|
23
25
|
end
|
24
26
|
raise "Could not unzip #{filename} to get #{binary_path}" unless File.exists? binary_path
|
25
27
|
end
|
26
28
|
|
29
|
+
def update
|
30
|
+
download true
|
31
|
+
end
|
32
|
+
|
27
33
|
def download_url
|
28
34
|
downloads = GoogleCodeParser.new(open(DOWNLOAD_URL)).downloads
|
29
35
|
url = downloads.grep(/chromedriver_#{platform}_.*\.zip/).first
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chromedriver-helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
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-
|
12
|
+
date: 2012-08-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,15 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: nokogiri
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ! '>='
|
@@ -32,13 +37,19 @@ dependencies:
|
|
32
37
|
version: '0'
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
36
46
|
description: Easy installation and use of chromedriver, the Chromium project's selenium
|
37
47
|
webdriver adapter.
|
38
48
|
email:
|
39
49
|
- mike@csa.net
|
40
50
|
executables:
|
41
51
|
- chromedriver
|
52
|
+
- chromedriver-update
|
42
53
|
extensions: []
|
43
54
|
extra_rdoc_files: []
|
44
55
|
files:
|
@@ -48,6 +59,7 @@ files:
|
|
48
59
|
- README.md
|
49
60
|
- Rakefile
|
50
61
|
- bin/chromedriver
|
62
|
+
- bin/chromedriver-update
|
51
63
|
- chromedriver-helper.gemspec
|
52
64
|
- lib/chromedriver/helper.rb
|
53
65
|
- lib/chromedriver/helper/google_code_parser.rb
|
@@ -75,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
87
|
version: '0'
|
76
88
|
requirements: []
|
77
89
|
rubyforge_project:
|
78
|
-
rubygems_version: 1.8.
|
90
|
+
rubygems_version: 1.8.24
|
79
91
|
signing_key:
|
80
92
|
specification_version: 3
|
81
93
|
summary: Easy installation and use of chromedriver, the Chromium project's selenium
|