fixtury 2.3.0 → 2.4.0
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 +4 -4
- data/lib/fixtury/store.rb +8 -0
- data/lib/fixtury/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47493728e203e13c16dacc33af325c367fa183be008544e54cfc58ce73f525ed
|
|
4
|
+
data.tar.gz: 539a8a009ad4f2a27ab3a16eaa3ad52e13b6be0729c114ed856c507c7b9371a5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb1b7bbe553e67c1d01be204ca397fc5917a4cc1f0f58288625fe6b0a29ccf96ad3b49e627d4529ddf2524c7cb57614aa61af874e690827064cdd9554782cd72
|
|
7
|
+
data.tar.gz: 5d8e5a4387e05b6fc0c78ca97ba79958dbb4500daa5c6a9dd039dca0d05bce8bf6bc80917b3988af94fb8fcf91e509459bd45b9b5c86e8aed4386c8636adea8c
|
data/lib/fixtury/store.rb
CHANGED
|
@@ -121,6 +121,11 @@ module Fixtury
|
|
|
121
121
|
pathname = dfn.pathname
|
|
122
122
|
isokey = dfn.isolation_key
|
|
123
123
|
|
|
124
|
+
# Capture whether a real reference existed before isolation-dependency loading,
|
|
125
|
+
# so we can distinguish a true cache hit from a reference materialized by the
|
|
126
|
+
# recursive isolation build path.
|
|
127
|
+
pre_existing_real_ref = !!references[pathname]&.real?
|
|
128
|
+
|
|
124
129
|
# Ensure that if we're part of an isolation group, we load all the fixtures in that group.
|
|
125
130
|
maybe_load_isolation_dependencies(isokey)
|
|
126
131
|
|
|
@@ -138,6 +143,7 @@ module Fixtury
|
|
|
138
143
|
log("refreshing #{pathname}", level: LOG_LEVEL_DEBUG)
|
|
139
144
|
clear_reference(pathname)
|
|
140
145
|
ref = nil
|
|
146
|
+
pre_existing_real_ref = false
|
|
141
147
|
end
|
|
142
148
|
|
|
143
149
|
value = nil
|
|
@@ -149,6 +155,8 @@ module Fixtury
|
|
|
149
155
|
clear_reference(pathname)
|
|
150
156
|
ref = nil
|
|
151
157
|
log("missing #{pathname}", level: LOG_LEVEL_ALL)
|
|
158
|
+
elsif pre_existing_real_ref
|
|
159
|
+
::Fixtury.hooks.call(:load, dfn, value) { value }
|
|
152
160
|
end
|
|
153
161
|
end
|
|
154
162
|
|
data/lib/fixtury/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fixtury
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Nelson
|
|
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
185
185
|
- !ruby/object:Gem::Version
|
|
186
186
|
version: '0'
|
|
187
187
|
requirements: []
|
|
188
|
-
rubygems_version: 4.0.
|
|
188
|
+
rubygems_version: 4.0.10
|
|
189
189
|
specification_version: 4
|
|
190
190
|
summary: Treat fixtures like factories and factories like fixtures
|
|
191
191
|
test_files: []
|