spoom 1.1.13 → 1.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spoom/cli/bump.rb +10 -0
- data/lib/spoom/cli/run.rb +7 -0
- data/lib/spoom/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a84bd540e0965d15ff7e0b44349f603a73b3975c551420cb53e1c233878eec5
|
4
|
+
data.tar.gz: fa06bea2051f57cd64b5ced219d0c6f2c4903a9d17b5ef5642e149d08350f5e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 259eaf90edc9cb6e7c5e40aee135112944258a813b88690098cf1e547f4304ef259b341e07159c7ce1bfe8f194dffe885f3db5ed4e74c39eec13351e81f0d40d
|
7
|
+
data.tar.gz: 3477a2b2647605c3884c632c4534106fe1384e33ae321dee20e61ce48a430e83ecb734ad8f9d8e7e2fb7abf39726913789e95ed0529ad9eda48b6099bb89892b
|
data/lib/spoom/cli/bump.rb
CHANGED
@@ -28,6 +28,7 @@ module Spoom
|
|
28
28
|
desc: "Command to suggest if files can be bumped"
|
29
29
|
option :count_errors, type: :boolean, default: false,
|
30
30
|
desc: "Count the number of errors if all files were bumped"
|
31
|
+
option :sorbet_options, type: :string, default: "", desc: "Pass options to Sorbet"
|
31
32
|
sig { params(directory: String).void }
|
32
33
|
def bump(directory = ".")
|
33
34
|
in_sorbet_project!
|
@@ -85,6 +86,7 @@ module Spoom
|
|
85
86
|
|
86
87
|
error_url_base = Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE
|
87
88
|
result = Sorbet.srb_tc(
|
89
|
+
*options[:sorbet_options].split(" "),
|
88
90
|
"--error-url-base=#{error_url_base}",
|
89
91
|
path: exec_path,
|
90
92
|
capture_err: true,
|
@@ -105,6 +107,14 @@ module Spoom
|
|
105
107
|
exit(files_to_bump.empty?)
|
106
108
|
end
|
107
109
|
|
110
|
+
unless result.exit_code == 100
|
111
|
+
# Sorbet will return exit code 100 if there are type checking errors.
|
112
|
+
# If Sorbet returned something else, it means it didn't terminate normally.
|
113
|
+
say_error(result.err, status: nil, nl: false)
|
114
|
+
undo_changes(files_to_bump, from)
|
115
|
+
exit(1)
|
116
|
+
end
|
117
|
+
|
108
118
|
errors = Sorbet::Errors::Parser.parse_string(result.err, error_url_base: error_url_base)
|
109
119
|
|
110
120
|
all_files = errors.flat_map do |err|
|
data/lib/spoom/cli/run.rb
CHANGED
@@ -64,6 +64,13 @@ module Spoom
|
|
64
64
|
exit(0)
|
65
65
|
end
|
66
66
|
|
67
|
+
unless result.exit_code == 100
|
68
|
+
# Sorbet will return exit code 100 if there are type checking errors.
|
69
|
+
# If Sorbet returned something else, it means it didn't terminate normally.
|
70
|
+
say_error(result.err, status: nil, nl: false)
|
71
|
+
exit(1)
|
72
|
+
end
|
73
|
+
|
67
74
|
errors = Spoom::Sorbet::Errors::Parser.parse_string(result.err, error_url_base: error_url_base)
|
68
75
|
errors_count = errors.size
|
69
76
|
|
data/lib/spoom/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spoom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Terrasa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.5.
|
75
|
+
version: 0.5.10187
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.5.
|
82
|
+
version: 0.5.10187
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sorbet-runtime
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|