recursive-open-struct 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98947e3672ac602b5065c7cbd9db4712ad76f37f1bd93e7fe5b26bd03d45b868
4
- data.tar.gz: 91d09d9bc788f331837fb9edfd5e1d006088becd07770ecea52a5b1dee2f659a
3
+ metadata.gz: f4e75292eb58976521bfcaaa65dfa6c9dff1a8e530458ea9ae4e66d9d5efb607
4
+ data.tar.gz: b141bb94fcd5af8bb63d96527f496c6b95f6e4947f4563fb27867fad52d53b73
5
5
  SHA512:
6
- metadata.gz: e37aaa9409d7cb1bf0b8999603bbaeb7345a2496784127ef2612b49b765a9a745b29fb4d6dcb3f5aee8045a89a2b05370611486db48be3e630cf8f22cfccfca6
7
- data.tar.gz: 4d8cc8cd0140f749f7a924c06469a4d1cd1709fa3464cc72cec250c296e29cd1936fbc1dd6e9852c4fb904f6e0c1e65847b9ba311f48d41d75de12097ac2a409
6
+ metadata.gz: ac8fc6e33ce22b9d7c456ea8d3bfa434e2f29fa270a2f55259eb76d0fc14fe6c22924632d6ff03b90d7e7ace5ed04d8b7d4f0848e1e008ed468130d49170135b
7
+ data.tar.gz: 6034ad571f93328692f92ec5ab91ee3e69883ea11c394e3a40136be1fe9121ac1476bdd6f35ac168885f9e7b37d346059a7742132c65e01c7cffb367643cbe03
data/AUTHORS.txt CHANGED
@@ -9,6 +9,7 @@ Recursive-open-struct was written by these fine people:
9
9
  * Federico Aloi <federico.aloi@gmail.com>
10
10
  * fervic <roberto@runawaybit.com>
11
11
  * Hartley McGuire <skipkayhil@gmail.com>
12
+ * Hermann Mayer <hermann.mayer92@gmail.com>
12
13
  * Igor Victor <gogainda@yandex.ru>
13
14
  * Ilya Umanets <ilya.umanets@sabiogroup.com>
14
15
  * Jean Boussier <jean.boussier@gmail.com>
@@ -21,11 +22,13 @@ Recursive-open-struct was written by these fine people:
21
22
  * Pedro Sena <sena.pedro@gmail.com>
22
23
  * Peter Yeremenko <peter.yeremenko@gmail.com>
23
24
  * Pirate Praveen <praveen@debian.org>
24
- * Richard Degenne <richard.degenne+github@gmail.com>
25
25
  * Richard Degenne <richard.degenne@gmail.com>
26
+ * Richard Degenne <richard.degenne+github@gmail.com>
26
27
  * Sebastian Gaul <sebastian@mgvmedia.com>
27
28
  * Thiago Guimaraes <thiagogsr@gmail.com>
28
29
  * Tom Chapin <tchapin@gmail.com>
29
30
  * Victor Guzman <victor.guzman@runawaybit.com>
30
31
  * William (B.J.) Snow Orvis <aetherknight@gmail.com>
32
+ * Wynn (B.J.) Snow Orvis <aetherkn@aedifice.org>
31
33
  * Wynn (B.J.) Snow Orvis <aetherknight@gmail.com>
34
+ * Yuri Zubov <yuri.zubov@cleverlabs.io>
data/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
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
+
17
+ 2.1.0 / 2025/12/05
18
+ ==================
19
+
20
+ * [#80](https://github.com/aetherknight/recursive-open-struct/pull/80): Hermann
21
+ Mayer: Added a safety guard for double wrapping.
22
+ * FIX: Avoid loading `ostruct` when processing the gemspec, since it is a
23
+ dependency and it may not be installed/available yet.
24
+
1
25
  2.0.0 / 2024/10/03
2
26
  ==================
3
27
 
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'recursive_open_struct'
@@ -1,38 +1,46 @@
1
- module RecursiveOpenStruct::DebugInspect
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
- def display_recursive_open_struct(io, ostrct_or_hash, indent_level, recursion_limit)
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
- if recursion_limit <= 0 then
9
- # protection against recursive structure (like in the tests)
10
- io.puts ' '*indent_level + '(recursion limit reached)'
11
- else
12
- #puts ostrct_or_hash.inspect
13
- if ostrct_or_hash.is_a?(self.class) then
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
- # We'll display the key values like this : key = value
18
- # to align display, we look for the maximum key length of the data that will be displayed
19
- # (everything except hashes)
20
- data_indent = ostrct_or_hash \
21
- .reject { |k, v| v.is_a?(self.class) || v.is_a?(Hash) } \
22
- .max {|a,b| a[0].to_s.length <=> b[0].to_s.length}[0].to_s.length
23
- # puts "max length = #{data_indent}"
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
- ostrct_or_hash.each do |key, value|
26
- if (value.is_a?(self.class) || value.is_a?(Hash)) then
27
- io.puts ' '*indent_level + key.to_s + '.'
28
- display_recursive_open_struct(io, value, indent_level + 1, recursion_limit - 1)
29
- else
30
- io.puts ' '*indent_level + key.to_s + ' '*(data_indent - key.to_s.length) + ' = ' + value.inspect
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
- true
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
- require 'set'
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
- def call(obj)
9
- deep_dup(obj)
10
- end
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
- private
14
+ private
13
15
 
14
- def deep_dup(obj, visited=Set.new)
15
- if obj.is_a?(Hash)
16
- obj.each_with_object({}) do |(key, value), h|
17
- h[@preserve_original_keys ? key : key.to_sym] = value_or_deep_dup(value, visited)
18
- end
19
- elsif obj.is_a?(Array) && @recurse_over_arrays
20
- obj.each_with_object([]) do |value, arr|
21
- value = value.is_a?(RecursiveOpenStruct) ? value.to_h : value
22
- arr << value_or_deep_dup(value, visited)
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
- end
32
+ # rubocop:enable Metrics/PerceivedComplexity
33
+ # rubocop:enable Metrics/CyclomaticComplexity
28
34
 
29
- def value_or_deep_dup(value, visited)
30
- obj_id = value.object_id
31
- visited.include?(obj_id) ? value : deep_dup(value, visited << obj_id)
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.length > 0 && name_val.respond_to?(:dig)
19
+ if !names.empty? && name_val.respond_to?(:dig)
16
20
  name_val.dig(*names)
17
21
  else
18
22
  name_val
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Necessary since the top-level class/module is a class that inherits from
2
4
  # OpenStruct.
3
5
  require 'ostruct'
4
6
 
5
7
  class RecursiveOpenStruct < OpenStruct
6
- VERSION = "2.0.0"
8
+ VERSION = '2.1.1'
7
9
  end
@@ -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,10 @@ class RecursiveOpenStruct < OpenStruct
28
31
  }
29
32
  end
30
33
 
31
- def initialize(hash=nil, passed_options={})
34
+ # rubocop:disable Lint/MissingSuper
35
+ # Intentionally doesn't call super and initializes +@table+ itself.
36
+ def initialize(hash = nil, passed_options = {})
37
+ hash = hash.to_h if [hash.is_a?(RecursiveOpenStruct), hash.is_a?(OpenStruct)].any?
32
38
  hash ||= {}
33
39
 
34
40
  @options = self.class.default_options.merge!(passed_options).freeze
@@ -39,6 +45,7 @@ class RecursiveOpenStruct < OpenStruct
39
45
 
40
46
  @sub_elements = {}
41
47
  end
48
+ # rubocop:enable Lint/MissingSuper
42
49
 
43
50
  def marshal_load(attributes)
44
51
  hash, @options = attributes
@@ -68,17 +75,17 @@ class RecursiveOpenStruct < OpenStruct
68
75
 
69
76
  # TODO: deprecated, unsupported by OpenStruct. OpenStruct does not consider
70
77
  # itself to be a "kind of" Hash.
71
- alias_method :to_hash, :to_h
78
+ alias to_hash to_h
72
79
 
73
80
  # Continue supporting older rubies -- JRuby 9.1.x.x is still considered
74
81
  # stable, but is based on Ruby
75
82
  # 2.3.x and so uses :modifiable instead of :modifiable?. Furthermore, if
76
83
  # :modifiable is private, then make :modifiable? private too.
77
- if !OpenStruct.private_instance_methods.include?(:modifiable?)
84
+ unless OpenStruct.private_instance_methods.include?(:modifiable?)
78
85
  if OpenStruct.private_instance_methods.include?(:modifiable)
79
- alias_method :modifiable?, :modifiable
86
+ alias modifiable? modifiable
80
87
  elsif OpenStruct.public_instance_methods.include?(:modifiable)
81
- alias_method :modifiable?, :modifiable
88
+ alias modifiable? modifiable
82
89
  private :modifiable?
83
90
  end
84
91
  end
@@ -88,7 +95,7 @@ class RecursiveOpenStruct < OpenStruct
88
95
  v = @table[key_name]
89
96
  if v.is_a?(Hash)
90
97
  @sub_elements[key_name] ||= _create_sub_element_(v, mutate_input_hash: true)
91
- elsif v.is_a?(Array) and @options[:recurse_over_arrays]
98
+ elsif v.is_a?(Array) && @options[:recurse_over_arrays]
92
99
  @sub_elements[key_name] ||= recurse_over_array(v)
93
100
  @sub_elements[key_name] = recurse_over_array(@sub_elements[key_name])
94
101
  else
@@ -99,7 +106,7 @@ class RecursiveOpenStruct < OpenStruct
99
106
  if private_instance_methods.include?(:modifiable?) || public_instance_methods.include?(:modifiable?)
100
107
  def []=(name, value)
101
108
  key_name = _get_key_from_table_(name)
102
- tbl = modifiable? # Ensure we are modifiable
109
+ tbl = modifiable? # Ensure we are modifiable
103
110
  @sub_elements.delete(key_name)
104
111
  tbl[key_name] = value
105
112
  end
@@ -119,19 +126,20 @@ class RecursiveOpenStruct < OpenStruct
119
126
 
120
127
  # Adapted implementation of method_missing to accommodate the differences
121
128
  # between ROS and OS.
129
+ # rubocop:disable Metrics/AbcSize
130
+ # rubocop:disable Metrics/PerceivedComplexity
122
131
  def method_missing(mid, *args)
123
132
  len = args.length
124
133
  if mid =~ /^(.*)=$/
125
- if len != 1
126
- raise ArgumentError, "wrong number of arguments (#{len} for 1)", caller(1)
127
- end
134
+ raise ArgumentError, "wrong number of arguments (#{len} for 1)", caller(1) if len != 1
135
+
128
136
  # self[$1.to_sym] = args[0]
129
137
  # modifiable?[new_ostruct_member!($1.to_sym)] = args[0]
130
- new_ostruct_member!($1.to_sym)
138
+ new_ostruct_member!(::Regexp.last_match(1).to_sym)
131
139
  public_send(mid, args[0])
132
- elsif len == 0
140
+ elsif len.zero?
133
141
  key = mid
134
- key = $1 if key =~ /^(.*)_as_a_hash$/
142
+ key = ::Regexp.last_match(1) if key =~ /^(.*)_as_a_hash$/
135
143
  if @table.key?(_get_key_from_table_(key))
136
144
  new_ostruct_member!(key)
137
145
  public_send(mid)
@@ -146,6 +154,8 @@ class RecursiveOpenStruct < OpenStruct
146
154
  raise err
147
155
  end
