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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/sus/file.rb +30 -0
- data/lib/sus/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 102f27942c58c7a3da4728700344ade9803cb4efb4e9d3b2860c7b442ea73d62
|
4
|
+
data.tar.gz: bbda385d1fbbe48ff8f2f38b990659f8577e5a28726ca0296c976f4ec60289dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|