structure 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/structure/double.rb +8 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 823aad004c9d12efcd46068c366ea7b50bc1ba63
4
- data.tar.gz: 7b6c6e8140da79339101ed1974a075fee8a04113
3
+ metadata.gz: 3fb544bc3e97d170691465e39a8d28ea680632c7
4
+ data.tar.gz: 34683dd3f6c1693e6c8e7c379d0433153a4ed326
5
5
  SHA512:
6
- metadata.gz: 77b205fa19ebed7e7a2b85981f5536024632ee7544555b5e84c067704338519c3b57e5a72c47e590cb5c33a489146540ade0239af0f7bbf0e0386f3520f14479
7
- data.tar.gz: 1fd8b8777da2398ccdd9558ba469ee4c35b937a017ed24b87f9f9b82769e7c6111005b9a29a6cc5af1ddec6ea0213ba878bf06eeb6b21cce64c7b44bfd5daf29
6
+ metadata.gz: 2df2844425af4ac85b2b7a011d570fedba08fa5aa60abcfa5e3f07b82c4f7f90a3ee1977838619e9c6b8ec667e69f38ac021fe774b79ecb01f59e591fcf5ce48
7
+ data.tar.gz: 05aee48f02e8c9a0c6c63324ea81f1b8a6247b9eb8cde7b88ec847420c4e2cee60dbc183133fd0168066a2bfbaa3f1e5cbb81a6fba336114e313bb3a5ee64afc
@@ -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
- value.freeze unless value.is_a?(Structure)
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.2
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-05-09 00:00:00.000000000 Z
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.8
83
+ rubygems_version: 2.6.11
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Parse data into value objects