tdc 1.4.1 → 1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/Appraisals +4 -4
- data/CHANGELOG.md +13 -2
- data/gemfiles/{rails_7_2.gemfile → rails_8_1.gemfile} +1 -1
- data/lib/tdc/generators/standard_generator.rb +19 -15
- data/lib/tdc/version.rb +1 -1
- data/tdc.gemspec +2 -2
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a8a4972ee879dcd60c5a18a98ac57089e830ba10b1cd4affc4e87f46abb7992
|
|
4
|
+
data.tar.gz: 39bbd5424f1ba310eb6e9fe215db260e8e3a90fab1a6baa18e48d73641800bf4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea1d87132cf0541bfa22750b18a6efb33126bcb2b3bc47034f109cb95d8ccacd72d0f0f616cca2801a21084a0bba7670d6a3596379851f77b139cc3a9631facc
|
|
7
|
+
data.tar.gz: 924db5651ea327cdb4b0a00fb62c8f15ddea1f30b308d939197fa977cc155a718150c1cd1bd664f8a86e743ddfd5c2ffeb00bdd29eb57b907ef5b36109bb99ba
|
data/.rubocop.yml
CHANGED
data/Appraisals
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
5
|
-
|
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
5
|
+
|
|
6
|
+
Minor versions may drop support for older Ruby and Rails versions. The gemspec
|
|
7
|
+
constraints prevent incompatible installs.
|
|
6
8
|
|
|
7
9
|
## [Unreleased]
|
|
8
10
|
|
|
11
|
+
## [1.5] - 2026-05-12
|
|
12
|
+
|
|
13
|
+
- Support Rails 8.1.x
|
|
14
|
+
|
|
15
|
+
#### Breaking Changes
|
|
16
|
+
|
|
17
|
+
- Drop support for Ruby 3.3
|
|
18
|
+
- Drop support for Rails 7.2
|
|
19
|
+
|
|
9
20
|
## [1.4.1] - 2026-04-04
|
|
10
21
|
|
|
11
22
|
- Fix tag lookup colliding with inherited `Object` methods (e.g., `display`) in `StandardGenerator`
|
|
@@ -15,21 +15,7 @@ module Tdc
|
|
|
15
15
|
def generate
|
|
16
16
|
CatalogEntries.new.tap do |catalog_entries|
|
|
17
17
|
instance_definitions.each do |instance_definition|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
# Delete the tag so that the models do not need to filter it out.
|
|
21
|
-
tag = instance_definition.delete("tag")
|
|
22
|
-
|
|
23
|
-
existing_record = find_existing_record(tag, catalog_entries)
|
|
24
|
-
|
|
25
|
-
if existing_record
|
|
26
|
-
generated = run_resolvers_and_update_instance(existing_record)
|
|
27
|
-
else
|
|
28
|
-
generated = run_resolvers_and_generate_instance
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Add generated instance to the catalog entries whenever a tag provided.
|
|
32
|
-
catalog_entries.add_catalog_entry(tag, generated) if tag
|
|
18
|
+
generate_or_update(instance_definition, catalog_entries)
|
|
33
19
|
end
|
|
34
20
|
end
|
|
35
21
|
end
|
|
@@ -74,6 +60,24 @@ module Tdc
|
|
|
74
60
|
|
|
75
61
|
private
|
|
76
62
|
|
|
63
|
+
def generate_or_update(instance_definition, catalog_entries)
|
|
64
|
+
configure_instance_definition(instance_definition)
|
|
65
|
+
|
|
66
|
+
# Delete the tag so that the models do not need to filter it out.
|
|
67
|
+
tag = instance_definition.delete("tag")
|
|
68
|
+
|
|
69
|
+
existing_record = find_existing_record(tag, catalog_entries)
|
|
70
|
+
|
|
71
|
+
generated = if existing_record
|
|
72
|
+
run_resolvers_and_update_instance(existing_record)
|
|
73
|
+
else
|
|
74
|
+
run_resolvers_and_generate_instance
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Add generated instance to the catalog entries whenever a tag provided.
|
|
78
|
+
catalog_entries.add_catalog_entry(tag, generated) if tag
|
|
79
|
+
end
|
|
80
|
+
|
|
77
81
|
def find_existing_record(tag, catalog_entries)
|
|
78
82
|
return unless tag
|
|
79
83
|
|
data/lib/tdc/version.rb
CHANGED
data/tdc.gemspec
CHANGED
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
|
12
12
|
spec.homepage = "https://github.com/nulogy/tdc"
|
|
13
13
|
spec.license = "MIT"
|
|
14
14
|
|
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 3.
|
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.4")
|
|
16
16
|
|
|
17
17
|
spec.metadata = {
|
|
18
18
|
"homepage_uri" => "https://github.com/nulogy/tdc",
|
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
|
30
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
31
31
|
spec.require_paths = ["lib"]
|
|
32
32
|
|
|
33
|
-
spec.add_dependency "activesupport", ">=
|
|
33
|
+
spec.add_dependency "activesupport", ">= 8.0", "< 8.2"
|
|
34
34
|
spec.add_dependency "ostruct", ">= 0.6"
|
|
35
35
|
spec.add_dependency "zeitwerk", ">= 2.7"
|
|
36
36
|
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: 1.
|
|
4
|
+
version: '1.5'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alistair McKinnell
|
|
@@ -15,20 +15,20 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '
|
|
18
|
+
version: '8.0'
|
|
19
19
|
- - "<"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: '8.
|
|
21
|
+
version: '8.2'
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
requirements:
|
|
26
26
|
- - ">="
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: '
|
|
28
|
+
version: '8.0'
|
|
29
29
|
- - "<"
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
|
-
version: '8.
|
|
31
|
+
version: '8.2'
|
|
32
32
|
- !ruby/object:Gem::Dependency
|
|
33
33
|
name: ostruct
|
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -76,8 +76,8 @@ files:
|
|
|
76
76
|
- bin/console
|
|
77
77
|
- bin/setup
|
|
78
78
|
- gemfiles/.bundle/config
|
|
79
|
-
- gemfiles/rails_7_2.gemfile
|
|
80
79
|
- gemfiles/rails_8_0.gemfile
|
|
80
|
+
- gemfiles/rails_8_1.gemfile
|
|
81
81
|
- images/Tdc.png
|
|
82
82
|
- lib/tdc.rb
|
|
83
83
|
- lib/tdc/data_definition.rb
|
|
@@ -123,7 +123,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
123
123
|
requirements:
|
|
124
124
|
- - ">="
|
|
125
125
|
- !ruby/object:Gem::Version
|
|
126
|
-
version: '3.
|
|
126
|
+
version: '3.4'
|
|
127
127
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
|
129
129
|
- - ">="
|