tdc 0.3.5 → 0.3.6

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
  SHA256:
3
- metadata.gz: 2f0fa7ec99a40148ff1ca3fccaaa4ffeee29cc12034dc688b0957deeeb5df9a1
4
- data.tar.gz: 2bcd19c81b665611f4f7abbfc8d23fb79db098b84eb837de5e6e6a67a69d7cf7
3
+ metadata.gz: afd309b8d6f641f50856a6ab71c6557dceba91c43e97c6d23a54f526cc954570
4
+ data.tar.gz: c730e903a12d47f4a8dc452a212ae9f38f75a4d2b61a74dd72237e69f0005d47
5
5
  SHA512:
6
- metadata.gz: 7cc7b66e9a063bd23e6ccfc482f187b1c8b1a8b2950e16984785c2f9c5c40615e2fb0375e59afd2d374ca3d782719d5f164ac4a2d177d746f0858551b0804061
7
- data.tar.gz: dd2476bd5f82a387b89353e790661263d1c28b5c65f901ec01d0f50c3efcf1e716904eacab039f2c39fd44c91f97aeb4dd386dc884a3de07029354c8549acd43
6
+ metadata.gz: f699b62e54e48f3b42bb06215a8e783ca15797265292e988f70f4cbc82191aa55174ccfbcdf1bb50b58ccb1323716272d7d958283b49eac45dbb1c948208f616
7
+ data.tar.gz: 7496da7a34c508a1b132a5232f1c061eded18b8b5057192728be98b3faae095b3c3e1dd377b2563fde95f897861bcedb932bf867c8f20c4e3f09621af18cf52d
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.6] - 2020-08-06
10
+
11
+ #### Breaking Changes
12
+
13
+ - Drop the `SingularGenerator` abstraction
14
+
9
15
  ## [0.3.5] - 2020-08-06
10
16
 
11
17
  - Add the `single_entry` method to `CatalogEntries`
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 ```SingularGenerator```. Best practice is to define an ```ApplicationStandardGenerator``` and an ```ApplicationSingularGenerator``` and have all other generators inherit from them.
7
+ Define your own test data generators by inheriting from ```StandardGenerator```. Best practice is to define an ```ApplicationStandardGenerator``` and have all other generators inherit from it.
8
8
 
9
9
  Define your own definition resolvers by inheriting from ```DefinitionResolver```. Best practice is to define an ```ApplicationDefinitionResolver``` and all other definition resolvers inherit from it.
10
10
 
Binary file
data/lib/tdc.rb CHANGED
@@ -31,7 +31,6 @@ require "tdc/generators/definition_sourcable"
31
31
  # Generator Hierarchy
32
32
  require "tdc/generators/generator_base"
33
33
  require "tdc/generators/configurable_generator"
34
- require "tdc/generators/singular_generator"
35
34
  require "tdc/generators/standard_generator"
36
35
 
37
36
  # Definition Resolvers
@@ -1,3 +1,3 @@
1
1
  module Tdc
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alistair McKinnell
@@ -139,7 +139,6 @@ files:
139
139
  - lib/tdc/generators/definition_sourcable.rb
140
140
  - lib/tdc/generators/generation_context.rb
141
141
  - lib/tdc/generators/generator_base.rb
142
- - lib/tdc/generators/singular_generator.rb
143
142
  - lib/tdc/generators/standard_generator.rb
144
143
  - lib/tdc/in_memory_data_definition.rb
145
144
  - lib/tdc/missing_override_error.rb
@@ -1,29 +0,0 @@
1
- module Tdc
2
- module Generators
3
- #
4
- # Abstract class for defining generators that define a single model instance.
5
- #
6
- # See also StandardGenerator.
7
- #
8
- class SingularGenerator < Tdc::Generators::ConfigurableGenerator
9
- def generate
10
- configure_instance_definition(singular_instance_definition)
11
-
12
- run_resolvers_and_generate_instance
13
- end
14
-
15
- private
16
-
17
- def singular_instance_definition
18
- all_instance_definitions = instance_definitions
19
-
20
- if all_instance_definitions.many?
21
- raise Tdc::FatalError, "A singular generator only generates a single model instance"
22
- end
23
-
24
- # Delete the tag so that the models do not need to filter it out.
25
- all_instance_definitions.first.except("tag")
26
- end
27
- end
28
- end
29
- end