govuk_document_types 0.9.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b27d31bc70d8664edb850438dffb0244fa920b9f8f794a51353cd59cc1a4200
4
- data.tar.gz: 07a577cadf22da3c379bb19336a7fd0990a5ac3808798f3b0567b7c6339ea8be
3
+ metadata.gz: 4f789c70349961ccb4ddc415ffc398ef47ab69faf0028bacb93329ab8ddc2c2f
4
+ data.tar.gz: ac205000cf9fc8c16864126521efa05b7d8144b818092489ed92b3808e582bd7
5
5
  SHA512:
6
- metadata.gz: 4cf7c1a0c355df521179409c029286e5c7b17989b34dc08322c45409783bb4ba7271af7a1b4a92b7126f7e0fbd622e9399011decf7773cf74c46c8312699d984
7
- data.tar.gz: 1a4bca6b8cf6d15f4ea82c5dada03ee01c5f92dd2a94e71e9bde5c6c16bea448a572def0961cab68ea9c9ff36994e076194301fb37186136fb0ff7f712dfb27c
6
+ metadata.gz: '012833c1d2ad5b68779578a1544e2344819a0da9ee67a9d0cf345e4163fdae7c5e6fe4855f476fdb5c58087e695946bdcb983a3d37d500ea05fca7024b32d61f'
7
+ data.tar.gz: 1d0f62f78a9f0fb884ae3010d5fac1c40e79c80087fab0c68e4a5acb740ee0a381cb772016e7bd0aa2ed3c2ceddf0a085f63c49d29b1b4fc06df929b3ae26a1f
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.1
1
+ 2.6.6
data/CHANGELOG.md CHANGED
@@ -1,4 +1,23 @@
1
- # Unreleased
1
+ # 1.0.1
2
+
3
+ * Remove Flood & Coastal Erosion Risk Management Report (FCERM) Research Report from research supergroup
4
+
5
+ # 1.0.0
6
+
7
+ * Remove deprecated supertypes
8
+ * Add Flood & Coastal Erosion Risk Management Report (FCERM) Research Report to research supergroup
9
+
10
+ # 0.9.3
11
+
12
+ * Added `standard` subtype to the guidance group
13
+
14
+ # 0.9.2
15
+
16
+ * Moved `case_study` from policy papers and consultations to news and comms.
17
+
18
+ # 0.9.1
19
+
20
+ * Removed `contact` from the guidance group.
2
21
 
3
22
  # 0.9.0
4
23
 
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
- This gem is only to be used in [publishing-api][publishing-api] and
9
- [rummager][rummager]. **Don't use it in your project**.
8
+ ## Usage
10
9
 
11
- ## Long term vision
12
10
 
13
- This gem is used to share the canonical list of supertypes between rummager and publishing-api. We're currently migrating to a new system of indexing where rummager gets all data from the publishing-api (via a message queue). Once that work is completed this repo should be retired and the canonical list should be moved to either [govuk-content-schemas][] for use in the publishing-api, or be moved into publishing-api directly.
11
+ Find the supertypes for a document type:
14
12
 
15
- ## How to add a supertype
13
+ ```rb
14
+ supertypes = GovukDocumentTypes.supertypes(document_type: "detailed_guide")
15
+ supertypes["content_purpose_subgroup"]
16
+ => "guidance"
17
+ ```
16
18
 
