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: a67072ac7856ffad37516d5260a262d4df89f4f7
4
- data.tar.gz: 154ca00506f3cdf9516904de41f7e2f7fab8bdf1
3
+ metadata.gz: 37cb9ff6d739ab002abb15a4702b09751d08ef23
4
+ data.tar.gz: 46330545b2f74e29b19f5ed1b1a4d52e0efd9164
5
5
  SHA512:
6
- metadata.gz: 7f5b0a0f56380d258d247d574c6a69333a6f88611df0682010cf5f044cd1ed86e3b596ac57db77c6977219446fdec2e3e744440413c08854f1f19318d2e5c82c
7
- data.tar.gz: 1df29e2bbb33772e624b5ecede8a97c80766e17b41956b3384fc6fa8c1c011a2e7a925a619f4f5791f625d5bbeabf32ec3c8307abf82f38c898cb1df42e56627
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
@@ -1,3 +1,3 @@
1
1
  module GovukContentSchemaTestHelpers
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk-content-schema-test-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Cobbett