spoom 1.4.1 → 1.5.0
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/lib/spoom/cli/srb/bump.rb +1 -1
- data/lib/spoom/context/bundle.rb +2 -2
- data/lib/spoom/coverage.rb +2 -2
- data/lib/spoom/deadcode/plugins/minitest.rb +9 -17
- data/lib/spoom/deadcode/plugins/ruby.rb +3 -0
- data/lib/spoom/sorbet/metrics.rb +1 -1
- data/lib/spoom/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff274fd4bbf10a58317e281a8e570908fc9827ff74799cb2380d3b90f032240e
|
4
|
+
data.tar.gz: 16d95b8b1311eade324cbd6086b7f4fd2a30a760478582571cc6f88768a593d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90b22051252521cf38c3ed26a4e728526e57e190f0f1cd8aca1f2574f9f6219f608f28905ab4fb6dca1d54e04834182e470f9da779d664f205d269fb6ac4c0e4
|
7
|
+
data.tar.gz: 3aa88be0f3edb8f2cc32d89e76ff83833f295204d3739424c6ea35dbe48db4df41a325771f840451b6bea1ed5e329ee2efaefd2c503a76ee483590f751a3017a
|
data/lib/spoom/cli/srb/bump.rb
CHANGED
@@ -186,7 +186,7 @@ module Spoom
|
|
186
186
|
if dry && command
|
187
187
|
say("\nRun `#{command}` to bump #{files_count > 1 ? "them" : "it"}")
|
188
188
|
elsif dry
|
189
|
-
say("\nRun `spoom bump --from #{from} --to #{to}` locally then `commit the changes` and `push them`")
|
189
|
+
say("\nRun `spoom srb bump --from #{from} --to #{to}` locally then `commit the changes` and `push them`")
|
190
190
|
end
|
191
191
|
end
|
192
192
|
|
data/lib/spoom/context/bundle.rb
CHANGED
@@ -58,9 +58,9 @@ module Spoom
|
|
58
58
|
# Get `gem` version from the `Gemfile.lock` content
|
59
59
|
#
|
60
60
|
# Returns `nil` if `gem` cannot be found in the Gemfile.
|
61
|
-
sig { params(gem: String).returns(T.nilable(
|
61
|
+
sig { params(gem: String).returns(T.nilable(Gem::Version)) }
|
62
62
|
def gem_version_from_gemfile_lock(gem)
|
63
|
-
gemfile_lock_specs[gem]&.version
|
63
|
+
gemfile_lock_specs[gem]&.version
|
64
64
|
end
|
65
65
|
end
|
66
66
|
end
|
data/lib/spoom/coverage.rb
CHANGED
@@ -70,8 +70,8 @@ module Spoom
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
snapshot.version_static = context.gem_version_from_gemfile_lock("sorbet-static")
|
74
|
-
snapshot.version_runtime = context.gem_version_from_gemfile_lock("sorbet-runtime")
|
73
|
+
snapshot.version_static = context.gem_version_from_gemfile_lock("sorbet-static").to_s
|
74
|
+
snapshot.version_runtime = context.gem_version_from_gemfile_lock("sorbet-runtime").to_s
|
75
75
|
|
76
76
|
files = context.srb_files(with_config: new_config)
|
77
77
|
snapshot.rbi_files = files.count { |file| file.end_with?(".rbi") }
|
@@ -8,28 +8,20 @@ module Spoom
|
|
8
8
|
extend T::Sig
|
9
9
|
|
10
10
|
ignore_classes_named(/Test$/)
|
11
|
-
ignore_classes_inheriting_from("Minitest::Test")
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
"teardown",
|
21
|
-
]),
|
22
|
-
T::Set[String],
|
12
|
+
ignore_methods_named(
|
13
|
+
"after_all",
|
14
|
+
"around",
|
15
|
+
"around_all",
|
16
|
+
"before_all",
|
17
|
+
"setup",
|
18
|
+
"teardown",
|
23
19
|
)
|
24
20
|
|
25
21
|
sig { override.params(definition: Model::Method).void }
|
26
22
|
def on_define_method(definition)
|
27
|
-
|
28
|
-
|
29
|
-
owner = definition.owner
|
30
|
-
return unless owner.is_a?(Model::Class)
|
31
|
-
|
32
|
-
@index.ignore(definition) if ignored_subclass?(owner)
|
23
|
+
file = definition.location.file
|
24
|
+
@index.ignore(definition) if file.match?(%r{test/.*test\.rb$}) && definition.name.match?(/^test_/)
|
33
25
|
end
|
34
26
|
|
35
27
|
sig { override.params(send: Send).void }
|
@@ -34,6 +34,9 @@ module Spoom
|
|
34
34
|
if last_arg.is_a?(Prism::SymbolNode) || last_arg.is_a?(Prism::StringNode)
|
35
35
|
@index.reference_method(last_arg.unescaped, send.location)
|
36
36
|
end
|
37
|
+
when "method"
|
38
|
+
arg = send.args.first
|
39
|
+
@index.reference_method(arg.unescaped, send.location) if arg.is_a?(Prism::SymbolNode)
|
37
40
|
end
|
38
41
|
end
|
39
42
|
|
data/lib/spoom/sorbet/metrics.rb
CHANGED
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.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Terrasa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -233,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
233
233
|
- !ruby/object:Gem::Version
|
234
234
|
version: '0'
|
235
235
|
requirements: []
|
236
|
-
rubygems_version: 3.5.
|
236
|
+
rubygems_version: 3.5.18
|
237
237
|
signing_key:
|
238
238
|
specification_version: 4
|
239
239
|
summary: Useful tools for Sorbet enthusiasts.
|