ravioli 0.2.1 → 0.2.3

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: 319a36e063b7926065d63a7bad7284f2e997ecc161000cea2a0583c8fb5a68ce
4
- data.tar.gz: cc085fc7660369588072aa59abd5aacfb4658ca2438c2f1544d26436bb17dcc0
3
+ metadata.gz: 2eec97a3b916cdab71a437dbf3eb0c7d63a45248af015e8f164e3adbd52189d0
4
+ data.tar.gz: 8ff85466d17d6a6d095901e8980d67e2a1d272534cb3c04798e5a24651a8a762
5
5
  SHA512:
6
- metadata.gz: a4c13002dc24f8faab15a1d3d329bd626b93e8c2290744a01f5da7fd8fc71e2ebc1fa835886418070014603295c31f722dc8e88d6ead711115f18edbf1a6e373
7
- data.tar.gz: 7cdf9515b01290c85f61ea7292daf7a63c8b870736455d2ffe0eba7e4f5749ecd1bdf331ac40206afa735a5cea774e8028f0b52f72b91c6e9fbc7359d5a870f3
6
+ metadata.gz: af32119896fc75082294d65f0e3fd9c5ea70ca556e6d8905feb81aa67b3b7ff4e6acdc70de3af009bc7ef2df2ab220426a787546bb96a834d6f53277853905a2
7
+ data.tar.gz: 4831e9aa975e33212a54907edb5471898f5fd097bf61aad719c8dc1d301b5cc3a55e8012ce9066355c57f48b9f85202deb31962817c71f1606aeb93e34e98104
@@ -67,7 +67,9 @@ module Ravioli
67
67
  def cast(key, value)
68
68
  if value.is_a?(Hash)
69
69
  original_value = dig(*Array(key))
70
- value = original_value.table.deep_merge(value.deep_symbolize_keys) if original_value.is_a?(self.class)
70
+ transform = ->(value) { value.is_a?(self.class) ? value.table.deep_transform_values(&transform) : value }
71
+ original_value = original_value.table.deep_transform_values(&transform) if original_value.is_a?(Ravioli::Configuration)
72
+ value = original_value.deep_merge(value.deep_symbolize_keys) if original_value.is_a?(Hash)
71
73
  build(key, value)
72
74
  else
73
75
  fetch_env_key_for(key) {
@@ -89,7 +91,6 @@ module Ravioli
89
91
  Array(key_path) + Array(keys)
90
92
  end
91
93
 
92
- # rubocop:disable Style/MethodMissingSuper
93
94
  # rubocop:disable Style/MissingRespondToMissing
94
95
  def method_missing(method, *args, &block)
95
96
  return super unless args.empty?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ravioli
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ravioli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flip Sasser
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-04 00:00:00.000000000 Z
11
+ date: 2023-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -300,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
300
  - !ruby/object:Gem::Version
301
301
  version: '0'
302
302
  requirements: []
303
- rubygems_version: 3.1.6
303
+ rubygems_version: 3.4.2
304
304
  signing_key:
305
305
  specification_version: 4
306
306
  summary: Grab a fork and twist all your configuration spaghetti into a single, delicious