structure 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/structure/double.rb +8 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fb544bc3e97d170691465e39a8d28ea680632c7
|
4
|
+
data.tar.gz: 34683dd3f6c1693e6c8e7c379d0433153a4ed326
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2df2844425af4ac85b2b7a011d570fedba08fa5aa60abcfa5e3f07b82c4f7f90a3ee1977838619e9c6b8ec667e69f38ac021fe774b79ecb01f59e591fcf5ce48
|
7
|
+
data.tar.gz: 05aee48f02e8c9a0c6c63324ea81f1b8a6247b9eb8cde7b88ec847420c4e2cee60dbc183133fd0168066a2bfbaa3f1e5cbb81a6fba336114e313bb3a5ee64afc
|
data/lib/structure/double.rb
CHANGED
@@ -15,7 +15,14 @@ module Structure
|
|
15
15
|
klass.module_eval do
|
16
16
|
def initialize(data = {})
|
17
17
|
data.each do |key, value|
|
18
|
-
|
18
|
+
unless value.is_a?(Structure) ||
|
19
|
+
(
|
20
|
+
defined?(RSpec::Mocks::Double) &&
|
21
|
+
value.is_a?(RSpec::Mocks::Double)
|
22
|
+
)
|
23
|
+
value.freeze
|
24
|
+
end
|
25
|
+
|
19
26
|
instance_variable_set(:"@#{key}", value)
|
20
27
|
end
|
21
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: structure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hakan Ensari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.6.
|
83
|
+
rubygems_version: 2.6.11
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: Parse data into value objects
|