govuk_schemas 4.7.0 → 5.0.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: 34a97a974a896948c52a2e6f4c1460cfbeb931f6aa7ae0a9d148da7b1bb8a890
4
- data.tar.gz: 46de32fac29ba1f29d0b7cc5da20e5e1fa4fe4a7e502912ffd94010b4e0489c3
3
+ metadata.gz: 16cd756005e490eac69ddd8f7024ae3260afe6299e0d9009b395ad005b5fe8e9
4
+ data.tar.gz: abe105f133efc4f087bdace725d8f76ca1808b01f291dcb76379d1bd70aaa9b3
5
5
  SHA512:
6
- metadata.gz: f0da5f9cbaab5127de0a275b0ba156c76a3e65d84661ad8ae86a8bb8bee6764b35b6814a81360fa2d7755123834b327677eb465631205547956c116e7ad93614
7
- data.tar.gz: 93ae4de1d68871747b69455b640df49d4c199032665f2fbf58c5632b0f405db2346450eb2520ff60689278419fec08ed927e5c3b505791bb7ccaec9ae2a8abc6
6
+ metadata.gz: 7470680c0017977714ad1f99ae51b2302b8849e06be64ed5dfc27cfcb6f63c501ed4b8f44fe4f58162601053b5e0744f05eb9694215329d64cc05037ca045fd0
7
+ data.tar.gz: c0f18d2f243992f9fb3ba73090a39449b70ebdc4e45480d96da6b096584e4f3cd2f5b6786a71eb482d76e577167c738ba09debda7e6782a3890bb0b7d6cdaa38
@@ -11,13 +11,33 @@ on:
11
11
  type: string
12
12
 
13
13
  jobs:
14
+ snyk-security:
15
+ name: SNYK security analysis
16
+ uses: alphagov/govuk-infrastructure/.github/workflows/snyk-security.yml@main
17
+ with:
18
+ skip_sca: true
19
+ secrets: inherit
20
+ permissions:
21
+ contents: read
22
+ security-events: write
23
+ actions: read
24
+
25
+ codeql-sast:
26
+ name: CodeQL SAST scan
27
+ uses: alphagov/govuk-infrastructure/.github/workflows/codeql-analysis.yml@main
28
+ permissions:
29
+ security-events: write
30
+
31
+ dependency-review:
32
+ name: Dependency Review scan
33
+ uses: alphagov/govuk-infrastructure/.github/workflows/dependency-review.yml@main
34
+
14
35
  # This matrix job runs the test suite against multiple Ruby versions
15
36
  test_matrix:
16
37
  strategy:
17
38
  fail-fast: false
18
39
  matrix:
19
- # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
20
- ruby: ['3.0', 3.1, 3.2]
40
+ ruby: [3.1, 3.2, 3.3]
21
41
  runs-on: ubuntu-latest
22
42
  steps:
23
43
  - uses: actions/checkout@v4
@@ -0,0 +1,6 @@
1
+ api_version: 1
2
+ auto_merge:
3
+ - dependency: rubocop-govuk
4
+ allowed_semver_bumps:
5
+ - patch
6
+ - minor
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.5
1
+ 3.1.4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 5.0.0
2
+
3
+ * BREAKING: Drop support for Ruby 3.0. The minimum required Ruby version is now 3.1.4.
4
+ * Add support for Ruby 3.3.
5
+ * Add support for `json-schema` 3.3.
6
+
1
7
  # 4.7.0
2
8
 
3
9
  * Update `json-schema` dependency.
@@ -19,13 +19,13 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = %w[lib]
20
20
 
21
21
  # This should be kept in sync with the json-schema version of publishing-api.
22
- spec.add_dependency "json-schema", ">= 2.8", "< 4.2"
22
+ spec.add_dependency "json-schema", ">= 2.8", "< 4.4"
23
23
 
24
24
  spec.add_development_dependency "climate_control"
25
25
  spec.add_development_dependency "pry-byebug"
26
26
  spec.add_development_dependency "rake", "~> 13.0"
27
27
  spec.add_development_dependency "rspec", "~> 3.4"
28
- spec.add_development_dependency "rubocop-govuk", "4.12.0"
28
+ spec.add_development_dependency "rubocop-govuk", "4.16.1"
29
29
 
30
- spec.required_ruby_version = ">= 3.0"
30
+ spec.required_ruby_version = ">= 3.1.4"
31
31
  end
@@ -33,7 +33,7 @@ module GovukSchemas
33
33
  # @return [GovukSchemas::RandomExample]
34
34
  def initialize(schema:, seed: nil)
35
35
  @schema = schema
36
- @random_generator = RandomSchemaGenerator.new(schema: schema, seed: seed)
36
+ @random_generator = RandomSchemaGenerator.new(schema:, seed:)
37
37
  end
38
38
 
39
39
  # Returns a new `GovukSchemas::RandomExample` object.
@@ -58,7 +58,7 @@ module GovukSchemas
58
58
  # the new payload. The new payload is then validated. (optional)
59
59
  def self.for_schema(schema_key_value, &block)
60
60
  schema = GovukSchemas::Schema.find(schema_key_value)
61
- GovukSchemas::RandomExample.new(schema: schema).payload(&block)
61
+ GovukSchemas::RandomExample.new(schema:).payload(&block)
62
62
  end
63
63
 
64
64
  # Return a content item merged with a hash and with the excluded fields removed.
@@ -31,7 +31,7 @@ module GovukSchemas
31
31
  # @param schema_type [String] The type: frontend, publisher, notification or links
32
32
  # @return [Hash] a JSON schema as a hash
33
33
  def self.random_schema(schema_type:)
34
- all(schema_type: schema_type).values.sample
34
+ all(schema_type:).values.sample
35
35
  end
36
36
 
37
37
  # Return all schema names
@@ -1,4 +1,4 @@
1
1
  module GovukSchemas
2
2
  # @private
3
- VERSION = "4.7.0".freeze
3
+ VERSION = "5.0.0".freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_schemas
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.0
4
+ version: 5.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: 2023-09-18 00:00:00.000000000 Z
11
+ date: 2024-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '2.8'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '4.2'
22
+ version: '4.4'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '2.8'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '4.2'
32
+ version: '4.4'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: climate_control
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - '='
94
94
  - !ruby/object:Gem::Version
95
- version: 4.12.0
95
+ version: 4.16.1
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - '='
101
101
  - !ruby/object:Gem::Version
102
- version: 4.12.0
102
+ version: 4.16.1
103
103
  description: Gem to generate test data based on GOV.UK content schemas
104
104
  email:
105
105
  - govuk-dev@digital.cabinet-office.gov.uk
@@ -110,6 +110,7 @@ files:
110
110
  - ".github/dependabot.yml"
111
111
  - ".github/workflows/ci.yml"
112
112
  - ".gitignore"
113
+ - ".govuk_dependabot_merger.yml"
113
114
  - ".rspec"
114
115
  - ".rubocop.yml"
115
116
  - ".ruby-version"
@@ -144,14 +145,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
145
  requirements:
145
146
  - - ">="
146
147
  - !ruby/object:Gem::Version
147
- version: '3.0'
148
+ version: 3.1.4
148
149
  required_rubygems_version: !ruby/object:Gem::Requirement
149
150
  requirements:
150
151
  - - ">="
151
152
  - !ruby/object:Gem::Version
152
153
  version: '0'
153
154
  requirements: []
154
- rubygems_version: 3.4.19
155
+ rubygems_version: 3.5.7
155
156
  signing_key:
156
157
  specification_version: 4
157
158
  summary: Gem to generate test data based on GOV.UK content schemas