Class: SchemaTest::Configuration
- Inherits:
-
Object
- Object
- SchemaTest::Configuration
- Defined in:
- lib/schema_test/configuration.rb
Instance Attribute Summary collapse
-
#compiled ⇒ Object
Set to true to use pre-compiled JSON schema files for validation instead of inlining expanded schemas into test files.
-
#definition_paths ⇒ Object
This should be an array or one or more paths.
-
#disable_rubocop ⇒ Object
Set to true in order to disable running rubocop on the expanded schemas, as the Ruby PP output does not conform to rubocop's standards.
-
#domain ⇒ Object
The domain is used to contstruct the
$idpart of the generated JSON-Schema definitions.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
20 21 22 23 24 25 |
# File 'lib/schema_test/configuration.rb', line 20 def initialize @domain = 'example.com' @definition_paths = [] @disable_rubocop = false @compiled = false end |
Instance Attribute Details
#compiled ⇒ Object
Set to true to use pre-compiled JSON schema files for validation instead of inlining expanded schemas into test files.
18 19 20 |
# File 'lib/schema_test/configuration.rb', line 18 def compiled @compiled end |
#definition_paths ⇒ Object
This should be an array or one or more paths. All ruby files under these
paths will all be loaded when SchemaTest.setup! is called. You can nest
files in as many subdirectories are you like.
10 11 12 |
# File 'lib/schema_test/configuration.rb', line 10 def definition_paths @definition_paths end |
#disable_rubocop ⇒ Object
Set to true in order to disable running rubocop on the expanded schemas, as the Ruby PP output does not conform to rubocop's standards.
14 15 16 |
# File 'lib/schema_test/configuration.rb', line 14 def disable_rubocop @disable_rubocop end |
#domain ⇒ Object
The domain is used to contstruct the $id part of the generated
JSON-Schema definitions. This can be set to anything you like really.
5 6 7 |
# File 'lib/schema_test/configuration.rb', line 5 def domain @domain end |