bricolages / bricolage

AWS-oriented Data Warehouse Framework
113 stars 20 forks source link

Allow to use aliases on config YAMLs #175

Closed nekketsuuu closed 1 year ago

nekketsuuu commented 1 year ago

Ruby 3.1 (or Psych 4.0) changes Psych.load behavior: https://github.com/ruby/psych/releases/tag/v4.0.0

This commit allows to use aliases in config YAML because:

I manually confirmed to pass tests on my local machine with Ruby 3.0.5 and Ruby 3.1.3, with/without modifications of config/test/datasource.yml as follows

--- a/config/test/datasource.yml
+++ b/config/test/datasource.yml
@@ -1,4 +1,4 @@
-test_db:
+test: &test
   type: psql
   host: localhost
   port: 5432
@@ -7,3 +7,6 @@ test_db:
   password: bricolage_test
   encoding: utf8
   sql_log_level: DEBUG
+
+test_db:
+  <<: *test
aamine commented 1 year ago

Thanks, this looks reasonable.

nekketsuuu commented 1 year ago

Thank you!