govuk_document_types 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/README.md +17 -22
- data/data/supertypes.yml +0 -10
- data/lib/govuk_document_types/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdc53275544b5c4bb4d790621c9e925af6410a748c42385faf08782358780ee1
|
4
|
+
data.tar.gz: 0a4cbc40a74aea0c8d16936aa1b4da56ebc6721d70a7fe5b214cd5517a1938ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0432c2a813cc575aae6e5be273884ba88618f6fd74e1bbd92377141effddcdbf4f48573309671afbe126b8d8b46be243c687cec84e3e8f19bd6cc60ff3cbb48
|
7
|
+
data.tar.gz: c24d17736456dd9a9050cb632e1aced1228f9fbc86aece00567c7d985cbeb8b7f9b70657d80c62902c290ddf50b218b6d590ce2a18573c1e2d8db80229517565
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -5,26 +5,29 @@ of document types.
|
|
5
5
|
|
6
6
|
https://docs.publishing.service.gov.uk/document-types.html
|
7
7
|
|
8
|
-
|
9
|
-
[rummager][rummager]. **Don't use it in your project**.
|
8
|
+
## Usage
|
10
9
|
|
11
|
-
## Long term vision
|
12
10
|
|
13
|
-
|
11
|
+
Find the supertypes for a document type:
|
14
12
|
|
15
|
-
|
13
|
+
```rb
|
14
|
+
supertypes = GovukDocumentTypes.supertypes(document_type: "detailed_guide")
|
15
|
+
supertypes["content_purpose_subgroup"]
|
16
|
+
=> "guidance"
|
17
|
+
```
|
16
18
|
|
17
|
-
|
18
|
-
2. [Add the supertype][rummager-pr] in Rummager so that it can be indexed and searched with. Bump the gem in Rummager.
|
19
|
-
3. [Add the type to content-schemas][schemas-pr]
|
20
|
-
4. [Add the type to the content-store][content-store-pr]
|
21
|
-
5. Bump the gem version in [publishing-api][publishing-api]
|
19
|
+
Find the document types for a supertype:
|
22
20
|
|
23
|
-
|
21
|
+
```rb
|
22
|
+
GovukDocumentTypes.supergroup_document_types("policy_and_engagement")
|
23
|
+
=> ["case_study", "closed_consultation", "consultation_outcome", "impact_assessment", "open_consultation", "policy_paper"]
|
24
|
+
```
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
## How to add or update a supertype
|
27
|
+
|
28
|
+
1. Add it to [data/supertypes.yml](data/supertypes.yml) in this gem and release a new version
|
29
|
+
2. Bump the gem version across GOV.UK apps using [Dependabot](https://app.dependabot.com/)
|
30
|
+
3. Run the `rummager:update_supertypes` rake task in Search-api to set the correct supertypes in each document in the Elasticsearch indices. Do this _after_ bumping the gem version because this rake task uses information in the gem to find the correct supertype for the document_type defined in each document.
|
28
31
|
|
29
32
|
## Running the test suite
|
30
33
|
|
@@ -35,11 +38,3 @@ bundle exec rake
|
|
35
38
|
## License
|
36
39
|
|
37
40
|
[MIT License](LICENSE.txt)
|
38
|
-
|
39
|
-
[rummager-pr]: https://github.com/alphagov/rummager/pull/756
|
40
|
-
[govuk-content-schemas]: https://github.com/alphagov/govuk-content-schemas
|
41
|
-
[schemas-pr]: https://github.com/alphagov/govuk-content-schemas/pull/551
|
42
|
-
[content-store-pr]: https://github.com/alphagov/content-store/pull/268
|
43
|
-
|
44
|
-
[publishing-api]: https://github.com/alphagov/publishing-api
|
45
|
-
[rummager]: https://github.com/alphagov/rummager
|
data/data/supertypes.yml
CHANGED
@@ -161,8 +161,6 @@ content_purpose_document_supertype:
|
|
161
161
|
# "Tags"
|
162
162
|
- document_collection
|
163
163
|
- mainstream_browse_page
|
164
|
-
- policy
|
165
|
-
- policy_area
|
166
164
|
- taxon
|
167
165
|
- topic
|
168
166
|
|
@@ -224,8 +222,6 @@ user_journey_document_supertype:
|
|
224
222
|
- license_finder
|
225
223
|
- mainstream_browse_page
|
226
224
|
- organisation
|
227
|
-
- policy
|
228
|
-
- policy_area
|
229
225
|
- search
|
230
226
|
- service_manual_homepage
|
231
227
|
- service_manual_topic
|
@@ -441,7 +437,6 @@ content_purpose_subgroup:
|
|
441
437
|
- manual_section
|
442
438
|
- guidance
|
443
439
|
- map
|
444
|
-
- contact
|
445
440
|
- calendar
|
446
441
|
- statutory_guidance
|
447
442
|
- notice
|
@@ -543,7 +538,6 @@ content_purpose_supergroup:
|
|
543
538
|
- manual_section
|
544
539
|
- guidance
|
545
540
|
- map
|
546
|
-
- contact
|
547
541
|
- calendar
|
548
542
|
- statutory_guidance
|
549
543
|
- notice
|
@@ -584,7 +578,3 @@ content_purpose_supergroup:
|
|
584
578
|
- aaib_report
|
585
579
|
- raib_report
|
586
580
|
- maib_report
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_document_types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
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: 2019-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -111,8 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
|
-
|
115
|
-
rubygems_version: 2.7.6
|
114
|
+
rubygems_version: 3.0.3
|
116
115
|
signing_key:
|
117
116
|
specification_version: 4
|
118
117
|
summary: Gem to share document type groupings
|