ravioli 0.2.3 → 0.2.6

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: 2eec97a3b916cdab71a437dbf3eb0c7d63a45248af015e8f164e3adbd52189d0
4
- data.tar.gz: 8ff85466d17d6a6d095901e8980d67e2a1d272534cb3c04798e5a24651a8a762
3
+ metadata.gz: 69ec05d0e33d5ae92f86242a3f6d638f2e1a31915efd9da5f5d4d29b87b76ecd
4
+ data.tar.gz: 52add9ba137f98a65f0dfdce4b820eeaa85558b1ab5ccb2f697fc39e363f98cf
5
5
  SHA512:
6
- metadata.gz: af32119896fc75082294d65f0e3fd9c5ea70ca556e6d8905feb81aa67b3b7ff4e6acdc70de3af009bc7ef2df2ab220426a787546bb96a834d6f53277853905a2
7
- data.tar.gz: 4831e9aa975e33212a54907edb5471898f5fd097bf61aad719c8dc1d301b5cc3a55e8012ce9066355c57f48b9f85202deb31962817c71f1606aeb93e34e98104
6
+ metadata.gz: 396574e3bcf89e8b151a652033cf41b3ca73308d0c29fee7c64b9d93c6f714b83e1af51f8279b1df3305fb06a63d558644fb464f72734f97e0b0f282b06d8452
7
+ data.tar.gz: f0775ca4a3d2c609971a515cc9a950e7fab089c3635a335d7cb2deea559964f0f1dad850d89d67b3bd9c224fa728107f050b576a65541cbeffd84ff561411639
@@ -68,7 +68,7 @@ module Ravioli
68
68
  if value.is_a?(Hash)
69
69
  original_value = dig(*Array(key))
70
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)
71
+ original_value = original_value.table.deep_transform_values(&transform) if original_value.is_a?(self.class)
72
72
  value = original_value.deep_merge(value.deep_symbolize_keys) if original_value.is_a?(Hash)
73
73
  build(key, value)
74
74
  else
@@ -91,6 +91,14 @@ module Ravioli
91
91
  Array(key_path) + Array(keys)
92
92
  end
93
93
 
94
+ # Ruby 3's OStruct doesn't protect the `class` method ... which is dumb. Let's protect all
95
+ # public instance methods; this will just prevent reader attrs from being written. Things are
96
+ # still accessible via hash notation, e.g. `Rails.config[:class]`
97
+ def is_method_protected!(name)
98
+ return true if singleton_class.method_defined?(name)
99
+ super
100
+ end
101
+
94
102
  # rubocop:disable Style/MissingRespondToMissing
95
103
  def method_missing(method, *args, &block)
96
104
  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.3"
4
+ VERSION = "0.2.6"
5
5
  end
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ravioli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flip Sasser
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-06 00:00:00.000000000 Z
11
+ date: 2023-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '7.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.1'
22
+ version: '7.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '7.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.1'
32
+ version: '7.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: guard
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -90,22 +90,22 @@ dependencies:
90
90
  name: rails
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - "~>"
93
+ - - ">="
94
94
  - !ruby/object:Gem::Version
95
- version: '7'
95
+ version: '7.0'
96
96
  - - "<"
97
97
  - !ruby/object:Gem::Version
98
- version: '7.1'
98
+ version: '7.2'
99
99
  type: :development
100
100
  prerelease: false
101
101
  version_requirements: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - "~>"
103
+ - - ">="
104
104
  - !ruby/object:Gem::Version
105
- version: '7'
105
+ version: '7.0'
106
106
  - - "<"
107
107
  - !ruby/object:Gem::Version
108
- version: '7.1'
108
+ version: '7.2'
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: rspec
111
111
  requirement: !ruby/object:Gem::Requirement
@@ -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.4.2
303
+ rubygems_version: 3.4.5
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