govuk_document_types 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Jenkinsfile +2 -1
- data/data/supergroups.yml +6 -8
- data/lib/govuk_document_types.rb +6 -0
- data/lib/govuk_document_types/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1922dc08fb0c3de03fdf25d1830ecc9503282d004060c5cce2fc6c34f02b68ef
|
4
|
+
data.tar.gz: e1de2739fb316b4753c11305871aaae4b62b4d15337c2e78a3f8a57ca9a36fa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4985d4ba6dc37a177a2d3de627f0a5aed05235121c06ec2c2dc6ada5a90ce9f5e04f910b209a61aa9b922865303c79cb1d1970fad8520e15ba0f6b4a054f3f17
|
7
|
+
data.tar.gz: ad01c17d8993b84242431e9b56903e126d1ffdf9c1219758b67bcf1e1166b88ecf21149a777adf3c5bbef5d3b3cef352fed9a4a65e744515464f9942ddc9e0ab
|
data/CHANGELOG.md
CHANGED
data/Jenkinsfile
CHANGED
data/data/supergroups.yml
CHANGED
@@ -27,23 +27,21 @@ content_purpose_supergroup:
|
|
27
27
|
- research_and_data
|
28
28
|
|
29
29
|
documentation : |
|
30
|
-
##Content Purpose Supergroups
|
31
|
-
|
32
30
|
These are the grouping that the navigation team came up with
|
33
31
|
as a result of an investigation done using the "Jobs to be Done" framework in Q4.
|
34
32
|
|
35
|
-
There are 5 high level Content Purpose Supergroups which each group together some
|
36
|
-
which in turn group `document_types`.
|
33
|
+
There are 5 high level Content Purpose Supergroups which each group together some Content Purpose Subgroups.
|
37
34
|
|
38
35
|
More information about the JTBD framework and the supergroups can be found on the
|
39
36
|
[GovUK wiki](https://gov-uk.atlassian.net/wiki/spaces/GFED/pages/305201156/Document+type+groupings)
|
40
37
|
|
41
38
|
The list of which document types are grouped by both supergroups and subgroups can be
|
42
|
-
found in the [supertypes.yml](
|
39
|
+
found in the [supertypes.yml](https://github.com/alphagov/govuk_document_types/blob/master/data/supertypes.yml) file.
|
43
40
|
|
44
|
-
The list of the subgroups grouped by supergroup are in the file
|
41
|
+
The list of the subgroups grouped by supergroup are in the file
|
42
|
+
[supergroups.yml](https://github.com/alphagov/govuk_document_types/blob/master/data/supergroups.yml).
|
45
43
|
If you want to make a change to the `document_type` groupings in the sub or supergroups, you must make the
|
46
44
|
relevant change in both groups and both files to make sure there are no discrepancies between the groups.
|
47
45
|
|
48
|
-
To make sure that your changes were correct, run the data linting
|
49
|
-
[data_lint_spec.rb](
|
46
|
+
To make sure that your changes were correct, run the data linting tests in
|
47
|
+
[data_lint_spec.rb](https://github.com/alphagov/govuk_document_types/blob/master/spec/data_lint_spec.rb).
|
data/lib/govuk_document_types.rb
CHANGED
@@ -3,6 +3,7 @@ require "yaml"
|
|
3
3
|
|
4
4
|
module GovukDocumentTypes
|
5
5
|
DATA = YAML.load_file(File.dirname(__FILE__) + "/../data/supertypes.yml")
|
6
|
+
SUPERGROUPS = YAML.load_file(File.dirname(__FILE__) + "/../data/supergroups.yml")
|
6
7
|
|
7
8
|
def self.supertypes(document_type:)
|
8
9
|
types = {}
|
@@ -18,4 +19,9 @@ module GovukDocumentTypes
|
|
18
19
|
|
19
20
|
types
|
20
21
|
end
|
22
|
+
|
23
|
+
def self.supergroups(ids:)
|
24
|
+
groups = SUPERGROUPS["content_purpose_supergroup"]["items"]
|
25
|
+
groups.select { |g| ids.include?(g["id"]) }
|
26
|
+
end
|
21
27
|
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.
|
4
|
+
version: 0.4.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: 2018-
|
11
|
+
date: 2018-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|