Skip to content
Open
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
2 changes: 1 addition & 1 deletion lib/ruby_lsp/addon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def load_addons(global_state, outgoing_queue, include_project_addons: true)
# Require all add-ons entry points, which should be placed under
# `some_gem/lib/ruby_lsp/your_gem_name/addon.rb` or in the workspace under
# `your_project/ruby_lsp/project_name/addon.rb`
addon_files = Gem.find_files("ruby_lsp/**/addon.rb")
addon_files = Gem.find_latest_files("ruby_lsp/**/addon.rb")

if include_project_addons
bundle_path = begin
Expand Down
2 changes: 1 addition & 1 deletion test/addon_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def version
})

expected_addon_path = File.join(dir, "vendor", "bundle", "rubocop-1.73.0", "lib", "ruby_lsp", "rubocop", "addon.rb")
Gem.stubs(:find_files).with("ruby_lsp/**/addon.rb").returns([expected_addon_path])
Gem.stubs(:find_latest_files).with("ruby_lsp/**/addon.rb").returns([expected_addon_path])
Bundler.stubs(:bundle_path).returns(Pathname.new(File.join(dir, "vendor", "bundle")))
Addon.load_addons(@global_state, @outgoing_queue)

Expand Down
Loading