rspec-sorbet 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -30
- data/lib/rspec/sorbet/doubles.rb +1 -1
- data/lib/rspec/sorbet/version.rb +1 -1
- data/nix/sources.json +4 -4
- data/nix/sources.nix +21 -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: c919fffe36f51d10375e595ccb204bc198e25cf8315e266b58ac003e5a3044e3
|
4
|
+
data.tar.gz: e9f7fd2ebc16cbfb02a35386e6e18167e4c2d7135d892818cfef0828bbac3d29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 036dc3f8f4fe03014d3fd841c3db206cb3f4d044238f995f204ea66379763e1dd4f66882fd87571eaf1fa5a473af3b4dd28cdd943d7ff1dfb902b03ef1849b86
|
7
|
+
data.tar.gz: bfaa969a76685774eedbceb4842b977a3bdb39dc48055035a93c85b53cf9a7029b9f6592722307a96d0b03ac2ff51ed0d5b406012469334eaf92c11f3bfd855c
|
data/CHANGELOG.md
CHANGED
@@ -1,57 +1,63 @@
|
|
1
|
-
|
1
|
+
# Changelog
|
2
2
|
|
3
|
-
|
3
|
+
## 1.9.1
|
4
4
|
|
5
|
-
|
5
|
+
- Support `T.nilable(T.class_of(...))` among others (thanks [@deecewan](https://github.com/deecewan))
|
6
6
|
|
7
|
-
|
7
|
+
## 1.9.0
|
8
8
|
|
9
|
-
|
9
|
+
- Allow specification of a custom validation handler (thanks [@bmalinconico](https://github.com/bmalinconico))
|
10
10
|
|
11
|
-
|
11
|
+
## 1.8.3
|
12
12
|
|
13
|
-
|
13
|
+
- Make sorbet a development dependency
|
14
14
|
|
15
|
-
|
15
|
+
## 1.8.2
|
16
16
|
|
17
|
-
|
17
|
+
- Reduce gem size by excluding RBIs from gem build
|
18
18
|
|
19
|
-
|
19
|
+
## 1.8.1
|
20
20
|
|
21
|
-
|
21
|
+
- [BUGFIX] Fix processing T.let type mismatch messages when there are digits in module name
|
22
22
|
|
23
|
-
|
23
|
+
## 1.8.0
|
24
24
|
|
25
|
-
|
25
|
+
- Fixed issues around union types referencing typed enumerables.
|
26
26
|
|
27
|
-
|
27
|
+
## 1.7.0
|
28
28
|
|
29
|
-
|
29
|
+
- Added support `T.class_of`.
|
30
30
|
|
31
|
-
|
31
|
+
## 1.6.0
|
32
32
|
|
33
|
-
|
33
|
+
- Non-verifying double support improved.
|
34
34
|
|
35
|
-
|
35
|
+
## 1.5.0
|
36
36
|
|
37
|
-
|
37
|
+
- Added support for `T.cast`.
|
38
38
|
|
39
|
-
|
40
|
-
* `RSpec::Sorbet.allow_instance_doubles!` has been renamed to `RSpec::Sorbet.allow_doubles!`, an alias remains for backwards compatibility for the time being.
|
39
|
+
## 1.4.0
|
41
40
|
|
42
|
-
|
41
|
+
- Added support for `T.let` referencing `T.nilable` types.
|
43
42
|
|
44
|
-
|
43
|
+
## 1.3.0
|
45
44
|
|
46
|
-
|
45
|
+
- Added ability to allow any kind of double (Class, Instance, Object).
|
46
|
+
- `RSpec::Sorbet.allow_instance_doubles!` has been renamed to `RSpec::Sorbet.allow_doubles!`, an alias remains for backwards compatibility for the time being.
|
47
47
|
|
48
|
-
|
48
|
+
## 1.2.1
|
49
49
|
|
50
|
-
|
50
|
+
- Fix call check when opts contains :message instead of :pretty_message.
|
51
51
|
|
52
|
-
|
52
|
+
## 1.2.0
|
53
53
|
|
54
|
-
|
54
|
+
- Added support for verifying `T::Enumerable` types.
|
55
55
|
|
56
|
-
|
57
|
-
|
56
|
+
## 1.1.0
|
57
|
+
|
58
|
+
- Add basic `instance_double` verification to help check the type of an instance double.
|
59
|
+
|
60
|
+
## 1.0.0
|
61
|
+
|
62
|
+
- Initial release
|
63
|
+
- Supports just allowing instance doubles for now
|
data/lib/rspec/sorbet/doubles.rb
CHANGED
@@ -23,7 +23,7 @@ module RSpec
|
|
23
23
|
private
|
24
24
|
|
25
25
|
INLINE_DOUBLE_REGEX =
|
26
|
-
/T.(?:let|cast): Expected type (?:T.(?<t_method>any|nilable|class_of)\()
|
26
|
+
/T.(?:let|cast): Expected type (?:T.(?<t_method>any|nilable|class_of)\()*(?<expected_types>[a-zA-Z0-9:: ,]*)(\))*, got (?:type .* with value )?#<(?<double_type>Instance|Class|Object)?Double([\(]|[ ])(?<doubled_type>[a-zA-Z0-9:: ,]*)(\))?/.freeze
|
27
27
|
|
28
28
|
|
29
29
|
def handle_call_validation_error(signature, opts)
|
data/lib/rspec/sorbet/version.rb
CHANGED
data/nix/sources.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"nixpkgs": {
|
3
|
-
"branch": "nixos-
|
3
|
+
"branch": "nixos-22.05",
|
4
4
|
"description": "Nix packages collection",
|
5
5
|
"homepage": "https://github.com/NixOS/nixpkgs",
|
6
6
|
"owner": "NixOS",
|
7
7
|
"repo": "nixpkgs",
|
8
|
-
"rev": "
|
9
|
-
"sha256": "
|
8
|
+
"rev": "1935dd8fdab8e022a9d958419663162fd840014c",
|
9
|
+
"sha256": "1z0nkqpwahlaz362lcdx5qcdvwdzr5a3bdfirjgbf9jg37rsbwl2",
|
10
10
|
"type": "tarball",
|
11
|
-
"url": "https://github.com/NixOS/nixpkgs/archive/
|
11
|
+
"url": "https://github.com/NixOS/nixpkgs/archive/1935dd8fdab8e022a9d958419663162fd840014c.tar.gz",
|
12
12
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
13
13
|
}
|
14
14
|
}
|
data/nix/sources.nix
CHANGED
@@ -31,8 +31,28 @@ let
|
|
31
31
|
if spec ? branch then "refs/heads/${spec.branch}" else
|
32
32
|
if spec ? tag then "refs/tags/${spec.tag}" else
|
33
33
|
abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!";
|
34
|
+
submodules = if spec ? submodules then spec.submodules else false;
|
35
|
+
submoduleArg =
|
36
|
+
let
|
37
|
+
nixSupportsSubmodules = builtins.compareVersions builtins.nixVersion "2.4" >= 0;
|
38
|
+
emptyArgWithWarning =
|
39
|
+
if submodules == true
|
40
|
+
then
|
41
|
+
builtins.trace
|
42
|
+
(
|
43
|
+
"The niv input \"${name}\" uses submodules "
|
44
|
+
+ "but your nix's (${builtins.nixVersion}) builtins.fetchGit "
|
45
|
+
+ "does not support them"
|
46
|
+
)
|
47
|
+
{}
|
48
|
+
else {};
|
49
|
+
in
|
50
|
+
if nixSupportsSubmodules
|
51
|
+
then { inherit submodules; }
|
52
|
+
else emptyArgWithWarning;
|
34
53
|
in
|
35
|
-
builtins.fetchGit
|
54
|
+
builtins.fetchGit
|
55
|
+
({ url = spec.repo; inherit (spec) rev; inherit ref; } // submoduleArg);
|
36
56
|
|
37
57
|
fetch_local = spec: spec.path;
|
38
58
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-sorbet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Giles
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '0'
|
145
145
|
requirements: []
|
146
|
-
rubygems_version: 3.2.
|
146
|
+
rubygems_version: 3.2.26
|
147
147
|
signing_key:
|
148
148
|
specification_version: 4
|
149
149
|
summary: A small gem consisting of helpers for using Sorbet & RSpec together.
|