tdc 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -2
- data/lib/tdc.rb +1 -0
- data/lib/tdc/generators/generation_context.rb +15 -0
- data/lib/tdc/generators/generator_base.rb +6 -4
- data/lib/tdc/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf0ce48e5dd1a629ad0c5240f9c3d8c344b46cf368e01bb842eefb3454167b4e
|
4
|
+
data.tar.gz: a85d7fef856826f3a4a4112c4e4186c1e813f8a52de500466ba0b9acfe559fe5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 250b3ebace2728d87756a51f7075c3f318637997e5473bb90c4cccd820326f77ebf00429e57e885467d837b969c166b43f5044d75b028022f0dcd1464f7967bd
|
7
|
+
data.tar.gz: 8082f7dbdcd16c0a7cacb94af1479d0df9e4a12a83ec57556f0e6a865e18d5a5d7fa4d14cc2e3e8c3886c2ae2373bf64733e138072f262b1efc27e89ea259798
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.3.4] - 2020-08-05
|
10
|
+
|
11
|
+
#### Breaking Changes
|
12
|
+
|
13
|
+
- Introduce the `GenerationContext` abstraction
|
14
|
+
- All generators are initialized with an instance of `Tdc::GenerationContext`
|
15
|
+
|
9
16
|
## [0.3.3] - 2020-08-04
|
10
17
|
|
11
18
|
- Add the `empty?` method to `CatalogEntries`
|
@@ -55,5 +62,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
55
62
|
#### New Features
|
56
63
|
|
57
64
|
- Avoid all PackManager dependencies
|
58
|
-
|
59
|
-
|
data/lib/tdc.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
module Tdc
|
2
|
+
module Generators
|
3
|
+
#
|
4
|
+
# Knows all the parameters that define the context for generation.
|
5
|
+
#
|
6
|
+
class GenerationContext
|
7
|
+
attr_reader :current_catalog, :data_definition
|
8
|
+
|
9
|
+
def initialize(current_catalog:, data_definition:)
|
10
|
+
@current_catalog = current_catalog
|
11
|
+
@data_definition = data_definition
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -4,11 +4,13 @@ module Tdc
|
|
4
4
|
# Abstract base class for all Test Data Catalog generators.
|
5
5
|
#
|
6
6
|
class GeneratorBase
|
7
|
-
attr_reader :
|
7
|
+
attr_reader :generation_context
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
# ARM (2020-08-05): For backwards compatibility. Consider removing.
|
10
|
+
delegate :current_catalog, :data_definition, to: :generation_context
|
11
|
+
|
12
|
+
def initialize(generation_context)
|
13
|
+
@generation_context = generation_context
|
12
14
|
end
|
13
15
|
|
14
16
|
def generate
|
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.3.
|
4
|
+
version: 0.3.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-08-
|
11
|
+
date: 2020-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -137,6 +137,7 @@ files:
|
|
137
137
|
- lib/tdc/generators/configurable_generator.rb
|
138
138
|
- lib/tdc/generators/definition_resolvable.rb
|
139
139
|
- lib/tdc/generators/definition_sourcable.rb
|
140
|
+
- lib/tdc/generators/generation_context.rb
|
140
141
|
- lib/tdc/generators/generator_base.rb
|
141
142
|
- lib/tdc/generators/singular_generator.rb
|
142
143
|
- lib/tdc/generators/standard_generator.rb
|