17
- 1. Add it to [data/supertypes.yml](data/supertypes.yml) in this gem and release a new version
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
- ## How to update a supertype
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
- 1. Update [data/supertypes.yml](data/supertypes.yml) in this gem and release a new version.
26
- 2. Bump the gem version in [rummager][rummager]. Rummager's nightly re-indexing will pick up your changes.
27
- 3. Bump the gem version in [publishing-api][publishing-api]. All documents have to be sent to the content-store again for your changes to be picked up.
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
@@ -1,215 +1,3 @@
1
- navigation_document_supertype:
2
- name: "Navigation document type"
3
- description: "Used to filter pages on the new taxonomy-based navigation pages"
4
- default: other
5
- items:
6
- - id: guidance
7
- document_types:
8
- - answer
9
- - contact
10
- - detailed_guide
11
- - document_collection
12
- - form
13
- - guidance
14
- - guide
15
- - licence
16
- - local_transaction
17
- - manual
18
- - map
19
- - place
20
- - promotional
21
- - regulation
22
- - simple_smart_answer
23
- - smart_answer
24
- - statutory_guidance
25
- - transaction
26
- - travel_advice
27
-
28
- content_purpose_document_supertype:
29
- name: "Content purpose"
30
- description: "DEPRECATED - Please use `content_purpose_subgroup`. The team grouped document types that serve a similar purpose for users into top-level content groups. In time, this information could be used to serve relevant links into a content page sidebar and pull feeds of specific content groups into navigation pages."
31
- default: other
32
- items:
33
- - id: updates-and-alerts
34
- description: To provide time-based information on a new thing (alert) or something that's already happened (update)
35
- document_types:
36
- - drug_safety_update
37
- - fatality_notice
38
- - medical_safety_alert
39
- - national_statistics_announcement
40
- - official_statistics_announcement
41
- - staff_update
42
- - statistics_announcement
43
-
44
- - id: news
45
- description: To communicate what government is doing (non-urgent)
46
- document_types:
47
- - case_study
48
- - correspondence # Also used for other things
49
- - news_article
50
- - news_story
51
- - press_release
52
- - world_location_news_article
53
- - world_news_story
54
-
55
- - id: resources
56
- document_types:
57
- - map
58
- - promotional
59
-
60
- - id: speeches-and-statements
61
- document_types:
62
- - authored_article
63
- - oral_statement
64
- - speech
65
- - written_statement
66
-
67
- - id: guidance
68
- description: To provide information that prepares the user for doing a thing (without the need to share any personal information).
69
- document_types:
70
- - answer
71
- - calendar
72
- - detailed_guide
73
- - guidance
74
- - guide
75
- - hmrc_manual
76
- - hmrc_manual_section
77
- - html_publication
78
- - manual
79
- - manual_section
80
- - policy_paper
81
- - regulation
82
- - statutory_guidance
83
- - travel_advice
84
-
85
- - id: contacts
86
- document_types:
87
- - contact
88
-
89
- - id: transactions
90
- description: To provide specific information and tools that enables the user to do a thing, based on information they provide during the transaction.
91
- document_types:
92
- - calculator
93
- - completed_transaction
94
- - form
95
- - licence
96
- - local_transaction
97
- - place
98
- - simple_smart_answer
99
- - smart_answer
100
- - transaction
101
-
102
- - id: reports
103
- description: To share in detail the outcome of investigations, research and changes in regulation (government and independent bodies).
104
- document_types:
105
- - aaib_report
106
- - consultation_outcome
107
- - impact_assessment
108
- - independent_report
109
- - maib_report
110
- - raib_report
111
- - research
112
- - service_standard_report
113
-
114
- - id: decisions
115
- description: To share decisions and/or reports made by government on a specific thing.
116
- document_types:
117
- - asylum_support_decision
118
- - decision
119
- - dfid_research_output
120
- - employment_appeal_tribunal_decision
121
- - employment_tribunal_decision
122
- - government_response
123
- - international_treaty
124
- - tax_tribunal_decision
125
- - utaac_decision
126
-
127
- - id: engagement-activities
128
- description: To enable bodies and people to comment on government policy and provide evidence.
129
- document_types:
130
- - closed_consultation
131
- - cma_case
132
- - consultation
133
- - notice
134
- - open_consultation
135
-
136
- - id: data
137
- description: To provide data that enables people to hold government to account (both raw data and data with analysis).
138
- document_types:
139
- - foi_release
140
- - national_statistics
141
- - official_statistics
142
- - statistical_data_set
143
- - statistics
144
- - transparency
145
-
146
- - id: organising-entities
147
- description: Things that exist in the real world
148
- document_types:
149
- - working_group
150
- - organisation
151
- - person
152
- - worldwide_organisation
153
- - world_location
154
- - topical_event
155
- - field_of_operation
156
- - ministerial_role
157
-
158
- - id: navigation
159
- description: Pages that enable users to get to content pages
160
- document_types:
161
- # "Tags"
162
- - document_collection
163
- - mainstream_browse_page
164
- - policy
165
- - policy_area
166
- - taxon
167
- - topic
168
-
169
- # Hardcoded pages to let users navigate
170
- - finder
171
- - homepage
172
- - search
173
- - travel_advice_index
174
-
175
- - id: grants-and-funding
176
- document_types:
177
- - countryside_stewardship_grant
178
- - esi_fund
179
- - international_development_fund
180
- - business_finance_support_scheme
181
-
182
- - id: corporate-info
183
- document_types:
184
- - about
185
- - about_our_services
186
- - access_and_opening
187
- - complaints_procedure
188
- - corporate_report
189
- - equality_and_diversity
190
- - help_page
191
- - media_enquiries
192
- - membership
193
- - our_energy_use
194
- - our_governance
195
- - personal_information_charter
196
- - petitions_and_campaigns
197
- - procurement
198
- - publication_scheme
199
- - recruitment
200
- - services_and_information
201
- - social_media_use
202
- - terms_of_reference
203
- - welsh_language_scheme
204
-
205
- - id: service-manual
206
- document_types:
207
- - service_manual_homepage
208
- - service_manual_service_toolkit
209
- - service_manual_service_standard
210
- - service_manual_guide
211
- - service_manual_topic
212
-
213
1
  user_journey_document_supertype:
