sus 0.24.6 → 0.26.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
- checksums.yaml.gz.sig +0 -0
- data/lib/sus/assertions.rb +1 -1
- data/lib/sus/be.rb +1 -1
- data/lib/sus/be_within.rb +1 -1
- data/lib/sus/expect.rb +1 -1
- data/lib/sus/have.rb +1 -1
- data/lib/sus/have_duration.rb +1 -1
- data/lib/sus/it.rb +7 -1
- data/lib/sus/output/backtrace.rb +1 -1
- data/lib/sus/output/messages.rb +7 -3
- data/lib/sus/output/text.rb +1 -1
- data/lib/sus/raise_exception.rb +2 -2
- data/lib/sus/receive.rb +1 -1
- data/lib/sus/version.rb +2 -2
- data/license.md +1 -1
- data/readme.md +1 -1
- data.tar.gz.sig +0 -0
- metadata +6 -4
- 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: 731c63c1341c591c641c0c9a8d05d387ca0258adef3aeb002b4509e5d6672e69
|
4
|
+
data.tar.gz: 4f0b0fd74e104f5fb82f48df8e7c8011dea872b07f5ccd7b314908b401f68597
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fae67b800bfc9f5c05581c2e3a4e3c45d5fe13f9403acc12c771441a2f333d775e8305c20449d14669bce69cdc0b234325e9adacb33ea9847c117ba750fe22c
|
7
|
+
data.tar.gz: edb022b7eef312a19c03452fee531ace489038d9320b6e68a13146a482136fb70f00273f3f43206d8b5f78e752c52ec46645eeab407ed815169290189a28230b
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/sus/assertions.rb
CHANGED
data/lib/sus/be.rb
CHANGED
data/lib/sus/be_within.rb
CHANGED
data/lib/sus/expect.rb
CHANGED
data/lib/sus/have.rb
CHANGED
data/lib/sus/have_duration.rb
CHANGED
data/lib/sus/it.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2021-
|
4
|
+
# Copyright, 2021-2024, by Samuel Williams.
|
5
5
|
|
6
6
|
require_relative 'context'
|
7
7
|
|
@@ -89,5 +89,11 @@ module Sus
|
|
89
89
|
skip "Ruby #{version} is not supported, but running #{RUBY_VERSION}!"
|
90
90
|
end
|
91
91
|
end
|
92
|
+
|
93
|
+
def skip_if_ruby_platform(pattern)
|
94
|
+
if match = RUBY_PLATFORM.match(pattern)
|
95
|
+
skip "Ruby platform #{match} is not supported!"
|
96
|
+
end
|
97
|
+
end
|
92
98
|
end
|
93
99
|
end
|
data/lib/sus/output/backtrace.rb
CHANGED
data/lib/sus/output/messages.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2023, by Samuel Williams.
|
4
|
+
# Copyright, 2023-2024, by Samuel Williams.
|
5
5
|
|
6
6
|
module Sus
|
7
7
|
# Styled output output.
|
@@ -54,16 +54,20 @@ module Sus
|
|
54
54
|
[:errored, "⚠ "]
|
55
55
|
end
|
56
56
|
|
57
|
-
def error(error, identity)
|
57
|
+
def error(error, identity, prefix = error_prefix)
|
58
58
|
lines = error.message.split(/\r?\n/)
|
59
59
|
|
60
|
-
self.puts(:indent, *
|
60
|
+
self.puts(:indent, *prefix, error.class, ": ", lines.shift)
|
61
61
|
|
62
62
|
lines.each do |line|
|
63
63
|
self.puts(:indent, line)
|
64
64
|
end
|
65
65
|
|
66
66
|
self.write(Output::Backtrace.for(error, identity))
|
67
|
+
|
68
|
+
if cause = error.cause
|
69
|
+
self.error(cause, identity, ["Caused by ", :errored])
|
70
|
+
end
|
67
71
|
end
|
68
72
|
|
69
73
|
def inform_prefix
|
data/lib/sus/output/text.rb
CHANGED
data/lib/sus/raise_exception.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2021-
|
4
|
+
# Copyright, 2021-2024, by Samuel Williams.
|
5
5
|
|
6
6
|
module Sus
|
7
7
|
class RaiseException
|
8
|
-
def initialize(exception_class =
|
8
|
+
def initialize(exception_class = Exception, message: nil)
|
9
9
|
@exception_class = exception_class
|
10
10
|
@message = message
|
11
11
|
@predicate = nil
|
data/lib/sus/receive.rb
CHANGED
data/lib/sus/version.rb
CHANGED
data/license.md
CHANGED
data/readme.md
CHANGED
@@ -52,4 +52,4 @@ This project uses the [Developer Certificate of Origin](https://developercertifi
|
|
52
52
|
|
53
53
|
### Contributor Covenant
|
54
54
|
|
55
|
-
This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
|
55
|
+
This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
|
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.
|
4
|
+
version: 0.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
38
38
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
39
39
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
40
40
|
-----END CERTIFICATE-----
|
41
|
-
date: 2024-
|
41
|
+
date: 2024-06-23 00:00:00.000000000 Z
|
42
42
|
dependencies: []
|
43
43
|
description:
|
44
44
|
email:
|
@@ -105,7 +105,9 @@ homepage: https://github.com/ioquatix/sus
|
|
105
105
|
licenses:
|
106
106
|
- MIT
|
107
107
|
metadata:
|
108
|
+
documentation_uri: https://ioquatix.github.io/sus/
|
108
109
|
funding_uri: https://github.com/sponsors/ioquatix/
|
110
|
+
source_code_uri: https://github.com/ioquatix/sus.git
|
109
111
|
post_install_message:
|
110
112
|
rdoc_options: []
|
111
113
|
require_paths:
|
@@ -114,14 +116,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
116
|
requirements:
|
115
117
|
- - ">="
|
116
118
|
- !ruby/object:Gem::Version
|
117
|
-
version: '3.
|
119
|
+
version: '3.1'
|
118
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
121
|
requirements:
|
120
122
|
- - ">="
|
121
123
|
- !ruby/object:Gem::Version
|
122
124
|
version: '0'
|
123
125
|
requirements: []
|
124
|
-
rubygems_version: 3.5.
|
126
|
+
rubygems_version: 3.5.11
|
125
127
|
signing_key:
|
126
128
|
specification_version: 4
|
127
129
|
summary: A fast and scalable test runner.
|
metadata.gz.sig
CHANGED
Binary file
|