slayer 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slayer/command.rb +3 -1
- data/lib/slayer/compat/compat_040.rb +9 -7
- data/lib/slayer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2616136d45efa56080f52cc1e50c83234aef62ea9d17d3c710fdbda46640a4ab
|
4
|
+
data.tar.gz: 6662a50c7491c23c48b17835b0ab12ceeed09fa58fc9c450d7a0371f2e492154
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 768fac163259ffd9b3c81707f76293da2a5df147639558257a8703824c7605d30761668b670cf105639542f75b6e8f77b9b2b7dd741a9bc0460727c5e6b20d03
|
7
|
+
data.tar.gz: ffa8cee897239bedb5d1d0bbb19b57cd931c74aee55921e301c92cf557e2e9816c9705ef5d78ea1d4c84b91e55dff4eeac3c8b1a012688c47dcf8e159500cd56
|
data/lib/slayer/command.rb
CHANGED
@@ -22,7 +22,9 @@ module Slayer
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def err!(value: nil, status: :default, message: nil)
|
25
|
-
|
25
|
+
unless ENV['SUPPRESS_SLAYER_WARNINGS']
|
26
|
+
warn '[DEPRECATION] `err!` is deprecated. Please use `return err` instead.'
|
27
|
+
end
|
26
28
|
raise ResultFailureError, err(value: value, status: status, message: message)
|
27
29
|
end
|
28
30
|
|
@@ -4,17 +4,19 @@ module Slayer
|
|
4
4
|
class Command
|
5
5
|
class << self
|
6
6
|
def pass(value: nil, status: :default, message: nil)
|
7
|
-
warn '[DEPRECATION] `pass` is deprecated. Please use `ok` instead.'
|
7
|
+
warn '[DEPRECATION] `pass` is deprecated. Please use `ok` instead.' unless ENV['SUPPRESS_SLAYER_WARNINGS']
|
8
8
|
ok(value: value, status: status, message: message)
|
9
9
|
end
|
10
10
|
|
11
11
|
def flunk(value: nil, status: :default, message: nil)
|
12
|
-
warn '[DEPRECATION] `flunk` is deprecated. Please use `err` instead.'
|
12
|
+
warn '[DEPRECATION] `flunk` is deprecated. Please use `err` instead.' unless ENV['SUPPRESS_SLAYER_WARNINGS']
|
13
13
|
err(value: value, status: status, message: message)
|
14
14
|
end
|
15
15
|
|
16
16
|
def flunk!(value: nil, status: :default, message: nil)
|
17
|
-
|
17
|
+
unless ENV['SUPPRESS_SLAYER_WARNINGS']
|
18
|
+
warn '[DEPRECATION] `flunk!` is deprecated. Please use `return err` instead.'
|
19
|
+
end
|
18
20
|
err!(value: value, status: status, message: message)
|
19
21
|
end
|
20
22
|
end
|
@@ -26,24 +28,24 @@ module Slayer
|
|
26
28
|
|
27
29
|
class Result
|
28
30
|
def success?
|
29
|
-
warn '[DEPRECATION] `success?` is deprecated. Please use `ok?` instead.'
|
31
|
+
warn '[DEPRECATION] `success?` is deprecated. Please use `ok?` instead.' unless ENV['SUPPRESS_SLAYER_WARNINGS']
|
30
32
|
ok?
|
31
33
|
end
|
32
34
|
|
33
35
|
def failure?
|
34
|
-
warn '[DEPRECATION] `failure?` is deprecated. Please use `err?` instead.'
|
36
|
+
warn '[DEPRECATION] `failure?` is deprecated. Please use `err?` instead.' unless ENV['SUPPRESS_SLAYER_WARNINGS']
|
35
37
|
err?
|
36
38
|
end
|
37
39
|
end
|
38
40
|
|
39
41
|
class ResultMatcher
|
40
42
|
def pass(...)
|
41
|
-
warn '[DEPRECATION] `pass` is deprecated. Please use `ok` instead.'
|
43
|
+
warn '[DEPRECATION] `pass` is deprecated. Please use `ok` instead.' unless ENV['SUPPRESS_SLAYER_WARNINGS']
|
42
44
|
ok(...)
|
43
45
|
end
|
44
46
|
|
45
47
|
def fail(...)
|
46
|
-
warn '[DEPRECATION] `fail` is deprecated. Please use `err` instead.'
|
48
|
+
warn '[DEPRECATION] `fail` is deprecated. Please use `err` instead.' unless ENV['SUPPRESS_SLAYER_WARNINGS']
|
47
49
|
err(...)
|
48
50
|
end
|
49
51
|
end
|
data/lib/slayer/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slayer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wyatt Kirby
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-02-
|
12
|
+
date: 2023-02-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: virtus
|