Sha256: 2f7c4b8ef20b31593ff26533123e721801084b279b9e41a48374943d4cb6cb8d
Contents?: true
Size: 1.22 KB
Versions: 4
Compression:
Stored size: 1.22 KB
Contents
# GOV.UK document types This gem contains the "document supertypes" for GOV.UK. Supertypes are groupings of document types. https://docs.publishing.service.gov.uk/document-types.html ## Usage Find the supertypes for a document type: ```rb supertypes = GovukDocumentTypes.supertypes(document_type: "detailed_guide") supertypes["content_purpose_subgroup"] => "guidance" ``` Find the document types for a supertype: ```rb GovukDocumentTypes.supergroup_document_types("policy_and_engagement") => ["case_study", "closed_consultation", "consultation_outcome", "impact_assessment", "open_consultation", "policy_paper"] ``` ## How to add or update a supertype 1. Add it to [data/supertypes.yml](data/supertypes.yml) in this gem and release a new version 2. Bump the gem version across GOV.UK apps using [Dependabot](https://app.dependabot.com/) 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. ## Running the test suite ``` bundle exec rake ``` ## License [MIT License](LICENCE)
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
govuk_document_types-3.1.0 | README.md |
govuk_document_types-3.0.1 | README.md |
govuk_document_types-3.0.0 | README.md |
govuk_document_types-2.0.0 | README.md |