sorbet_typed-short_circuit 1.0.22 → 1.0.23
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
- data/.cz.yaml +1 -1
- data/.semgrep/custom_rules.yml +9 -0
- data/.semgrepignore +7 -0
- data/{.shellcheckrc.tmp → .shellcheckrc} +0 -2
- data/CHANGELOG.md +6 -0
- data/lib/sorbet_typed/short_circuit/version.rb +1 -1
- data/lib/sorbet_typed/short_circuit.rb +6 -6
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95dacd948607d43896b52b046020d8179a348b2ab384578f7cf053927657967a
|
|
4
|
+
data.tar.gz: 49856a99c7bd895beee9352706d1324afa2fea93d321f0679abd9de7c0df38e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86fcf7ed89050a20e2182734bd537d0c93759592038c663ffe5e034d355a9d8cdca10bcf23b509261c6089862b634d02dd8de695662311c8aec188feb74fed9b
|
|
7
|
+
data.tar.gz: f88615a490722d9bbf19d3d81334d6540acbe39f15638e8f255a5b889b538c7af48efc82435e02560effef33daacb286ce67716c0b7e7f0e8da4ad18b2c0513b
|
data/.cz.yaml
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
rules:
|
|
2
|
+
- id: allowed-comment-tags
|
|
3
|
+
severity: ERROR
|
|
4
|
+
languages:
|
|
5
|
+
- none
|
|
6
|
+
message: >
|
|
7
|
+
Comments tagged with something else than `DEBT`, `HACK` or `NOTE` should be resolved before finishing a
|
|
8
|
+
feature/MR.
|
|
9
|
+
pattern-regex: '(<\!--|\/\/|#|\/\*|--)\h*\b(?!(DEBT|HACK|NOTE))[A-Z]+\b:[^:]'
|
data/.semgrepignore
ADDED
data/CHANGELOG.md
CHANGED
|
@@ -51,8 +51,8 @@ module SorbetTyped
|
|
|
51
51
|
private_constant :Errors
|
|
52
52
|
private_constant :CircuitBreaker
|
|
53
53
|
|
|
54
|
-
#
|
|
55
|
-
#
|
|
54
|
+
# NOTE: add run method on the class
|
|
55
|
+
# NOTE: add run method on the class returning the short circuit instead if the success/signal
|
|
56
56
|
|
|
57
57
|
sig do
|
|
58
58
|
type_parameters(:Payload).
|
|
@@ -63,7 +63,7 @@ module SorbetTyped
|
|
|
63
63
|
Signals::Shorted[T.type_parameter(:Payload)].new(payload)
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
#
|
|
66
|
+
# DEBT: cache last signal/payload/success values and provide readers
|
|
67
67
|
|
|
68
68
|
private
|
|
69
69
|
|
|
@@ -128,9 +128,9 @@ module SorbetTyped
|
|
|
128
128
|
end
|
|
129
129
|
end
|
|
130
130
|
|
|
131
|
-
#
|
|
131
|
+
# NOTE: add run method with void return
|
|
132
132
|
|
|
133
|
-
#
|
|
133
|
+
# NOTE: add run method throwing away the success value (when it's not needed),
|
|
134
134
|
# but keeping the signal (or only return the signal payload)
|
|
135
135
|
|
|
136
136
|
sig { returns(T::Boolean) }
|
|
@@ -138,7 +138,7 @@ module SorbetTyped
|
|
|
138
138
|
short_circuited
|
|
139
139
|
end
|
|
140
140
|
|
|
141
|
-
#
|
|
141
|
+
# NOTE: add #success? method
|
|
142
142
|
|
|
143
143
|
private
|
|
144
144
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sorbet_typed-short_circuit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.23
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Kramer
|
|
@@ -18,7 +18,7 @@ dependencies:
|
|
|
18
18
|
version: '0.6'
|
|
19
19
|
- - "<="
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 0.6.
|
|
21
|
+
version: 0.6.12869
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -28,7 +28,7 @@ dependencies:
|
|
|
28
28
|
version: '0.6'
|
|
29
29
|
- - "<="
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
|
-
version: 0.6.
|
|
31
|
+
version: 0.6.12869
|
|
32
32
|
description: ''
|
|
33
33
|
email:
|
|
34
34
|
- mail@richardkramer.de
|
|
@@ -38,7 +38,9 @@ extra_rdoc_files: []
|
|
|
38
38
|
files:
|
|
39
39
|
- ".cz.yaml"
|
|
40
40
|
- ".pre-commit-config.yaml"
|
|
41
|
-
- ".
|
|
41
|
+
- ".semgrep/custom_rules.yml"
|
|
42
|
+
- ".semgrepignore"
|
|
43
|
+
- ".shellcheckrc"
|
|
42
44
|
- CHANGELOG.md
|
|
43
45
|
- COPYING
|
|
44
46
|
- README.md
|