varar-runner 0.8.0 → 0.8.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/varar/runner/results.rb +15 -3
- data/lib/varar/runner/run.rb +2 -2
- data/lib/varar/runner.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b5851436b3132a8db0f86e7a70c593650192c6ba01bfe307a901dcafd9502c7
|
|
4
|
+
data.tar.gz: 7ef324ac2644295eebe76201fb378b1950f4845ee5552afdce20bc16ab6e8cef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b1f528bfb4259284edccd9de1f6051b20cbd0e1448e2ac47b885a099280394a8d4a13bff240f26bd898a5b1bdf696806536854193e7ac67b41fad3d70e8768a4
|
|
7
|
+
data.tar.gz: 733508b44808f138ac5122c7aa67b0bae3354e61bf56e554ca482fade299931da1589f09cb11300d02a08777f877ca610f5db422c50dc039755d738e360993bc
|
data/lib/varar/runner/results.rb
CHANGED
|
@@ -18,6 +18,8 @@ module Varar
|
|
|
18
18
|
def initialize
|
|
19
19
|
@sources = {}
|
|
20
20
|
@examples = {}
|
|
21
|
+
# Per oath: the other documents its steps were spliced in from (ADR 0016).
|
|
22
|
+
@documents = {}
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
# `<root>/.varar/<oath_path>.json` — the file the LSP watches.
|
|
@@ -47,9 +49,15 @@ module Varar
|
|
|
47
49
|
|
|
48
50
|
# Accumulates one example's outcome; the oath's file is written once its
|
|
49
51
|
# examples are in.
|
|
50
|
-
|
|
52
|
+
# `referenced_sources` carries the OTHER documents this oath's steps were
|
|
53
|
+
# spliced in from (ADR 0016), as path => source; their hashes go in the
|
|
54
|
+
# payload so a consumer can tell a stale failure from a live one.
|
|
55
|
+
def record(oath_path, source, result, referenced_sources = nil)
|
|
51
56
|
@sources[oath_path] = source
|
|
52
57
|
(@examples[oath_path] ||= []) << result
|
|
58
|
+
return if referenced_sources.nil? || referenced_sources.empty?
|
|
59
|
+
|
|
60
|
+
(@documents[oath_path] ||= {}).merge!(referenced_sources)
|
|
53
61
|
end
|
|
54
62
|
|
|
55
63
|
# Writes what has been recorded for `oath_path` and forgets it. Passing
|
|
@@ -59,11 +67,15 @@ module Varar
|
|
|
59
67
|
recorded = @examples.delete(oath_path)
|
|
60
68
|
return nil if recorded.nil? || recorded.empty?
|
|
61
69
|
|
|
70
|
+
documents = (@documents.delete(oath_path) || {}).sort.map do |path, text|
|
|
71
|
+
Core::ReferencedDocument.new(path: path, source_hash: Core::Hash32.hash_source(text))
|
|
72
|
+
end
|
|
62
73
|
self.class.write(root, Core::OathResults.new(
|
|
63
|
-
version:
|
|
74
|
+
version: 2,
|
|
64
75
|
oath_path: oath_path,
|
|
65
76
|
source_hash: Core::Hash32.hash_source(@sources[oath_path]),
|
|
66
|
-
examples: self.class.document_order(recorded)
|
|
77
|
+
examples: self.class.document_order(recorded),
|
|
78
|
+
documents: documents
|
|
67
79
|
))
|
|
68
80
|
end
|
|
69
81
|
|
data/lib/varar/runner/run.rb
CHANGED
|
@@ -19,8 +19,8 @@ module Varar
|
|
|
19
19
|
|
|
20
20
|
module_function
|
|
21
21
|
|
|
22
|
-
def plan_oath(path, source, registry)
|
|
23
|
-
Core::Plan.plan(Core::Parse.parse(path, source), registry)
|
|
22
|
+
def plan_oath(path, source, registry, workspace)
|
|
23
|
+
Core::Plan.plan(Core::Parse.parse(path, source), registry, workspace)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
# Pair each PlannedExample with its lazy run closure, in plan order.
|
data/lib/varar/runner.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: varar-runner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aslak Hellesøy
|
|
@@ -15,28 +15,28 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.8.
|
|
18
|
+
version: 0.8.1
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.8.
|
|
25
|
+
version: 0.8.1
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: varar-config
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
29
29
|
requirements:
|
|
30
30
|
- - '='
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 0.8.
|
|
32
|
+
version: 0.8.1
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - '='
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 0.8.
|
|
39
|
+
version: 0.8.1
|
|
40
40
|
description: Oath/step discovery, step loading, planning, failure rendering, and the
|
|
41
41
|
drift baseline store.
|
|
42
42
|
email:
|