sus 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a328443e5ed5bf8e59b97bfc991017fe0c46a112887b6cd179075b233675658
4
- data.tar.gz: ca7ace995a25c5e034ad27fc14a0bf1f7659a5078bdc9f9db5b904bd9bbff266
3
+ metadata.gz: 102f27942c58c7a3da4728700344ade9803cb4efb4e9d3b2860c7b442ea73d62
4
+ data.tar.gz: bbda385d1fbbe48ff8f2f38b990659f8577e5a28726ca0296c976f4ec60289dc
5
5
  SHA512:
6
- metadata.gz: 16d7f6a4d9e5840e7b0cc4b8acc9a5656b70876c5cfc2e378eb4819e26954a07aa774405b51cf863160ac17f7d19a0a2e6984b2d0fee975c254470255b9686f6
7
- data.tar.gz: 35965ea359a3f68d524fb17fe0fd69623f43c536bf8e70c4383474d11987bca4d53ac85c39a678494330603bdaa10be1ad94ba34eaae460172a760a0881b74d3
6
+ metadata.gz: f67674f93488d7d0f1eb2cfa98d098ac78047b4fc0d1a216c7781b65757a4a0b48c74fa5c7f2e5a18f6f58e07a0564bdeb7ba9b5ef1f4412bd3d51ed7196657e
7
+ data.tar.gz: bd31d9984aed574ddb68c9a4b3e7527fc6e9c05d26a0ea8dcea892ab25313d431da0b7f3e2e281c63998ed2a170e8de852143d5dd361ac9d1be61e0e0139e911
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/sus/file.rb CHANGED
@@ -33,9 +33,39 @@ module Sus
33
33
  end
34
34
  end
35
35
 
36
+ class FileLoadError
37
+ def self.build(parent, path, error)
38
+ self.new(Identity.new(path), path, error)
39
+ end
40
+
41
+ def initialize(identity, path, error)
42
+ @identity = identity
43
+ @path = path
44
+ @error = error
45
+ end
46
+
47
+ def leaf?
48
+ true
49
+ end
50
+
51
+ def print(output)
52
+ output.write("file ", :path, @identity)
53
+ end
54
+
55
+ def call(assertions)
56
+ assertions.nested(self, identity: @identity, isolated: true) do |assertions|
57
+ assertions.error!(@error)
58
+ end
59
+ end
60
+ end
61
+
62
+ private_constant :FileLoadError
63
+
36
64
  module Context
37
65
  def file(path)
38
66
  add File.build(self, path)
67
+ rescue StandardError, SyntaxError => error
68
+ add FileLoadError.build(self, path, error)
39
69
  end
40
70
  end
41
71
  end
data/lib/sus/version.rb CHANGED
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2021-2022, by Samuel Williams.
5
5
 
6
6
  module Sus
7
- VERSION = "0.17.0"
7
+ VERSION = "0.17.1"
8
8
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file