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 +4 -4
- data/.github/workflows/ci.yml +22 -2
- data/.govuk_dependabot_merger.yml +6 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +6 -0
- data/govuk_schemas.gemspec +3 -3
- data/lib/govuk_schemas/random_example.rb +2 -2
- data/lib/govuk_schemas/schema.rb +1 -1
- data/lib/govuk_schemas/version.rb +1 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16cd756005e490eac69ddd8f7024ae3260afe6299e0d9009b395ad005b5fe8e9
|
4
|
+
data.tar.gz: abe105f133efc4f087bdace725d8f76ca1808b01f291dcb76379d1bd70aaa9b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7470680c0017977714ad1f99ae51b2302b8849e06be64ed5dfc27cfcb6f63c501ed4b8f44fe4f58162601053b5e0744f05eb9694215329d64cc05037ca045fd0
|
7
|
+
data.tar.gz: c0f18d2f243992f9fb3ba73090a39449b70ebdc4e45480d96da6b096584e4f3cd2f5b6786a71eb482d76e577167c738ba09debda7e6782a3890bb0b7d6cdaa38
|
data/.github/workflows/ci.yml
CHANGED
@@ -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
|
-
|
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
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.1.4
|
data/CHANGELOG.md
CHANGED
data/govuk_schemas.gemspec
CHANGED
@@ -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.
|
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.
|
28
|
+
spec.add_development_dependency "rubocop-govuk", "4.16.1"
|
29
29
|
|
30
|
-
spec.required_ruby_version = ">= 3.
|
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
|
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:
|
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.
|
data/lib/govuk_schemas/schema.rb
CHANGED
@@ -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:
|
34
|
+
all(schema_type:).values.sample
|
35
35
|
end
|
36
36
|
|
37
37
|
# Return all schema names
|
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
|
+
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:
|
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.
|
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.
|
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.
|
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.
|
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:
|
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.
|
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
|