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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8afcb532ebe21d444e89baf763a76b20cf4ab19ad1bf51d45bfbd29042f3ec16
4
- data.tar.gz: 5f77a3a44acf2cd3a2888f38e67963b22866c5c81a44a628be1c28128d128812
3
+ metadata.gz: 2616136d45efa56080f52cc1e50c83234aef62ea9d17d3c710fdbda46640a4ab
4
+ data.tar.gz: 6662a50c7491c23c48b17835b0ab12ceeed09fa58fc9c450d7a0371f2e492154
5
5
  SHA512:
6
- metadata.gz: f383e130f4d8bef5d42f9de29db7890f585c8116f3f6ea093cb83fc3c8b29b608ee82b16e881130527adedaf36761e216985d8b13208abac93bfef74739d53c7
7
- data.tar.gz: 2b96b3b9473ad470033138e8f201a6fc5cdc893c2724fa4e0de1a0c7e820af93256d91569fe67f2a36dc66191f0956cf5ba45c11394e6d7778d015ee2633e7cb
6
+ metadata.gz: 768fac163259ffd9b3c81707f76293da2a5df147639558257a8703824c7605d30761668b670cf105639542f75b6e8f77b9b2b7dd741a9bc0460727c5e6b20d03
7
+ data.tar.gz: ffa8cee897239bedb5d1d0bbb19b57cd931c74aee55921e301c92cf557e2e9816c9705ef5d78ea1d4c84b91e55dff4eeac3c8b1a012688c47dcf8e159500cd56
@@ -22,7 +22,9 @@ module Slayer
22
22
  end
23
23
 
24
24
  def err!(value: nil, status: :default, message: nil)
25
- warn '[DEPRECATION] `err!` is deprecated. Please use `return err` instead.'
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
- warn '[DEPRECATION] `flunk!` is deprecated. Please use `return err` instead.'
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
@@ -1,3 +1,3 @@
1
1
  module Slayer
2
- VERSION = '0.5.2'
2
+ VERSION = '0.5.3'
3
3
  end
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.2
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-09 00:00:00.000000000 Z
12
+ date: 2023-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: virtus