govuk_schemas 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9297a4053527dcb203bec4ff865778ce6f97c542
4
- data.tar.gz: e52f17ca990bb26413119b78dec6e5bf45bc4784
3
+ metadata.gz: b196457b3ec8a0f254c64d245c32f11448f60215
4
+ data.tar.gz: 0dff37d3dd84f07932c3297e8d6477a8d9bfe16a
5
5
  SHA512:
6
- metadata.gz: ec518f9fd857d4f05035fa1b22a9bb72bc64e4c40745ca87f28a6e4f09834d1ce1e745d8831bbd1dbe2934a449aa0ad0e21ad7b2cc4f9876e48236310d2efd1e
7
- data.tar.gz: cef56f3ce00f7586d6d80435578325deb0afd89d452f6d5d409be18d10ba1b061fde25a2754386b5ae44d45c5963bd60689159c58013907a87aba98e1bb2d1b2
6
+ metadata.gz: 6231f2bc473bbaf6ca90d67a2b960c7340b7dbf8c23b9b4140cb7b074c69cdbe83b4818a8fda1dba782cf2ecff7fc124dc42f4cfc10ec7b91fdb551902c30bd2
7
+ data.tar.gz: de370e426b29552afa89b8ebb41db9cd423136fe389af51404858648bd5bceb8fa516640c262a9f0542c41f066a3a6c2f71ee1f9ca6aa0edfeedd9225e565dd0
@@ -1,3 +1,7 @@
1
+ # 3.2.0
2
+
3
+ * Add `GovukSchemas::DocumentTypes.valid_document_types` (PR #48)
4
+
1
5
  # 3.1.0
2
6
 
3
7
  * Update json-schema dependency
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env groovy
2
2
 
3
+ library("govuk")
4
+
3
5
  REPOSITORY = 'govuk_schemas'
4
6
 
5
7
  node {
6
- def govuk = load '/var/lib/jenkins/groovy_scripts/govuk_jenkinslib.groovy'
7
8
 
8
9
  try {
9
10
  stage('Checkout') {
data/README.md CHANGED
@@ -12,7 +12,7 @@ gem "govuk_schemas", "~> VERSION"
12
12
 
13
13
  ## Usage
14
14
 
15
- [Read the documentation!](http://www.rubydoc.info/github/alphagov/govuk_schemas)
15
+ [Read the documentation!](http://www.rubydoc.info/gems/govuk_schemas)
16
16
 
17
17
  ## Running the test suite
18
18
 
@@ -2,6 +2,7 @@ require "govuk_schemas/version"
2
2
  require "govuk_schemas/schema"
3
3
  require "govuk_schemas/utils"
4
4
  require "govuk_schemas/random_example"
5
+ require "govuk_schemas/document_types"
5
6
  require "govuk_schemas/example"
6
7
 
7
8
  module GovukSchemas
@@ -0,0 +1,11 @@
1
+ module GovukSchemas
2
+ class DocumentTypes
3
+ # Return all of the document types on GOV.UK
4
+ def self.valid_document_types
5
+ @valid_document_types ||= begin
6
+ filename = "#{GovukSchemas::CONTENT_SCHEMA_DIR}/lib/govuk_content_schemas/allowed_document_types.yml"
7
+ YAML.load_file(filename)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,4 +1,4 @@
1
1
  module GovukSchemas
2
2
  # @private
3
- VERSION = "3.1.0".freeze
3
+ VERSION = "3.2.0".freeze
4
4
  end
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: 3.1.0
4
+ version: 3.2.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: 2017-12-11 00:00:00.000000000 Z
11
+ date: 2018-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema
@@ -115,6 +115,7 @@ files:
115
115
  - bin/console
116
116
  - govuk_schemas.gemspec
117
117
  - lib/govuk_schemas.rb
118
+ - lib/govuk_schemas/document_types.rb
118
119
  - lib/govuk_schemas/example.rb
119
120
  - lib/govuk_schemas/random.rb
120
121
  - lib/govuk_schemas/random_example.rb