ufo 5.0.3 → 5.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16c9279444a497f78ad5c549c4f7905fb05a567300164c2f867f175037b4c1f0
4
- data.tar.gz: 327b3870770f6bc0de6ebef9a853fe49bc68e1fec6ce552f1bb58766dc56ce49
3
+ metadata.gz: 320bf4465ea909e6aad615ffe8c99402a8e552745e202e54bfb1fa9161f8a06a
4
+ data.tar.gz: 5fa11f5e7c963e195910423bdb2114c1c9feee76c4951836a51bb7b4ff848851
5
5
  SHA512:
6
- metadata.gz: 9058a2df81260a7652c1d296a55da81fb2cdc6771544973c772b9b1e529103a302a566d7dcb949cab969766c1b3a19c35621d46da1a203adbdd75668056ecccf
7
- data.tar.gz: '0809dd986efd4e6d399ed463dcd2b5ed15e715b4a4b202aeb2cc0db9d8e604f82b31cdb608736d42a0c1964d0d226f4b2353a31d981bd4b2b425cdadc4854f80'
6
+ metadata.gz: 76e02045c71f002b9a9adeea046470d03a6b3466fafb9733db71da1a34b73b2565f1a5259e0fa82417965367b4ada63f4b967c92f976d96ef863ce4542053411
7
+ data.tar.gz: f1761830ab51ee8279fc9ad83bba0e91d9a6cb25499d14af0dcba3b14cf039a3bac2b450b8c2741e6626beae6719abb591bd2e9746abfaa3adaa89792ad59a7b
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [5.0.4] - 2021-01-23
7
+ - [#119](https://github.com/tongueroo/ufo/pull/119) layer base profiles with env-specific or default profile
8
+
6
9
  ## [5.0.3] - 2020-12-10
7
10
  - [#118](https://github.com/tongueroo/ufo/pull/118) update aws-mfa-secure with require singleton fix
8
11
 
@@ -36,4 +36,18 @@ Here's a list of the resources in the [cfn/stack.yml](https://github.com/tonguer
36
36
  * Listener
37
37
  * TargetGroup
38
38
 
39
+ ## Layering Support
40
+
41
+ The `base.yml` profile files always get evaluated and env-specific ENV.yml file are layered or merged together. This miminizes duplication. For example, these files are merged:
42
+
43
+ * .ufo/settings/cfn/base.yml
44
+ * .ufo/settings/cfn/development.yml
45
+
46
+ The settings in `development.yml` override the settings in `base.yml`. Here's another example:
47
+
48
+ * .ufo/settings/network/base.yml
49
+ * .ufo/settings/network/development.yml
50
+
51
+ Note, this feature is available in v5.0.4+.
52
+
39
53
  For the most up to date list check out the [cfn/stack.yml](https://github.com/tongueroo/ufo/blob/master/lib/cfn/stack.yml) source code directly.
@@ -21,7 +21,17 @@ class Ufo::Setting
21
21
  end
22
22
 
23
23
  text = RenderMePretty.result(found)
24
- YAML.load(text).deep_symbolize_keys
24
+ specific_data = YAML.load(text).deep_symbolize_keys
25
+
26
+ base = "#{Ufo.root}/.ufo/settings/#{@type}/base.yml"
27
+ base_data = if File.exist?(base)
28
+ text = RenderMePretty.result(base)
29
+ YAML.load(text).deep_symbolize_keys
30
+ else
31
+ {}
32
+ end
33
+
34
+ base_data.deep_merge(specific_data)
25
35
  end
26
36
  memoize :data
27
37
  end
@@ -1,3 +1,3 @@
1
1
  module Ufo
2
- VERSION = "5.0.3"
2
+ VERSION = "5.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ufo
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.3
4
+ version: 5.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-10 00:00:00.000000000 Z
11
+ date: 2021-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-logs
@@ -715,7 +715,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
715
715
  - !ruby/object:Gem::Version
716
716
  version: '0'
717
717
  requirements: []
718
- rubygems_version: 3.1.4
718
+ rubygems_version: 3.2.5
719
719
  signing_key:
720
720
  specification_version: 4
721
721
  summary: AWS ECS Deploy Tool