recursive-open-struct 2.1.0 → 2.1.1
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 +4 -4
- data/AUTHORS.txt +1 -0
- data/CHANGELOG.md +16 -0
- data/lib/recursive-open-struct.rb +2 -0
- data/lib/recursive_open_struct/debug_inspect.rb +37 -29
- data/lib/recursive_open_struct/deep_dup.rb +32 -25
- data/lib/recursive_open_struct/dig.rb +8 -4
- data/lib/recursive_open_struct/version.rb +3 -1
- data/lib/recursive_open_struct.rb +33 -18
- metadata +57 -42
- data/.document +0 -5
- data/.github/workflows/ruby.yml +0 -39
- data/.gitignore +0 -52
- data/.rspec +0 -1
- data/.travis.yml +0 -34
- data/CONTRIBUTING.md +0 -51
- data/Gemfile +0 -2
- data/Rakefile +0 -60
- data/recursive-open-struct.gemspec +0 -48
- data/spec/recursive_open_struct/debug_inspect_spec.rb +0 -70
- data/spec/recursive_open_struct/indifferent_access_spec.rb +0 -190
- data/spec/recursive_open_struct/open_struct_behavior_spec.rb +0 -148
- data/spec/recursive_open_struct/ostruct_2_0_0_spec.rb +0 -111
- data/spec/recursive_open_struct/ostruct_2_3_0_spec.rb +0 -49
- data/spec/recursive_open_struct/recursion_and_subclassing_spec.rb +0 -14
- data/spec/recursive_open_struct/recursion_spec.rb +0 -355
- data/spec/recursive_open_struct/wrapping_spec.rb +0 -70
- data/spec/spec_helper.rb +0 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f4e75292eb58976521bfcaaa65dfa6c9dff1a8e530458ea9ae4e66d9d5efb607
|
|
4
|
+
data.tar.gz: b141bb94fcd5af8bb63d96527f496c6b95f6e4947f4563fb27867fad52d53b73
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac8fc6e33ce22b9d7c456ea8d3bfa434e2f29fa270a2f55259eb76d0fc14fe6c22924632d6ff03b90d7e7ace5ed04d8b7d4f0848e1e008ed468130d49170135b
|
|
7
|
+
data.tar.gz: 6034ad571f93328692f92ec5ab91ee3e69883ea11c394e3a40136be1fe9121ac1476bdd6f35ac168885f9e7b37d346059a7742132c65e01c7cffb367643cbe03
|
data/AUTHORS.txt
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
2.1.1 / 2026/04/18
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
* MAINT: [#83](https://github.com/aetherknight/recursive-open-struct/pull/83):
|
|
5
|
+
Yuri Zubov: Reduce gem size by excluding test files
|
|
6
|
+
|
|
7
|
+
* MAINT: [#82](https://github.com/aetherknight/recursive-open-struct/pull/82):
|
|
8
|
+
Enable CodeQL scanning
|
|
9
|
+
* MAINT: [#84](https://github.com/aetherknight/recursive-open-struct/pull/84):
|
|
10
|
+
Add Ruby 4.0 to the testing matrix
|
|
11
|
+
* MAINT: Configure Dependabot to update github actions dependencies, and let it
|
|
12
|
+
update action versions/pins
|
|
13
|
+
* MAINT: [#87](https://github.com/aetherknight/recursive-open-struct/pull/87):
|
|
14
|
+
Add rubocop for autoformatting and linting, and address a lot of lints,
|
|
15
|
+
particularly around RSpec tests
|
|
16
|
+
|
|
1
17
|
2.1.0 / 2025/12/05
|
|
2
18
|
==================
|
|
3
19
|
|
|
@@ -1,38 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
def debug_inspect(io = STDOUT, indent_level = 0, recursion_limit = 12)
|
|
3
|
-
display_recursive_open_struct(io, @table, indent_level, recursion_limit)
|
|
4
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
5
2
|
|
|
6
|
-
|
|
3
|
+
# rubocop:disable Metrics/AbcSize
|
|
4
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
|
5
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
|
6
|
+
# rubocop:disable Style/StringConcatenation
|
|
7
|
+
class RecursiveOpenStruct < OpenStruct
|
|
8
|
+
module DebugInspect
|
|
9
|
+
def debug_inspect(io = $stdout, indent_level = 0, recursion_limit = 12)
|
|
10
|
+
display_recursive_open_struct(io, @table, indent_level, recursion_limit)
|
|
11
|
+
end
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
ostrct_or_hash = ostrct_or_hash.marshal_dump
|
|
15
|
-
end
|
|
13
|
+
def display_recursive_open_struct(io, ostrct_or_hash, indent_level, recursion_limit)
|
|
14
|
+
if recursion_limit <= 0
|
|
15
|
+
# protection against recursive structure (like in the tests)
|
|
16
|
+
io.puts ' ' * indent_level + '(recursion limit reached)'
|
|
17
|
+
else
|
|
18
|
+
# puts ostrct_or_hash.inspect
|
|
19
|
+
ostrct_or_hash = ostrct_or_hash.marshal_dump if ostrct_or_hash.is_a?(self.class)
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
# We'll display the key values like this : key = value
|
|
22
|
+
# to align display, we look for the maximum key length of the data that will be displayed
|
|
23
|
+
# (everything except hashes)
|
|
24
|
+
data_indent = ostrct_or_hash \
|
|
25
|
+
.reject { |_k, v| v.is_a?(self.class) || v.is_a?(Hash) } \
|
|
26
|
+
.max { |a, b| a[0].to_s.length <=> b[0].to_s.length }[0].to_s.length
|
|
27
|
+
# puts "max length = #{data_indent}"
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
ostrct_or_hash.each do |key, value|
|
|
30
|
+
if value.is_a?(self.class) || value.is_a?(Hash)
|
|
31
|
+
io.puts ' ' * indent_level + key.to_s + '.'
|
|
32
|
+
display_recursive_open_struct(io, value, indent_level + 1, recursion_limit - 1)
|
|
33
|
+
else
|
|
34
|
+
io.puts ' ' * indent_level + key.to_s + ' ' * (data_indent - key.to_s.length) + ' = ' + value.inspect
|
|
35
|
+
end
|
|
31
36
|
end
|
|
32
37
|
end
|
|
33
|
-
end
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
true
|
|
40
|
+
end
|
|
36
41
|
end
|
|
37
|
-
|
|
38
42
|
end
|
|
43
|
+
# rubocop:enable Style/StringConcatenation
|
|
44
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
|
45
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
|
46
|
+
# rubocop:enable Metrics/AbcSize
|
|
@@ -1,33 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
class RecursiveOpenStruct::DeepDup
|
|
3
|
-
def initialize(opts={})
|
|
4
|
-
@recurse_over_arrays = opts.fetch(:recurse_over_arrays, false)
|
|
5
|
-
@preserve_original_keys = opts.fetch(:preserve_original_keys, false)
|
|
6
|
-
end
|
|
1
|
+
# frozen_string_literal: true
|
|
7
2
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
class RecursiveOpenStruct < OpenStruct
|
|
4
|
+
class DeepDup
|
|
5
|
+
def initialize(opts = {})
|
|
6
|
+
@recurse_over_arrays = opts.fetch(:recurse_over_arrays, false)
|
|
7
|
+
@preserve_original_keys = opts.fetch(:preserve_original_keys, false)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def call(obj)
|
|
11
|
+
deep_dup(obj)
|
|
12
|
+
end
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
private
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
|
17
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
|
18
|
+
def deep_dup(obj, visited = Set.new)
|
|
19
|
+
if obj.is_a?(Hash)
|
|
20
|
+
obj.each_with_object({}) do |(key, value), h|
|
|
21
|
+
h[@preserve_original_keys ? key : key.to_sym] = value_or_deep_dup(value, visited)
|
|
22
|
+
end
|
|
23
|
+
elsif obj.is_a?(Array) && @recurse_over_arrays
|
|
24
|
+
obj.each_with_object([]) do |value, arr|
|
|
25
|
+
value = value.is_a?(RecursiveOpenStruct) ? value.to_h : value
|
|
26
|
+
arr << value_or_deep_dup(value, visited)
|
|
27
|
+
end
|
|
28
|
+
else
|
|
29
|
+
obj
|
|
23
30
|
end
|
|
24
|
-
else
|
|
25
|
-
obj
|
|
26
31
|
end
|
|
27
|
-
|
|
32
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
|
33
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
|
28
34
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
def value_or_deep_dup(value, visited)
|
|
36
|
+
obj_id = value.object_id
|
|
37
|
+
visited.include?(obj_id) ? value : deep_dup(value, visited << obj_id)
|
|
38
|
+
end
|
|
32
39
|
end
|
|
33
40
|
end
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
class RecursiveOpenStruct < OpenStruct
|
|
4
|
+
# Replaces +OpenStruct#dig+ to properly support treating nested values as
|
|
5
|
+
# RecursiveOpenStructs instead of returning the nested Hashes.
|
|
6
|
+
#
|
|
7
|
+
# This module is only added in when +OpenStruct#dig+ exists (the OpenStruct
|
|
8
|
+
# included in older Ruby versions didn't implement it)
|
|
2
9
|
module Dig
|
|
3
|
-
|
|
4
|
-
# Replaces +OpenStruct#dig+ to properly support treating nested values as
|
|
5
|
-
# RecursiveOpenStructs instead of returning the nested Hashes.
|
|
6
10
|
def dig(name, *names)
|
|
7
11
|
begin
|
|
8
12
|
name = name.to_sym
|
|
@@ -12,7 +16,7 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
12
16
|
|
|
13
17
|
name_val = self[name]
|
|
14
18
|
|
|
15
|
-
if names.
|
|
19
|
+
if !names.empty? && name_val.respond_to?(:dig)
|
|
16
20
|
name_val.dig(*names)
|
|
17
21
|
else
|
|
18
22
|
name_val
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'ostruct'
|
|
2
4
|
require 'recursive_open_struct/version'
|
|
3
5
|
|
|
@@ -12,6 +14,7 @@ require 'recursive_open_struct/dig'
|
|
|
12
14
|
# TODO: `#*_as_a_hash` deprecated. Nested hashes can be referenced using
|
|
13
15
|
# `#to_h`.
|
|
14
16
|
|
|
17
|
+
# rubocop:disable Metrics/ClassLength
|
|
15
18
|
class RecursiveOpenStruct < OpenStruct
|
|
16
19
|
include Dig if OpenStruct.public_instance_methods.include? :dig
|
|
17
20
|
|
|
@@ -28,7 +31,9 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
28
31
|
}
|
|
29
32
|
end
|
|
30
33
|
|
|
31
|
-
|
|
34
|
+
# rubocop:disable Lint/MissingSuper
|
|
35
|
+
# Intentionally doesn't call super and initializes +@table+ itself.
|
|
36
|
+
def initialize(hash = nil, passed_options = {})
|
|
32
37
|
hash = hash.to_h if [hash.is_a?(RecursiveOpenStruct), hash.is_a?(OpenStruct)].any?
|
|
33
38
|
hash ||= {}
|
|
34
39
|
|
|
@@ -40,6 +45,7 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
40
45
|
|
|
41
46
|
@sub_elements = {}
|
|
42
47
|
end
|
|
48
|
+
# rubocop:enable Lint/MissingSuper
|
|
43
49
|
|
|
44
50
|
def marshal_load(attributes)
|
|
45
51
|
hash, @options = attributes
|
|
@@ -69,17 +75,17 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
69
75
|
|
|
70
76
|
# TODO: deprecated, unsupported by OpenStruct. OpenStruct does not consider
|
|
71
77
|
# itself to be a "kind of" Hash.
|
|
72
|
-
|
|
78
|
+
alias to_hash to_h
|
|
73
79
|
|
|
74
80
|
# Continue supporting older rubies -- JRuby 9.1.x.x is still considered
|
|
75
81
|
# stable, but is based on Ruby
|
|
76
82
|
# 2.3.x and so uses :modifiable instead of :modifiable?. Furthermore, if
|
|
77
83
|
# :modifiable is private, then make :modifiable? private too.
|
|
78
|
-
|
|
84
|
+
unless OpenStruct.private_instance_methods.include?(:modifiable?)
|
|
79
85
|
if OpenStruct.private_instance_methods.include?(:modifiable)
|
|
80
|
-
|
|
86
|
+
alias modifiable? modifiable
|
|
81
87
|
elsif OpenStruct.public_instance_methods.include?(:modifiable)
|
|
82
|
-
|
|
88
|
+
alias modifiable? modifiable
|
|
83
89
|
private :modifiable?
|
|
84
90
|
end
|
|
85
91
|
end
|
|
@@ -89,7 +95,7 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
89
95
|
v = @table[key_name]
|
|
90
96
|
if v.is_a?(Hash)
|
|
91
97
|
@sub_elements[key_name] ||= _create_sub_element_(v, mutate_input_hash: true)
|
|
92
|
-
elsif v.is_a?(Array)
|
|
98
|
+
elsif v.is_a?(Array) && @options[:recurse_over_arrays]
|
|
93
99
|
@sub_elements[key_name] ||= recurse_over_array(v)
|
|
94
100
|
@sub_elements[key_name] = recurse_over_array(@sub_elements[key_name])
|
|
95
101
|
else
|
|
@@ -100,7 +106,7 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
100
106
|
if private_instance_methods.include?(:modifiable?) || public_instance_methods.include?(:modifiable?)
|
|
101
107
|
def []=(name, value)
|
|
102
108
|
key_name = _get_key_from_table_(name)
|
|
103
|
-
tbl = modifiable?
|
|
109
|
+
tbl = modifiable? # Ensure we are modifiable
|
|
104
110
|
@sub_elements.delete(key_name)
|
|
105
111
|
tbl[key_name] = value
|
|
106
112
|
end
|
|
@@ -120,19 +126,20 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
120
126
|
|
|
121
127
|
# Adapted implementation of method_missing to accommodate the differences
|
|
122
128
|
# between ROS and OS.
|
|
129
|
+
# rubocop:disable Metrics/AbcSize
|
|
130
|
+
# rubocop:disable Metrics/PerceivedComplexity
|
|
123
131
|
def method_missing(mid, *args)
|
|
124
132
|
len = args.length
|
|
125
133
|
if mid =~ /^(.*)=$/
|
|
126
|
-
if len != 1
|
|
127
|
-
|
|
128
|
-
end
|
|
134
|
+
raise ArgumentError, "wrong number of arguments (#{len} for 1)", caller(1) if len != 1
|
|
135
|
+
|
|
129
136
|
# self[$1.to_sym] = args[0]
|
|
130
137
|
# modifiable?[new_ostruct_member!($1.to_sym)] = args[0]
|
|
131
|
-
new_ostruct_member!(
|
|
138
|
+
new_ostruct_member!(::Regexp.last_match(1).to_sym)
|
|
132
139
|
public_send(mid, args[0])
|
|
133
|
-
elsif len
|
|
140
|
+
elsif len.zero?
|
|
134
141
|
key = mid
|
|
135
|
-
key =
|
|
142
|
+
key = ::Regexp.last_match(1) if key =~ /^(.*)_as_a_hash$/
|
|
136
143
|
if @table.key?(_get_key_from_table_(key))
|
|
137
144
|
new_ostruct_member!(key)
|
|
138
145
|
public_send(mid)
|
|
@@ -147,6 +154,8 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
147
154
|
raise err
|
|
148
155
|
end
|
|
149
156
|
end
|
|
157
|
+
# rubocop:enable Metrics/PerceivedComplexity
|
|
158
|
+
# rubocop:enable Metrics/AbcSize
|
|
150
159
|
|
|
151
160
|
def freeze
|
|
152
161
|
@table.each_key do |key|
|
|
@@ -160,7 +169,7 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
160
169
|
# 2.4.0.
|
|
161
170
|
def new_ostruct_member(name)
|
|
162
171
|
key_name = _get_key_from_table_(name)
|
|
163
|
-
unless
|
|
172
|
+
unless singleton_class.method_defined?(name.to_sym)
|
|
164
173
|
class << self; self; end.class_eval do
|
|
165
174
|
define_method(name) do
|
|
166
175
|
self[key_name]
|
|
@@ -185,7 +194,12 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
185
194
|
|
|
186
195
|
def delete_field(name)
|
|
187
196
|
sym = _get_key_from_table_(name)
|
|
188
|
-
|
|
197
|
+
begin
|
|
198
|
+
singleton_class.__send__(:remove_method, sym, "#{sym}=")
|
|
199
|
+
rescue StandardError
|
|
200
|
+
# ignore if methods not yet generated.
|
|
201
|
+
NoMethodError
|
|
202
|
+
end
|
|
189
203
|
@sub_elements.delete(sym)
|
|
190
204
|
@table.delete(sym)
|
|
191
205
|
end
|
|
@@ -203,8 +217,9 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
203
217
|
end
|
|
204
218
|
|
|
205
219
|
def _get_key_from_table_(name)
|
|
206
|
-
return name.to_s if @table.
|
|
207
|
-
return name.to_sym if @table.
|
|
220
|
+
return name.to_s if @table.key?(name.to_s)
|
|
221
|
+
return name.to_sym if @table.key?(name.to_sym)
|
|
222
|
+
|
|
208
223
|
name
|
|
209
224
|
end
|
|
210
225
|
|
|
@@ -222,5 +237,5 @@ class RecursiveOpenStruct < OpenStruct
|
|
|
222
237
|
end
|
|
223
238
|
array
|
|
224
239
|
end
|
|
225
|
-
|
|
226
240
|
end
|
|
241
|
+
# rubocop:enable Metrics/ClassLength
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: recursive-open-struct
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- William (B.J.) Snow Orvis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-04-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '2'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '
|
|
26
|
+
version: '2'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: pry
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -42,44 +42,86 @@ dependencies:
|
|
|
42
42
|
name: rake
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- - "
|
|
45
|
+
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
47
|
+
version: '13.4'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- - "
|
|
52
|
+
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
54
|
+
version: '13.4'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rdoc
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- - "
|
|
59
|
+
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '
|
|
61
|
+
version: '7.2'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- - "
|
|
66
|
+
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '
|
|
68
|
+
version: '7.2'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rspec
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '3.
|
|
75
|
+
version: '3.13'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - "~>"
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '3.13'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rubocop
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - "~>"
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '1.86'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - "~>"
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '1.86'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: rubocop-rake
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - "~>"
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0.7'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - "~>"
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0.7'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: rubocop-rspec
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - "~>"
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '3.9'
|
|
76
118
|
type: :development
|
|
77
119
|
prerelease: false
|
|
78
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
121
|
requirements:
|
|
80
122
|
- - "~>"
|
|
81
123
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '3.
|
|
124
|
+
version: '3.9'
|
|
83
125
|
- !ruby/object:Gem::Dependency
|
|
84
126
|
name: simplecov
|
|
85
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -127,34 +169,16 @@ extra_rdoc_files:
|
|
|
127
169
|
- LICENSE.txt
|
|
128
170
|
- README.md
|
|
129
171
|
files:
|
|
130
|
-
- ".document"
|
|
131
|
-
- ".github/workflows/ruby.yml"
|
|
132
|
-
- ".gitignore"
|
|
133
|
-
- ".rspec"
|
|
134
|
-
- ".travis.yml"
|
|
135
172
|
- AUTHORS.txt
|
|
136
173
|
- CHANGELOG.md
|
|
137
|
-
- CONTRIBUTING.md
|
|
138
|
-
- Gemfile
|
|
139
174
|
- LICENSE.txt
|
|
140
175
|
- README.md
|
|
141
|
-
- Rakefile
|
|
142
176
|
- lib/recursive-open-struct.rb
|
|
143
177
|
- lib/recursive_open_struct.rb
|
|
144
178
|
- lib/recursive_open_struct/debug_inspect.rb
|
|
145
179
|
- lib/recursive_open_struct/deep_dup.rb
|
|
146
180
|
- lib/recursive_open_struct/dig.rb
|
|
147
181
|
- lib/recursive_open_struct/version.rb
|
|
148
|
-
- recursive-open-struct.gemspec
|
|
149
|
-
- spec/recursive_open_struct/debug_inspect_spec.rb
|
|
150
|
-
- spec/recursive_open_struct/indifferent_access_spec.rb
|
|
151
|
-
- spec/recursive_open_struct/open_struct_behavior_spec.rb
|
|
152
|
-
- spec/recursive_open_struct/ostruct_2_0_0_spec.rb
|
|
153
|
-
- spec/recursive_open_struct/ostruct_2_3_0_spec.rb
|
|
154
|
-
- spec/recursive_open_struct/recursion_and_subclassing_spec.rb
|
|
155
|
-
- spec/recursive_open_struct/recursion_spec.rb
|
|
156
|
-
- spec/recursive_open_struct/wrapping_spec.rb
|
|
157
|
-
- spec/spec_helper.rb
|
|
158
182
|
homepage: https://github.com/aetherknight/recursive-open-struct
|
|
159
183
|
licenses:
|
|
160
184
|
- MIT
|
|
@@ -178,13 +202,4 @@ rubygems_version: 3.5.9
|
|
|
178
202
|
signing_key:
|
|
179
203
|
specification_version: 4
|
|
180
204
|
summary: OpenStruct subclass that returns nested hash attributes as RecursiveOpenStructs
|
|
181
|
-
test_files:
|
|
182
|
-
- spec/recursive_open_struct/debug_inspect_spec.rb
|
|
183
|
-
- spec/recursive_open_struct/indifferent_access_spec.rb
|
|
184
|
-
- spec/recursive_open_struct/open_struct_behavior_spec.rb
|
|
185
|
-
- spec/recursive_open_struct/ostruct_2_0_0_spec.rb
|
|
186
|
-
- spec/recursive_open_struct/ostruct_2_3_0_spec.rb
|
|
187
|
-
- spec/recursive_open_struct/recursion_and_subclassing_spec.rb
|
|
188
|
-
- spec/recursive_open_struct/recursion_spec.rb
|
|
189
|
-
- spec/recursive_open_struct/wrapping_spec.rb
|
|
190
|
-
- spec/spec_helper.rb
|
|
205
|
+
test_files: []
|
data/.document
DELETED
data/.github/workflows/ruby.yml
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
-
# They are provided by a third-party and are governed by
|
|
3
|
-
# separate terms of service, privacy policy, and support
|
|
4
|
-
# documentation.
|
|
5
|
-
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
-
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
-
|
|
8
|
-
name: Ruby
|
|
9
|
-
|
|
10
|
-
on:
|
|
11
|
-
push:
|
|
12
|
-
branches: [ "main" ]
|
|
13
|
-
pull_request:
|
|
14
|
-
branches: [ "main" ]
|
|
15
|
-
|
|
16
|
-
permissions:
|
|
17
|
-
contents: read
|
|
18
|
-
|
|
19
|
-
jobs:
|
|
20
|
-
test:
|
|
21
|
-
|
|
22
|
-
runs-on: ubuntu-latest
|
|
23
|
-
strategy:
|
|
24
|
-
fail-fast: false
|
|
25
|
-
matrix:
|
|
26
|
-
ruby-version: ['3.2', '3.3', '3.4', head, jruby, jruby-head]
|
|
27
|
-
|
|
28
|
-
steps:
|
|
29
|
-
- uses: actions/checkout@v4
|
|
30
|
-
- name: Set up Ruby
|
|
31
|
-
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
|
32
|
-
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
|
33
|
-
# uses: ruby/setup-ruby@v1
|
|
34
|
-
uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # 1.268.0
|
|
35
|
-
with:
|
|
36
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
37
|
-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
38
|
-
- name: Run tests
|
|
39
|
-
run: bundle exec rake
|
data/.gitignore
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# rcov generated
|
|
2
|
-
coverage
|
|
3
|
-
|
|
4
|
-
# rdoc generated
|
|
5
|
-
rdoc
|
|
6
|
-
|
|
7
|
-
# yard generated
|
|
8
|
-
doc
|
|
9
|
-
.yardoc
|
|
10
|
-
|
|
11
|
-
# bundler
|
|
12
|
-
.bundle
|
|
13
|
-
|
|
14
|
-
# jeweler generated
|
|
15
|
-
pkg
|
|
16
|
-
|
|
17
|
-
# Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
|
|
18
|
-
#
|
|
19
|
-
# * Create a file at ~/.gitignore
|
|
20
|
-
# * Include files you want ignored
|
|
21
|
-
# * Run: git config --global core.excludesfile ~/.gitignore
|
|
22
|
-
#
|
|
23
|
-
# After doing this, these files will be ignored in all your git projects,
|
|
24
|
-
# saving you from having to 'pollute' every project you touch with them
|
|
25
|
-
#
|
|
26
|
-
# Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
|
|
27
|
-
#
|
|
28
|
-
# For MacOS:
|
|
29
|
-
#
|
|
30
|
-
.DS_Store
|
|
31
|
-
|
|
32
|
-
# For TextMate
|
|
33
|
-
*.tmproj
|
|
34
|
-
tmtags
|
|
35
|
-
|
|
36
|
-
# For emacs:
|
|
37
|
-
*~
|
|
38
|
-
\#*
|
|
39
|
-
.\#*
|
|
40
|
-
|
|
41
|
-
# For vim:
|
|
42
|
-
*.swp
|
|
43
|
-
|
|
44
|
-
# For redcar:
|
|
45
|
-
#.redcar
|
|
46
|
-
|
|
47
|
-
# For rubinius:
|
|
48
|
-
#*.rbc
|
|
49
|
-
|
|
50
|
-
Gemfile.lock
|
|
51
|
-
|
|
52
|
-
.ruby-version
|
data/.rspec
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--color
|