214
2
  name: "User journey"
215
3
  description: "Used to distinguish pages used mainly for navigation (finding) from content pages (thing)"
@@ -224,8 +12,6 @@ user_journey_document_supertype:
224
12
  - license_finder
225
13
  - mainstream_browse_page
226
14
  - organisation
227
- - policy
228
- - policy_area
229
15
  - search
230
16
  - service_manual_homepage
231
17
  - service_manual_topic
@@ -234,23 +20,6 @@ user_journey_document_supertype:
234
20
  - topic
235
21
  - topical_event
236
22
 
237
- search_user_need_document_supertype:
238
- name: "Search user need"
239
- description: "Used to group documents based on user need, core for mainstream users and government for specialist users in search results"
240
- default: government
241
- items:
242
- - id: core
243
- document_types:
244
- - answer
245
- - guide
246
- - local_transaction
247
- - place
248
- - simple_smart_answer
249
- - smart_answer
250
- - transaction
251
- - travel_advice
252
- - travel_advice_index
253
-
254
23
  email_document_supertype:
255
24
  name: "Email document type"
256
25
  description: "High level group for email subscriptions use to identify publications and announcement"
@@ -392,6 +161,7 @@ content_purpose_subgroup:
392
161
  - drug_safety_update
393
162
  - id: news
394
163
  document_types:
164
+ - case_study
395
165
  - news_article
396
166
  - news_story
397
167
  - press_release
@@ -441,7 +211,6 @@ content_purpose_subgroup:
441
211
  - manual_section
442
212
  - guidance
443
213
  - map
444
- - contact
445
214
  - calendar
446
215
  - statutory_guidance
447
216
  - notice
@@ -449,6 +218,7 @@ content_purpose_subgroup:
449
218
  - travel_advice
450
219
  - promotional
451
220
  - hmrc_manual
221
+ - standard
452
222
  - id: business_support
453
223
  document_types:
454
224
  - international_development_fund
@@ -458,7 +228,6 @@ content_purpose_subgroup:
458
228
  - id: policy
459
229
  document_types:
460
230
  - impact_assessment
461
- - case_study
462
231
  - policy_paper
463
232
  - id: consultations
464
233
  document_types:
@@ -521,6 +290,7 @@ content_purpose_supergroup:
521
290
  - correspondence
522
291
  - speech
523
292
  - government_response
293
+ - case_study
524
294
  - id: services
525
295
  document_types:
526
296
  - completed_transaction
@@ -543,7 +313,6 @@ content_purpose_supergroup:
543
313
  - manual_section
544
314
  - guidance
545
315
  - map
546
- - contact
547
316
  - calendar
548
317
  - statutory_guidance
549
318
  - notice
@@ -556,10 +325,10 @@ content_purpose_supergroup:
556
325
  - business_finance_support_scheme
557
326
  - statutory_instrument
558
327
  - hmrc_manual
328
+ - standard
559
329
  - id: policy_and_engagement
560
330
  document_types:
561
331
  - impact_assessment
562
- - case_study
563
332
  - policy_paper
564
333
  - open_consultation
565
334
  - closed_consultation
@@ -584,7 +353,3 @@ content_purpose_supergroup:
584
353
  - aaib_report
585
354
  - raib_report
586
355
  - maib_report
587
-
588
-
589
-
590
-
@@ -1,3 +1,3 @@
1
1
  module GovukDocumentTypes
2
- VERSION = "0.9.0".freeze
2
+ VERSION = "1.0.1".freeze
3
3
  end
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.0
4
+ version: 1.0.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: 2018-09-27 00:00:00.000000000 Z
11
+ date: 2021-05-27 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
- rubyforge_project:
115
- rubygems_version: 2.7.6
114
+ rubygems_version: 3.1.6
116
115
  signing_key:
117
116
  specification_version: 4
118
117
  summary: Gem to share document type groupings