stable 1.6.0 → 1.7.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/stable/spec.rb +2 -5
- 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: 705f529d889248982d60df5c8257a80ddca578714403e68b8a60f7f88478223a
|
4
|
+
data.tar.gz: e8ace2f93edb08e1981750332c6034408a9d12cc08e2b7a0c1b07b64ca032496
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f51fb0d25f5b0318a8a5759d0849b16d93bd8187bf5ddd97fa2aad4a584e3a18c1f5e24374d164d8f07ad03edc79a4127341bf47099c600544fed0bffb866671
|
7
|
+
data.tar.gz: da63baa93a76c20c46b51ed5c9fff23671797a46b698d7b277e8db5dafa03c924afe5f32f296051755738613d4c25d8e8dfd35af6b6c951327580eddb10e2296
|
data/lib/stable/spec.rb
CHANGED
@@ -8,15 +8,14 @@ module Stable
|
|
8
8
|
# outputs. it's a self-contained, serializable representation of a method's
|
9
9
|
# behavior at a specific point in time.
|
10
10
|
class Spec
|
11
|
-
attr_reader :class_name, :method_name, :args, :result, :error, :
|
11
|
+
attr_reader :class_name, :method_name, :args, :result, :error, :actual_result, :actual_error, :status, :uuid, :signature
|
12
12
|
|
13
|
-
def initialize(class_name:, method_name:, args:, result: nil, error: nil,
|
13
|
+
def initialize(class_name:, method_name:, args:, result: nil, error: nil, uuid: SecureRandom.uuid)
|
14
14
|
@class_name = class_name
|
15
15
|
@method_name = method_name
|
16
16
|
@args = args
|
17
17
|
@result = result
|
18
18
|
@error = error
|
19
|
-
@timestamp = timestamp
|
20
19
|
@status = :pending
|
21
20
|
@uuid = uuid
|
22
21
|
@signature = Digest::SHA256.hexdigest("#{class_name}##{method_name}:#{args.to_json}")
|
@@ -89,7 +88,6 @@ module Stable
|
|
89
88
|
args: args,
|
90
89
|
result: result,
|
91
90
|
error: error,
|
92
|
-
timestamp: timestamp,
|
93
91
|
uuid: uuid,
|
94
92
|
signature: signature
|
95
93
|
}.compact.to_json
|
@@ -103,7 +101,6 @@ module Stable
|
|
103
101
|
args: data['args'],
|
104
102
|
result: data['result'],
|
105
103
|
error: data['error'],
|
106
|
-
timestamp: data['timestamp'],
|
107
104
|
uuid: data['uuid']
|
108
105
|
)
|
109
106
|
end
|