openstruct-from_hash.rb 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -0
- data/CHANGELOG.md +4 -0
- data/lib/openstruct-from_hash.rb +1 -1
- data/openstruct-from_hash.gemspec +1 -0
- data/spec/openstruct-from_hash_spec.rb +2 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1df958035a0039f20294b2927abea0fe6bcd97221aa298cea4bc0ba58275cc1
|
4
|
+
data.tar.gz: 3ba5a76dd8042c4ca4a2b046f4fa26ff95f67d858b5484a900036859d7eb1eb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caaf6dc132c4310f284ced94d57adb1be51cc3e2dca7ca455743f11a646989dc0ec12d77e67cc55cfa6de2ff4465d9ae6ad3dc5cbc5a372fbcd3b4059ae85417
|
7
|
+
data.tar.gz: 741e018feaf43640547219f9ffcfc97a9b00506422ee8531b9ae3bf567f95f0a11e5de59e13012e73fd9d7640978ef24afbdff4cca014466854ab8ce0423adff
|
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
data/lib/openstruct-from_hash.rb
CHANGED
@@ -8,5 +8,6 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.summary = 'openstruct-from_hash.rb implements OpenStruct.from_hash(), a recursive constructor for the OpenStruct class that is apart of Ruby\'s standard library.'
|
9
9
|
spec.description = spec.summary
|
10
10
|
spec.homepage = 'https://github.com/r-obert/openstruct-from_hash.rb'
|
11
|
+
spec.required_ruby_version = '~> 2.1'
|
11
12
|
spec.licenses = ['MIT']
|
12
13
|
end
|
@@ -8,7 +8,7 @@ RSpec.describe OpenStruct::FromHash do
|
|
8
8
|
OpenStruct.from_hash(
|
9
9
|
str: 'foo',
|
10
10
|
ary: [{ number: 20 }, BasicObject.new],
|
11
|
-
person: { name: 'John', friends: [{ name: 'Amy' }] }
|
11
|
+
person: { name: 'John', friends: [{ name: 'Amy', friends: [ {name: 'Tim'} ]}] }
|
12
12
|
)
|
13
13
|
end
|
14
14
|
|
@@ -19,6 +19,7 @@ RSpec.describe OpenStruct::FromHash do
|
|
19
19
|
expect(BasicObject === ostruct.ary[1]).to be(true)
|
20
20
|
expect(ostruct.person.name).to eq('John')
|
21
21
|
expect(ostruct.person.friends[0].name).to eq('Amy')
|
22
|
+
expect(ostruct.person.friends[0].friends[0].name).to eq('Tim')
|
22
23
|
end
|
23
24
|
end
|
24
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstruct-from_hash.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Gleeson
|
@@ -19,6 +19,7 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- ".gitignore"
|
21
21
|
- ".pryrc"
|
22
|
+
- ".travis.yml"
|
22
23
|
- CHANGELOG.md
|
23
24
|
- Gemfile
|
24
25
|
- LICENSE.txt
|
@@ -37,9 +38,9 @@ require_paths:
|
|
37
38
|
- lib
|
38
39
|
required_ruby_version: !ruby/object:Gem::Requirement
|
39
40
|
requirements:
|
40
|
-
- - "
|
41
|
+
- - "~>"
|
41
42
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
43
|
+
version: '2.1'
|
43
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
44
45
|
requirements:
|
45
46
|
- - ">="
|