govuk_test 2.0.0 → 2.1.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: e879e0b4e1b39bcd4287be0ff735b5901eb53144c2cfca98a5024c1e82ce5253
4
- data.tar.gz: 74ba5e2ccd6fd805be749f289281eb5d2d4030446d8ff2b3f191f53a1f374cae
3
+ metadata.gz: 7ded68d62fdb899e1ecc47a033c38c414c5ee2871c939c7387aeba566ccfca61
4
+ data.tar.gz: 659eda878476cd8b4e8bac4bd36988fa598f2712eee90e3ef3a8fab9466f685a
5
5
  SHA512:
6
- metadata.gz: da484c3a777accc15e51e51f1221a5f3263c7d6b3d22fb4ce53e445b2dbd5607a02fdfa6477a0fd9b3db6af9ff44e71e13e735634052b5812ca6e5b247892e3b
7
- data.tar.gz: 230861fa63836ce22c11eb2ef621bdc5be61ed5728059e2840369b072db637f12eb4f80bfb5128c135f6675851dcd96942ed2356cecaea22c7567f374b4a251c
6
+ metadata.gz: 29264cb3a71621d27ec1133521723c5aa74c24aac128079b8f39e0f71bd699a50ce06c9acdb5dcdf96a54457fa59d71ec0c751451cc3d6928c38a2da6288b280
7
+ data.tar.gz: b5bce1dc80ceffc74588f9fc96d7c68064a388a326028db082c6d6dde027d324da849ce729fdbe6365046ac3fb997f557157b65434d7fdd802bd64b890cf1c87
data/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@
7
7
  useful summary for people upgrading their application, not a replication
8
8
  of the commit log.
9
9
 
10
+ ## 2.1.0
11
+
12
+ * Add pact test branch verify rake task
13
+ * Add Railtie to load rake tasks
14
+
10
15
  ## 2.0.0
11
16
 
12
17
  * BREAKING: `.configure` no longer accepts options. If you need to modify the
data/lib/govuk_test.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require "govuk_test/railtie" if defined?(Rails)
1
2
  require "govuk_test/version"
2
3
 
3
4
  require "capybara"
@@ -0,0 +1,9 @@
1
+ require "govuk_test"
2
+
3
+ module GovukTest
4
+ class Railtie < Rails::Railtie
5
+ rake_tasks do
6
+ Dir[File.expand_path('../tasks/**/*.rake', File.dirname(__FILE__))].each { |f| load f }
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module GovukTest
2
- VERSION = "2.0.0"
2
+ VERSION = "2.1.0"
3
3
  end
@@ -0,0 +1,19 @@
1
+ require "govuk_test"
2
+
3
+ require "pact/tasks"
4
+ require "pact/tasks/task_helper"
5
+
6
+ namespace :pact do
7
+ desc "Verify the API contract for a specific branch"
8
+ task "verify:branch", [:branch_name] => :environment do |t, args|
9
+ abort "Please provide a branch name. eg rake #{t.name}[my_feature_branch]" unless args[:branch_name]
10
+
11
+ pact_version = args[:branch_name] == "master" ? args[:branch_name] : "branch-#{args[:branch_name]}"
12
+
13
+ ClimateControl.modify(GDS_API_ADAPTERS_PACT_VERSION: pact_version) do
14
+ Pact::TaskHelper.handle_verification_failure do
15
+ Pact::TaskHelper.execute_pact_verify
16
+ end
17
+ end
18
+ end
19
+ 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: 2.0.0
4
+ version: 2.1.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: 2020-09-22 00:00:00.000000000 Z
11
+ date: 2021-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -156,7 +156,9 @@ files:
156
156
  - bin/setup
157
157
  - govuk_test.gemspec
158
158
  - lib/govuk_test.rb
159
+ - lib/govuk_test/railtie.rb
159
160
  - lib/govuk_test/version.rb
161
+ - lib/tasks/pact.rake
160
162
  homepage: https://github.com/alphagov/govuk_test
161
163
  licenses:
162
164
  - MIT
@@ -176,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
178
  - !ruby/object:Gem::Version
177
179
  version: '0'
178
180
  requirements: []
179
- rubygems_version: 3.0.3
181
+ rubygems_version: 3.1.4
180
182
  signing_key:
181
183
  specification_version: 4
182
184
  summary: Test setup for GOV.UK