Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for templating implicit records in a zone #185

Merged
merged 1 commit into from Dec 2, 2020

Conversation

David-Tamrazov
Copy link

@David-Tamrazov David-Tamrazov commented Nov 30, 2020

This PR adds support for injecting implicit records into a zone based on a template provided by the consumer. When building its record set, each Zone will now loop through every template in its config and, for each template, inject any records it creates based on criteria defined within the template itself.

This allows consumers to define their own criteria for:

  • which records should be used for template record generation
  • the format of the template record and what data should go into it
  • what sort of existing record conflicts should prevent the template-generated record from being injected

Copy link
Contributor

@XaF XaF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you're currently working on adding tests. Here's a first batch of comments 😀

bin/console Outdated Show resolved Hide resolved
lib/record_store/zone.rb Outdated Show resolved Hide resolved
lib/record_store/zone/config.rb Outdated Show resolved Hide resolved
lib/record_store/zone/config/template.rb Outdated Show resolved Hide resolved
lib/record_store/zone/config/template.rb Outdated Show resolved Hide resolved
lib/record_store/zone/config/template.rb Outdated Show resolved Hide resolved
lib/record_store/zone/config/template.rb Outdated Show resolved Hide resolved
template/templates/template_example.yml.erb Outdated Show resolved Hide resolved
template/templates/template_example.yml.erb Outdated Show resolved Hide resolved
@David-Tamrazov David-Tamrazov force-pushed the add-support-for-templates branch 7 times, most recently from d267961 to 875e6bd Compare December 1, 2020 14:50
@David-Tamrazov David-Tamrazov marked this pull request as ready for review December 1, 2020 14:51
lib/record_store/zone.rb Outdated Show resolved Hide resolved
lib/record_store/zone/config/implicit_record_template.rb Outdated Show resolved Hide resolved
test/fixtures/config/dummy/config.yml Outdated Show resolved Hide resolved
lib/record_store/zone.rb Outdated Show resolved Hide resolved
test/zone_test.rb Show resolved Hide resolved
@David-Tamrazov David-Tamrazov force-pushed the add-support-for-templates branch 6 times, most recently from 9ca2bf0 to c9e2b81 Compare December 1, 2020 21:55
@David-Tamrazov David-Tamrazov merged commit 41ea5ed into master Dec 2, 2020
@David-Tamrazov David-Tamrazov deleted the add-support-for-templates branch December 2, 2020 13:43
@David-Tamrazov David-Tamrazov temporarily deployed to production December 2, 2020 14:46 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants