recursive-open-struct 1.3.0 → 1.3.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: a83d546ac9236ddec7aea76146c3cfaeec9154e29d51eb64bb776c466f46d64d
4
- data.tar.gz: c2d441baa55eb614a00371510f2471b464ce330b747b2e5348f6a67dfdab3910
3
+ metadata.gz: '0020068d7158163ebaa61a88a20513fda9662cabbb36227b9516c4c3579b579d'
4
+ data.tar.gz: 95da83b2e949d013183b4f7715ca0820e71e12cebb6a91bd095cbef8c739013c
5
5
  SHA512:
6
- metadata.gz: 4845a659ae543e5b6674376624d12181741d21cfdeb92ff2f4cdcd2537d9977c0ce273a0ae683a7304da25552350187df31675b0e75d0a84ed0e820b5a4e8438
7
- data.tar.gz: a9395fd868f4cddf829d3a76c39a3f071b548502f05c127e96dbedfc630443ef378ed7ade87ad6b5f7e5f8f49d898e81eb261b804c20f727ab6f13629d49ffe1
6
+ metadata.gz: c1a8203c90c1cda06131dd1bd342d928458af25d8a66880c80b9db1ebe5abbf411792b8377f73558e13f1815d8a2e6fb43b7b270cbd21d9202c8dedc9b3cc107
7
+ data.tar.gz: c44fdc3e770d7f3be3ad5348174b62d36fe38c245516943195127152a549437fc26bb7a23047d79e3d71a08d12fdeebeb4bf12efd1b759172fedfde03625ecf1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ 1.3.1 / 2024/10/03
2
+ ==================
3
+
4
+ * FIX for
5
+ [#79](https://github.com/aetherknight/recursive-open-struct/issues/79):
6
+ Revert #72's change to marshalling and dumping since it is an API-breaking
7
+ change. It will be re-added in a new major version after releasing a fix.
8
+
1
9
  1.3.0 / 2024/10/01
2
10
  ==================
3
11
 
@@ -3,5 +3,5 @@
3
3
  require 'ostruct'
4
4
 
5
5
  class RecursiveOpenStruct < OpenStruct
6
- VERSION = "1.3.0"
6
+ VERSION = "1.3.1"
7
7
  end
@@ -40,16 +40,6 @@ class RecursiveOpenStruct < OpenStruct
40
40
  @sub_elements = {}
41
41
  end
42
42
 
43
- def marshal_load(attributes)
44
- hash, @options = attributes
45
- @deep_dup = DeepDup.new(@options)
46
- @sub_elements = {}
47
- super(hash)
48
- end
49
-
50
- def marshal_dump
51
- [super, @options]
52
- end
53
43
 
54
44
  if OpenStruct.public_instance_methods.include?(:initialize_copy)
55
45
  def initialize_copy(orig)
@@ -37,14 +37,6 @@ describe RecursiveOpenStruct do
37
37
  expect(ros.blah.changed).to eql 'backing'
38
38
  end
39
39
 
40
- it "handles being dump then loaded by Marshal" do
41
- foo_struct = [RecursiveOpenStruct.new]
42
- bar_struct = RecursiveOpenStruct.new(foo: foo_struct)
43
- serialized = Marshal.dump(bar_struct)
44
-
45
- expect(Marshal.load(serialized).foo).to eq(foo_struct)
46
- end
47
-
48
40
  describe "handling loops in the original Hashes" do
49
41
  let(:h1) { { :a => 'a'} }
50
42
  let(:h2) { { :a => 'b', :h1 => h1 } }
@@ -190,17 +182,6 @@ describe RecursiveOpenStruct do
190
182
  let(:blah_list) { [ { :foo => '1' }, { :foo => '2' }, 'baz' ] }
191
183
  let(:h) { { :blah => blah_list } }
192
184
 
193
- context "when dump and loaded by Marshal" do
194
- let(:test) { RecursiveOpenStruct.new(h, :recurse_over_arrays => true) }
195
- subject { Marshal.load(Marshal.dump(test))}
196
-
197
- it { expect(subject.blah.length).to eq 3 }
198
- it { expect(subject.blah[0].foo).to eq '1' }
199
- it { expect(subject.blah[1].foo).to eq '2' }
200
- it { expect(subject.blah_as_a_hash).to eq blah_list }
201
- it { expect(subject.blah[2]).to eq 'baz' }
202
- end
203
-
204
185
  context "when recursing over arrays is enabled" do
205
186
  subject { RecursiveOpenStruct.new(h, :recurse_over_arrays => true) }
206
187
 
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: 1.3.0
4
+ version: 1.3.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-02 00:00:00.000000000 Z
11
+ date: 2024-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler