govuk-content-schema-test-helpers 1.1.0 → 1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37cb9ff6d739ab002abb15a4702b09751d08ef23
|
4
|
+
data.tar.gz: 46330545b2f74e29b19f5ed1b1a4d52e0efd9164
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7af81a120a7888fa0a45579c3c56ee44e161c6395b1d88bd43eecb026e32e6dbb93c42336f16fd080cff0fc006ca91c2e2e7f5086126cd0cbdb83df42fa1b496
|
7
|
+
data.tar.gz: 501ff1b09512a293cf6646013c88e57ef0e3d1e73961ec12d52faa21e11e81d8a9dd254ca35c2647b1e278f21233a6843b4beb7e689987755a83f16118882faa
|
@@ -13,5 +13,14 @@ module GovukContentSchemaTestHelpers
|
|
13
13
|
raise ImproperlyConfiguredError, message
|
14
14
|
end
|
15
15
|
end
|
16
|
+
|
17
|
+
# Get a list of the formats defined in govuk-content-schemas
|
18
|
+
def self.formats
|
19
|
+
Util.check_govuk_content_schemas_path!
|
20
|
+
|
21
|
+
formats_directory = File.join(Util.govuk_content_schemas_path, "/formats")
|
22
|
+
format_paths = Dir.glob("#{formats_directory}/*").select { |f| File.directory?(f) }
|
23
|
+
format_paths.map { |path| File.basename(path) }
|
24
|
+
end
|
16
25
|
end
|
17
26
|
end
|