tdc 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/images/Tdc.png +0 -0
- data/lib/tdc/data_definition.rb +1 -1
- data/lib/tdc/generators/configurable_generator.rb +1 -1
- data/lib/tdc/generators/generator_base.rb +2 -2
- data/lib/tdc/generators/singular_generator.rb +5 -7
- data/lib/tdc/missing_override_error.rb +1 -5
- data/lib/tdc/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea6a4c15535d29f9f7ab47c6ec12f4c20cc59f588543b19869324f5901097c24
|
4
|
+
data.tar.gz: c5d57e1578f9550a725f20f6ef396bd2bb3d5791773929afd9c6605d8686f2b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7829e509a7c5ef3c7db2b947ee109af96a442c662ccb15e0f5ab50a04e70f91eef039944b65a4b6dfcf9eae232e249146062067c79a2ca955cff2027b0aee649
|
7
|
+
data.tar.gz: 20eefb49010d15905073f5f823bdc171cc428e5c2ef1217d61ec17210d4426f4dd7de4312c56167cd4b67b37d43c2049b3cfc90b0a8b51f4577eb5c884b94841
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
**Extension Points**
|
6
6
|
|
7
|
-
Define your own test data generators by inheriting from ```StandardGenerator``` or ```
|
7
|
+
Define your own test data generators by inheriting from ```StandardGenerator``` or ```SingularGenerator```. Best practice is to define an ```ApplicationStandardGenerator``` and an ```ApplicationSingularGenerator``` and have all other generators inherit from them.
|
8
8
|
|
9
9
|
During generation the test data catalog will be represented by ```CatalogEntries``` that are populated by reading from ```YAML``` files with a ```DataDefinitionReader``` or provided directly by an ```InMemoryDataDefinition```.
|
10
10
|
|
data/images/Tdc.png
CHANGED
Binary file
|
data/lib/tdc/data_definition.rb
CHANGED
@@ -12,11 +12,11 @@ module Tdc
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def generate
|
15
|
-
raise Tdc::MissingOverrideError
|
15
|
+
raise Tdc::MissingOverrideError, "Implement the 'generate' method"
|
16
16
|
end
|
17
17
|
|
18
18
|
def instance_definitions
|
19
|
-
raise Tdc::MissingOverrideError
|
19
|
+
raise Tdc::MissingOverrideError, "Implement the 'instance_definitions' method"
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -6,12 +6,6 @@ module Tdc
|
|
6
6
|
# See also StandardGenerator.
|
7
7
|
#
|
8
8
|
class SingularGenerator < Tdc::Generators::ConfigurableGenerator
|
9
|
-
def initialize(data_definition, current_catalog)
|
10
|
-
super
|
11
|
-
|
12
|
-
@additional_definitions = {}
|
13
|
-
end
|
14
|
-
|
15
9
|
def with_definition(additional_definitions)
|
16
10
|
@additional_definitions = additional_definitions.stringify_keys.reject { |_, v| v == :missing_definition }
|
17
11
|
|
@@ -19,13 +13,17 @@ module Tdc
|
|
19
13
|
end
|
20
14
|
|
21
15
|
def generate
|
22
|
-
configure_instance_definition(singular_instance_definition.merge(
|
16
|
+
configure_instance_definition(singular_instance_definition.merge(additional_definitions))
|
23
17
|
|
24
18
|
run_resolvers_and_generate_instance
|
25
19
|
end
|
26
20
|
|
27
21
|
private
|
28
22
|
|
23
|
+
def additional_definitions
|
24
|
+
@additional_definitions || {}
|
25
|
+
end
|
26
|
+
|
29
27
|
def singular_instance_definition
|
30
28
|
all_instance_definitions = instance_definitions
|
31
29
|
|
data/lib/tdc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tdc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alistair McKinnell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
164
|
- !ruby/object:Gem::Version
|
165
165
|
version: '0'
|
166
166
|
requirements: []
|
167
|
-
rubygems_version: 3.1.
|
167
|
+
rubygems_version: 3.1.4
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: A simple framework for creating a Test Data Catalog
|