148
156
  end
157
+ # rubocop:enable Metrics/PerceivedComplexity
158
+ # rubocop:enable Metrics/AbcSize
149
159
 
150
160
  def freeze
151
161
  @table.each_key do |key|
@@ -159,7 +169,7 @@ class RecursiveOpenStruct < OpenStruct
159
169
  # 2.4.0.
160
170
  def new_ostruct_member(name)
161
171
  key_name = _get_key_from_table_(name)
162
- unless self.singleton_class.method_defined?(name.to_sym)
172
+ unless singleton_class.method_defined?(name.to_sym)
163
173
  class << self; self; end.class_eval do
164
174
  define_method(name) do
165
175
  self[key_name]
@@ -184,7 +194,12 @@ class RecursiveOpenStruct < OpenStruct
184
194
 
185
195
  def delete_field(name)
186
196
  sym = _get_key_from_table_(name)
187
- singleton_class.__send__(:remove_method, sym, "#{sym}=") rescue NoMethodError # ignore if methods not yet generated.
197
+ begin
198
+ singleton_class.__send__(:remove_method, sym, "#{sym}=")
199
+ rescue StandardError
200
+ # ignore if methods not yet generated.
201
+ NoMethodError
202
+ end
188
203
  @sub_elements.delete(sym)
189
204
  @table.delete(sym)
190
205
  end
@@ -202,8 +217,9 @@ class RecursiveOpenStruct < OpenStruct
202
217
  end
203
218
 
204
219
  def _get_key_from_table_(name)
205
- return name.to_s if @table.has_key?(name.to_s)
206
- return name.to_sym if @table.has_key?(name.to_sym)
220
+ return name.to_s if @table.key?(name.to_s)
221
+ return name.to_sym if @table.key?(name.to_sym)
222
+
207
223
  name
208
224
  end
209
225
 
@@ -221,5 +237,5 @@ class RecursiveOpenStruct < OpenStruct
221
237
  end
222
238
  array
223
239
  end
224
-
225
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.0.0
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: 2024-10-04 00:00:00.000000000 Z
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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.2'
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.2'
124
+ version: '3.9'
83
125
  - !ruby/object:Gem::Dependency
84
126
  name: simplecov
85
127
  requirement: !ruby/object:Gem::Requirement
@@ -127,33 +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/spec_helper.rb
157
182
  homepage: https://github.com/aetherknight/recursive-open-struct
158
183
  licenses:
159
184
  - MIT
@@ -177,12 +202,4 @@ rubygems_version: 3.5.9
177
202
  signing_key:
178
203
  specification_version: 4
179
204
  summary: OpenStruct subclass that returns nested hash attributes as RecursiveOpenStructs
180
- test_files:
181
- - spec/recursive_open_struct/debug_inspect_spec.rb
182
- - spec/recursive_open_struct/indifferent_access_spec.rb
183
- - spec/recursive_open_struct/open_struct_behavior_spec.rb
184
- - spec/recursive_open_struct/ostruct_2_0_0_spec.rb
185
- - spec/recursive_open_struct/ostruct_2_3_0_spec.rb
186
- - spec/recursive_open_struct/recursion_and_subclassing_spec.rb
187
- - spec/recursive_open_struct/recursion_spec.rb
188
- - spec/spec_helper.rb
205
+ test_files: []
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
@@ -1,38 +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
- matrix:
25
- ruby-version: ['3.1', '3.2', '3.3', head, jruby, jruby-head]
26
-
27
- steps:
28
- - uses: actions/checkout@v4
29
- - name: Set up Ruby
30
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
31
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
32
- # uses: ruby/setup-ruby@v1
33
- uses: ruby/setup-ruby@943103cae7d3f1bb1e4951d5fcc7928b40e4b742 # 1.177.1
34
- with:
35
- ruby-version: ${{ matrix.ruby-version }}
36
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
37
- - name: Run tests
38
- 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