oas_core 1.4.0 → 1.4.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 +4 -4
- data/lib/oas_core/spec/hashable.rb +6 -2
- data/lib/oas_core/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2b7fff636be925e25278a987158cc802337d3e90560a958aa18aad4197f97a06
|
|
4
|
+
data.tar.gz: 011c393af762dc61e60fb6a823e625145f2a9bf1addfce5edfb9eb0a901b4b10
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3efcb0f75eb82138df3bb61b9fdccffc721744a490dd63cc18db4897ef24a84eff84169d60df774d3011ca45f5f2ef86635d3019e980d08bea61b9b5505d2c2
|
|
7
|
+
data.tar.gz: b15ff547e983d889c2d651d2367d623bef5ef0697c7288df721922c65553e16576f459739c1de2c951d9fc95db66241a506ecb975377167701fb2bb06c197d3b
|
|
@@ -31,9 +31,13 @@ module OasCore
|
|
|
31
31
|
when Array
|
|
32
32
|
obj.map { |v| hash_representation_recursive(v) }
|
|
33
33
|
when Hashable
|
|
34
|
-
obj.hash_representation
|
|
34
|
+
hash_representation_recursive(obj.hash_representation)
|
|
35
35
|
else
|
|
36
|
-
|
|
36
|
+
# Objects that serialize to a spec (e.g. MediaType) are hashed by
|
|
37
|
+
# their serialized form. Falling through to the default branch would
|
|
38
|
+
# embed their `inspect` output — memory address included — making
|
|
39
|
+
# the digest different on every run.
|
|
40
|
+
obj.respond_to?(:to_spec) ? hash_representation_recursive(obj.to_spec) : obj
|
|
37
41
|
end
|
|
38
42
|
end
|
|
39
43
|
end
|
data/lib/oas_core/version.rb
CHANGED