govuk_test 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/ci.yml +36 -0
- data/.rubocop.yml +18 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +23 -0
- data/Gemfile +1 -1
- data/README.md +2 -2
- data/Rakefile +6 -6
- data/govuk_test.gemspec +12 -13
- data/lib/govuk_test/version.rb +1 -1
- data/lib/govuk_test.rb +2 -2
- metadata +26 -12
- data/Jenkinsfile +0 -7
- data/bin/console +0 -14
- data/bin/setup +0 -8
- /data/{LICENSE.md → LICENCE} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a47327df01bbdb9a4f826f2ada38fb5c1f5ac4518aae2c29afb01518385554fb
|
4
|
+
data.tar.gz: 47822cc01034e26f57812042b02d1178db30632d8b2318a91e000ee63714e2f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe848793d1d97dcce7b81cb0d13d93379b22e93eae0a5f5d7e793efc0ffc8e235f47ea0794637653cc005faf5bcb0274a657eebd5569bce3267e3042917de56a
|
7
|
+
data.tar.gz: 3c733efaa9a62fde4dec1cccb8a95691fbb1d17b700ac6a7e4c8f534100115b26a38230024398ef3ca44e7eac7c30bbce85bad782e1f25459ce5a8499a7d60f8
|
@@ -0,0 +1,36 @@
|
|
1
|
+
on: [push, pull_request]
|
2
|
+
|
3
|
+
jobs:
|
4
|
+
# This matrix job runs the test suite against multiple Ruby versions
|
5
|
+
test_matrix:
|
6
|
+
strategy:
|
7
|
+
fail-fast: false
|
8
|
+
matrix:
|
9
|
+
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
10
|
+
ruby: ['3.0', 3.1, 3.2]
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v4
|
14
|
+
- uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: ${{ matrix.ruby }}
|
17
|
+
bundler-cache: true
|
18
|
+
- run: bundle exec rake
|
19
|
+
|
20
|
+
# Branch protection rules cannot directly depend on status checks from matrix jobs.
|
21
|
+
# So instead we define `test` as a dummy job which only runs after the preceding `test_matrix` checks have passed.
|
22
|
+
# Solution inspired by: https://github.community/t/status-check-for-a-matrix-jobs/127354/3
|
23
|
+
test:
|
24
|
+
needs: test_matrix
|
25
|
+
runs-on: ubuntu-latest
|
26
|
+
steps:
|
27
|
+
- run: echo "All matrix tests have passed 🚀"
|
28
|
+
|
29
|
+
publish:
|
30
|
+
needs: test
|
31
|
+
if: ${{ github.ref == 'refs/heads/main' }}
|
32
|
+
permissions:
|
33
|
+
contents: write
|
34
|
+
uses: alphagov/govuk-infrastructure/.github/workflows/publish-rubygem.yml@main
|
35
|
+
secrets:
|
36
|
+
GEM_HOST_API_KEY: ${{ secrets.ALPHAGOV_RUBYGEMS_API_KEY }}
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
inherit_gem:
|
2
|
+
rubocop-govuk:
|
3
|
+
- config/default.yml
|
4
|
+
- config/rspec.yml
|
5
|
+
|
6
|
+
inherit_mode:
|
7
|
+
merge:
|
8
|
+
- Exclude
|
9
|
+
|
10
|
+
# **************************************************************
|
11
|
+
# TRY NOT TO ADD OVERRIDES IN THIS FILE
|
12
|
+
#
|
13
|
+
# This repo is configured to follow the RuboCop GOV.UK styleguide.
|
14
|
+
# Any rules you override here will cause this repo to diverge from
|
15
|
+
# the way we write code in all other GOV.UK repos.
|
16
|
+
#
|
17
|
+
# See https://github.com/alphagov/rubocop-govuk/blob/main/CONTRIBUTING.md
|
18
|
+
# **************************************************************
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.5
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,29 @@
|
|
7
7
|
useful summary for people upgrading their application, not a replication
|
8
8
|
of the commit log.
|
9
9
|
|
10
|
+
## 4.0.0
|
11
|
+
|
12
|
+
* Replace call to deprecated `Selenium::WebDriver::Chrome::Options#headless!` method ([#63](https://github.com/alphagov/govuk_test/pull/63))
|
13
|
+
* Bump GitHub actions/checkout from 3 to 4 ([#59](https://github.com/alphagov/govuk_test/pull/59))
|
14
|
+
* Update rubocop-govuk requirement from = 4.11.0 to = 4.12.0 ([#58](https://github.com/alphagov/govuk_test/pull/58))
|
15
|
+
* Update rubocop-govuk requirement from = 4.10.0 to = 4.11.0 ([#57](https://github.com/alphagov/govuk_test/pull/57))
|
16
|
+
* Fix spec.files in govuk_test.gemspec ([#56](https://github.com/alphagov/govuk_test/pull/56))
|
17
|
+
* Add rubocop-govuk ([#55](https://github.com/alphagov/govuk_test/pull/55))
|
18
|
+
* BREAKING: Drop support for Ruby 2.7 ([#54](https://github.com/alphagov/govuk_test/pull/54))
|
19
|
+
* Use .yml for workflow files ([#52](https://github.com/alphagov/govuk_test/pull/52))
|
20
|
+
* Add Ruby 3.2 to CI test matrix ([#51](https://github.com/alphagov/govuk_test/pull/51))
|
21
|
+
* Link to MIT Licence in repository ([#50](https://github.com/alphagov/govuk_test/pull/50))
|
22
|
+
* Bump GitHub actions/checkout from 2 to 3 ([#49](https://github.com/alphagov/govuk_test/pull/49))
|
23
|
+
* Configure Dependabot for GitHub Actions ([#48](https://github.com/alphagov/govuk_test/pull/48))
|
24
|
+
* Configure Dependabot for Bundler ([#47](https://github.com/alphagov/govuk_test/pull/47))
|
25
|
+
* Switch from Jenkins to GitHub Actions for CI ([#46](https://github.com/alphagov/govuk_test/pull/46))
|
26
|
+
* Update Ruby from 2.6.6 to 2.7.6 ([#45](https://github.com/alphagov/govuk_test/pull/45))
|
27
|
+
|
28
|
+
|
29
|
+
## 3.0.1
|
30
|
+
|
31
|
+
* Resolve Selenium deprecation warning on options argument by requiring higher minimum versions ([#44](https://github.com/alphagov/govuk_test/pull/44))
|
32
|
+
|
10
33
|
## 3.0.0
|
11
34
|
|
12
35
|
* BREAKING: Remove dependency on `webdrivers` gem. It's now expected that ChromeDriver is present on the underlying operating system. ([#43](https://github.com/alphagov/govuk_test/pull/43))
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -66,6 +66,6 @@ end
|
|
66
66
|
[headless-chrome]: https://developers.google.com/web/updates/2017/04/headless-chrome
|
67
67
|
[Jasmine]: https://github.com/jasmine/jasmine_selenium_runner
|
68
68
|
|
69
|
-
##
|
69
|
+
## Licence
|
70
70
|
|
71
|
-
The gem is available as open source under the terms of the [MIT License](
|
71
|
+
The gem is available as open source under the terms of the [MIT License](LICENCE).
|
data/Rakefile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
-
|
2
|
+
require "rubocop/rake_task"
|
3
|
+
require "rspec/core/rake_task"
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
end
|
5
|
+
RSpec::Core::RakeTask.new(:spec)
|
6
|
+
RuboCop::RakeTask.new
|
7
|
+
|
8
|
+
task default: %i[rubocop spec]
|
data/govuk_test.gemspec
CHANGED
@@ -1,34 +1,33 @@
|
|
1
|
-
lib = File.expand_path("
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
require "govuk_test/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "govuk_test"
|
7
7
|
spec.version = GovukTest::VERSION
|
8
|
-
spec.authors
|
9
|
-
spec.email
|
8
|
+
spec.authors = ["GOV.UK Dev"]
|
9
|
+
spec.email = ["govuk-dev@digital.cabinet-office.gov.uk"]
|
10
10
|
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
11
|
+
spec.summary = "Test setup for GOV.UK"
|
12
|
+
spec.description = "Test configuration and dependencies for applications on GOV.UK"
|
13
13
|
spec.homepage = "https://github.com/alphagov/govuk_test"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
spec.files =
|
19
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
-
end
|
16
|
+
spec.required_ruby_version = ">= 3.0"
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|bin)/}) }
|
21
19
|
spec.bindir = "exe"
|
22
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
-
spec.require_paths = [
|
21
|
+
spec.require_paths = %w[lib]
|
24
22
|
|
25
23
|
spec.add_dependency "brakeman", ">= 5.0.2"
|
26
|
-
spec.add_dependency "capybara"
|
24
|
+
spec.add_dependency "capybara", ">= 3.36"
|
27
25
|
spec.add_dependency "puma"
|
28
|
-
spec.add_dependency "selenium-webdriver", ">=
|
26
|
+
spec.add_dependency "selenium-webdriver", ">= 4.0"
|
29
27
|
|
30
28
|
spec.add_development_dependency "bundler"
|
31
29
|
spec.add_development_dependency "climate_control"
|
32
30
|
spec.add_development_dependency "rake"
|
33
31
|
spec.add_development_dependency "rspec"
|
32
|
+
spec.add_development_dependency "rubocop-govuk", "4.12.0"
|
34
33
|
end
|
data/lib/govuk_test/version.rb
CHANGED
data/lib/govuk_test.rb
CHANGED
@@ -9,7 +9,7 @@ module GovukTest
|
|
9
9
|
Capybara.register_driver :headless_chrome do |app|
|
10
10
|
Capybara::Selenium::Driver.new(app,
|
11
11
|
browser: :chrome,
|
12
|
-
|
12
|
+
capabilities: headless_chrome_selenium_options)
|
13
13
|
end
|
14
14
|
|
15
15
|
Capybara.javascript_driver = :headless_chrome
|
@@ -18,7 +18,7 @@ module GovukTest
|
|
18
18
|
|
19
19
|
def self.headless_chrome_selenium_options
|
20
20
|
Selenium::WebDriver::Chrome::Options.new.tap do |options|
|
21
|
-
options.headless
|
21
|
+
options.add_argument("--headless")
|
22
22
|
options.add_argument("--no-sandbox") if ENV["GOVUK_TEST_CHROME_NO_SANDBOX"]
|
23
23
|
end
|
24
24
|
end
|
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:
|
4
|
+
version: 4.0.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:
|
11
|
+
date: 2023-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brakeman
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.36'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '3.36'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: puma
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '4.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: '
|
68
|
+
version: '4.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +122,20 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-govuk
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 4.12.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 4.12.0
|
125
139
|
description: Test configuration and dependencies for applications on GOV.UK
|
126
140
|
email:
|
127
141
|
- govuk-dev@digital.cabinet-office.gov.uk
|
@@ -129,17 +143,17 @@ executables: []
|
|
129
143
|
extensions: []
|
130
144
|
extra_rdoc_files: []
|
131
145
|
files:
|
146
|
+
- ".github/dependabot.yml"
|
147
|
+
- ".github/workflows/ci.yml"
|
132
148
|
- ".gitignore"
|
133
149
|
- ".rspec"
|
150
|
+
- ".rubocop.yml"
|
134
151
|
- ".ruby-version"
|
135
152
|
- CHANGELOG.md
|
136
153
|
- Gemfile
|
137
|
-
-
|
138
|
-
- LICENSE.md
|
154
|
+
- LICENCE
|
139
155
|
- README.md
|
140
156
|
- Rakefile
|
141
|
-
- bin/console
|
142
|
-
- bin/setup
|
143
157
|
- govuk_test.gemspec
|
144
158
|
- lib/govuk_test.rb
|
145
159
|
- lib/govuk_test/version.rb
|
@@ -155,14 +169,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
169
|
requirements:
|
156
170
|
- - ">="
|
157
171
|
- !ruby/object:Gem::Version
|
158
|
-
version: '0'
|
172
|
+
version: '3.0'
|
159
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
174
|
requirements:
|
161
175
|
- - ">="
|
162
176
|
- !ruby/object:Gem::Version
|
163
177
|
version: '0'
|
164
178
|
requirements: []
|
165
|
-
rubygems_version: 3.
|
179
|
+
rubygems_version: 3.4.20
|
166
180
|
signing_key:
|
167
181
|
specification_version: 4
|
168
182
|
summary: Test setup for GOV.UK
|
data/Jenkinsfile
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "govuk_test"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
/data/{LICENSE.md → LICENCE}
RENAMED
File without changes
|