govuk_test 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9a1719f29e104922f0350243fe23e5417e74fd2f05b01a3d4842851f0bc22af
4
- data.tar.gz: a40dbc851005d21575353ee4969b411c7ac26dabea02358ac30093fab0478ffa
3
+ metadata.gz: 4386c88a47187189fe8ee1ea5cbca6d18fc210afc6a90b3189841eee9f5f2ad5
4
+ data.tar.gz: 721435357bb0c7af31ea7176a52e3c26172d567deb413f3f167d8519c1db9c0b
5
5
  SHA512:
6
- metadata.gz: '0088893f4a819476254eb0860a806032a6346ba2746caa2ef2485ac8039d9cf0c3b647c248f16d976e99495cb886ec2827992e723a18549304a48f13f6ee60ec'
7
- data.tar.gz: 3cbe35fba8377caa00c8602a827fc20ccaf46056ccd47a77aac11f6c428c3044cb55cca36807942a47f8135e91f1b0e03d38e7676c2048508835153029f29b8a
6
+ metadata.gz: 4ecaa5c6505e4c2337cb1ebfd41061a60122c7da016ec00da77061f66426d6a133eaeca1133d8e71868c07578d13ac410ff0d9b5ef191ea080b6a4e1d43aea0c
7
+ data.tar.gz: cf2f91beb074be94a6b24fbc3f82229776c1ed952029a6285440ad084ccc9f13d74aee2df685e9210b34315a2efd390b49df6a8e1d67be82c5ef430e4e19dbea
data/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@
7
7
  useful summary for people upgrading their application, not a replication
8
8
  of the commit log.
9
9
 
10
+ ## 0.3.0
11
+
12
+ * Don't download chromedriver if it's already available.
13
+
10
14
  ## 0.2.1
11
15
 
12
16
  * Explicitly require the `chromedriver-helper` Gem to fix the path to the binary.
data/govuk_test.gemspec CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.add_dependency "capybara"
26
26
  spec.add_dependency "chromedriver-helper"
27
+ spec.add_dependency "ptools"
27
28
  spec.add_dependency "puma"
28
29
  spec.add_dependency "selenium-webdriver"
29
30
 
@@ -1,3 +1,3 @@
1
1
  module GovukTest
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
data/lib/govuk_test.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require "govuk_test/version"
2
2
 
3
3
  require "capybara"
4
+ require "ptools"
4
5
  require "puma"
5
- require "chromedriver-helper"
6
6
  require "selenium-webdriver"
7
7
 
8
8
  module GovukTest
@@ -10,6 +10,14 @@ module GovukTest
10
10
  chrome_options = %w(headless disable-gpu)
11
11
  chrome_options << "--window-size=#{options[:window_size]}" if options[:window_size]
12
12
 
13
+ chromedriver_from_path = File.which("chromedriver")
14
+ if chromedriver_from_path
15
+ # Use the installed chromedriver, rather than chromedriver-helper
16
+ Selenium::WebDriver::Chrome.driver_path = chromedriver_from_path
17
+ else
18
+ require 'chromedriver-helper'
19
+ end
20
+
13
21
  Capybara.register_driver :headless_chrome do |app|
14
22
  capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
15
23
  chromeOptions: { args: chrome_options }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-18 00:00:00.000000000 Z
11
+ date: 2018-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: ptools
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: puma
43
57
  requirement: !ruby/object:Gem::Requirement