varar-core 0.6.1 → 0.8.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.
data/lib/varar/core.rb CHANGED
@@ -4,7 +4,7 @@ module Varar
4
4
  # The pure functional core: parse, match, plan, execute, diffs, drift, and
5
5
  # the conformance projections. No filesystem, network, globals, or time.
6
6
  module Core
7
- VERSION = '0.6.1'
7
+ VERSION = '0.8.0'
8
8
  end
9
9
  end
10
10
 
@@ -21,10 +21,11 @@ require 'varar/core/diagnostics'
21
21
  require 'varar/core/cell_diff'
22
22
  require 'varar/core/matcher'
23
23
  require 'varar/core/plan'
24
- require 'varar/core/deep_freeze'
25
24
  require 'varar/core/doc_string_diff'
26
25
  require 'varar/core/param_diff'
27
26
  require 'varar/core/failure_anchor'
27
+ require 'varar/core/result'
28
+ require 'varar/core/failure'
28
29
  require 'varar/core/execute'
29
30
  require 'varar/core/hash'
30
31
  require 'varar/core/drift'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: varar-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aslak Hellesøy
@@ -24,7 +24,7 @@ dependencies:
24
24
  - !ruby/object:Gem::Version
25
25
  version: 20.0.0
26
26
  description: The pure functional pipeline (parse, match, plan, execute, drift) behind
27
- Vár.
27
+ Varar.
28
28
  email:
29
29
  - aslak@oselvar.com
30
30
  executables: []
@@ -36,11 +36,11 @@ files:
36
36
  - lib/varar/core/canonical_json.rb
37
37
  - lib/varar/core/cell_diff.rb
38
38
  - lib/varar/core/conformance.rb
39
- - lib/varar/core/deep_freeze.rb
40
39
  - lib/varar/core/diagnostics.rb
41
40
  - lib/varar/core/doc_string_diff.rb
42
41
  - lib/varar/core/drift.rb
43
42
  - lib/varar/core/execute.rb
43
+ - lib/varar/core/failure.rb
44
44
  - lib/varar/core/failure_anchor.rb
45
45
  - lib/varar/core/hash.rb
46
46
  - lib/varar/core/matcher.rb
@@ -48,6 +48,7 @@ files:
48
48
  - lib/varar/core/parse.rb
49
49
  - lib/varar/core/plan.rb
50
50
  - lib/varar/core/registry.rb
51
+ - lib/varar/core/result.rb
51
52
  - lib/varar/core/scanner.rb
52
53
  - lib/varar/core/sentences.rb
53
54
  - lib/varar/core/span.rb
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Varar
4
- module Core
5
- # Recursively freeze plain Hash/Array so handler code mutating state raises
6
- # FrozenError. Other objects (class instances, primitives, nil) pass
7
- # through. Assumes acyclic input. Port of deep-freeze.ts.
8
- module DeepFreeze
9
- module_function
10
-
11
- def deep_freeze(value)
12
- case value
13
- when Hash
14
- value.each_value { |v| deep_freeze(v) }
15
- value.freeze
16
- when Array
17
- value.each { |v| deep_freeze(v) }
18
- value.freeze
19
- else
20
- value
21
- end
22
- end
23
- end
24
- end
25
- end