Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ GEM
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.12.0)
json (2.12.2)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
logger (1.7.0)
Expand Down Expand Up @@ -65,33 +65,34 @@ GEM
io-console (~> 0.5)
require-hooks (0.2.2)
rexml (3.4.1)
rubocop (1.75.6)
rubocop (1.76.1)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.44.0, < 2.0)
rubocop-ast (>= 1.45.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.44.1)
rubocop-ast (1.45.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-shopify (2.17.0)
rubocop-shopify (2.17.1)
rubocop (~> 1.62)
rubocop-sorbet (0.10.0)
rubocop (>= 1)
rubocop-sorbet (0.10.2)
lint_roller
rubocop (>= 1.75.2)
ruby-progressbar (1.13.0)
sorbet (0.5.12152)
sorbet-static (= 0.5.12152)
sorbet-runtime (0.5.12152)
sorbet-static (0.5.12152-universal-darwin)
sorbet-static (0.5.12152-x86_64-linux)
sorbet-static-and-runtime (0.5.12152)
sorbet (= 0.5.12152)
sorbet-runtime (= 0.5.12152)
sorbet (0.5.12163)
sorbet-static (= 0.5.12163)
sorbet-runtime (0.5.12163)
sorbet-static (0.5.12163-universal-darwin)
sorbet-static (0.5.12163-x86_64-linux)
sorbet-static-and-runtime (0.5.12163)
sorbet (= 0.5.12163)
sorbet-runtime (= 0.5.12163)
stringio (3.1.7)
tapioca (0.17.2)
benchmark
Expand Down
4 changes: 2 additions & 2 deletions lib/spoom/cli/srb/sigs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class Module; include T::Sig; end

# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `#{spec.name}` gem.
# Please instead update this file by running `spoom srb sigs export`.
# Please instead update this file by running `bundle exec spoom srb sigs export`.
RB

output_path ||= "rbi/#{spec.name}.rbi"
Expand All @@ -169,7 +169,7 @@ class Module; include T::Sig; end
say_error(<<~ERR, status: "\nError")
The RBI file at `#{output_path}` is not up to date

Please run `spoom srb sigs export` to update it.
Please run `bundle exec spoom srb sigs export` to update it.
ERR
exit(1)
end
Expand Down
2 changes: 1 addition & 1 deletion rbi/spoom.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `spoom` gem.
# Please instead update this file by running `spoom srb sigs export`.
# Please instead update this file by running `bundle exec spoom srb sigs export`.

module Spoom
class << self
Expand Down
2 changes: 1 addition & 1 deletion sorbet/rbi/gems/rbi@0.3.6.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions test/spoom/cli/srb/sigs_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def foo; end

# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `foo` gem.
# Please instead update this file by running `spoom srb sigs export`.
# Please instead update this file by running `bundle exec spoom srb sigs export`.

class Foo
sig { void }
Expand All @@ -402,7 +402,7 @@ def foo; end

# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `foo` gem.
# Please instead update this file by running `spoom srb sigs export`.
# Please instead update this file by running `bundle exec spoom srb sigs export`.

class Foo
sig { void }
Expand All @@ -429,7 +429,7 @@ def foo; end

Error: The RBI file at `rbi/foo.rbi` is not up to date

Please run `spoom srb sigs export` to update it.
Please run `bundle exec spoom srb sigs export` to update it.
ERR

# Original RBI file is not modified
Expand All @@ -453,7 +453,7 @@ def foo; end

# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `foo` gem.
# Please instead update this file by running `spoom srb sigs export`.
# Please instead update this file by running `bundle exec spoom srb sigs export`.

class Foo
sig { void }
Expand Down
16 changes: 8 additions & 8 deletions test/spoom/model/builder_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ module M2
],
model.symbols.values
.flat_map(&:definitions)
.filter { |d| d.is_a?(Namespace) }
.grep(Namespace)
.map do |d|
"#{d.full_name}: #{T.cast(d, Namespace).mixins.map { |m| "#{class_name(m)}(#{m.name})" }.join(", ")}"
end,
Expand Down Expand Up @@ -162,7 +162,7 @@ module M
["A", "M::B", "M::C", "C::D", "C::M::E", "F", "G::H", "C::M::I"],
model.symbols.values
.flat_map(&:definitions)
.filter { |d| d.is_a?(Constant) }
.grep(Constant)
.map(&:full_name),
)
end
Expand All @@ -189,7 +189,7 @@ def self.m6; end
["m1", "m2", "C1::m3", "C1::m4", "C1::m5", "C1::m6"],
model.symbols.values
.flat_map(&:definitions)
.filter { |d| d.is_a?(Method) }
.grep(Method)
.map(&:full_name),
)
end
Expand Down Expand Up @@ -234,7 +234,7 @@ class C1
],
model.symbols.values
.flat_map(&:definitions)
.filter { |d| d.is_a?(Attr) }
.grep(Attr)
.map { |d| "#{class_name(d)}(#{d.full_name})" },
)
end
Expand Down Expand Up @@ -303,7 +303,7 @@ def p3; end
],
model.symbols.values
.flat_map(&:definitions)
.filter { |s| s.is_a?(Namespace) }
.grep(Namespace)
.map { |d| "#{d.full_name}: #{T.cast(d, Namespace).children.map(&:full_name).join(", ")}" }
.uniq,
)
Expand Down Expand Up @@ -352,7 +352,7 @@ def m7; end
],
model.symbols.values
.flat_map(&:definitions)
.filter { |d| d.is_a?(Method) }
.grep(Method)
.map { |d| "#{d.full_name}: #{T.cast(d, Method).visibility.serialize}" },
)
end
Expand Down Expand Up @@ -389,7 +389,7 @@ def m6; end
],
model.symbols.values
.flat_map(&:definitions)
.filter { |d| d.is_a?(Method) }
.grep(Method)
.map { |d| "#{d.full_name}: #{T.cast(d, Method).visibility.serialize}" },
)
end
Expand All @@ -416,7 +416,7 @@ class C1
],
model.symbols.values
.flat_map(&:definitions)
.filter { |d| d.is_a?(Property) }
.grep(Property)
.map { |d| "#{d.full_name}: #{T.cast(d, Property).sigs.map(&:string).join(", ")}" },
)
end
Expand Down