From ef41d1f5772d05c7d46fe43fe342a50b4400fbcb Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Tue, 26 Nov 2024 13:22:25 -0500 Subject: [PATCH] Move URI extension to indexer --- lib/{core_ext => ruby_indexer/lib/ruby_indexer}/uri.rb | 0 lib/ruby_indexer/ruby_indexer.rb | 1 + {test/requests/support => lib/ruby_indexer/test}/uri_test.rb | 2 +- lib/ruby_lsp/internal.rb | 1 - lib/ruby_lsp/scripts/compose_bundle.rb | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename lib/{core_ext => ruby_indexer/lib/ruby_indexer}/uri.rb (100%) rename {test/requests/support => lib/ruby_indexer/test}/uri_test.rb (99%) diff --git a/lib/core_ext/uri.rb b/lib/ruby_indexer/lib/ruby_indexer/uri.rb similarity index 100% rename from lib/core_ext/uri.rb rename to lib/ruby_indexer/lib/ruby_indexer/uri.rb diff --git a/lib/ruby_indexer/ruby_indexer.rb b/lib/ruby_indexer/ruby_indexer.rb index 2d888428e..86a37ffde 100644 --- a/lib/ruby_indexer/ruby_indexer.rb +++ b/lib/ruby_indexer/ruby_indexer.rb @@ -4,6 +4,7 @@ require "yaml" require "did_you_mean" +require "ruby_indexer/lib/ruby_indexer/uri" require "ruby_indexer/lib/ruby_indexer/indexable_path" require "ruby_indexer/lib/ruby_indexer/declaration_listener" require "ruby_indexer/lib/ruby_indexer/reference_finder" diff --git a/test/requests/support/uri_test.rb b/lib/ruby_indexer/test/uri_test.rb similarity index 99% rename from test/requests/support/uri_test.rb rename to lib/ruby_indexer/test/uri_test.rb index 8539eafc1..57cccbacb 100644 --- a/test/requests/support/uri_test.rb +++ b/lib/ruby_indexer/test/uri_test.rb @@ -3,7 +3,7 @@ require "test_helper" -module RubyLsp +module RubyIndexer class URITest < Minitest::Test def test_from_path_on_unix uri = URI::Generic.from_path(path: "/some/unix/path/to/file.rb") diff --git a/lib/ruby_lsp/internal.rb b/lib/ruby_lsp/internal.rb index 540e93f08..cbada5ccf 100644 --- a/lib/ruby_lsp/internal.rb +++ b/lib/ruby_lsp/internal.rb @@ -26,7 +26,6 @@ require "ruby-lsp" require "ruby_lsp/base_server" require "ruby_indexer/ruby_indexer" -require "core_ext/uri" require "ruby_lsp/utils" require "ruby_lsp/static_docs" require "ruby_lsp/scope" diff --git a/lib/ruby_lsp/scripts/compose_bundle.rb b/lib/ruby_lsp/scripts/compose_bundle.rb index ef58b16ef..cac3132bf 100644 --- a/lib/ruby_lsp/scripts/compose_bundle.rb +++ b/lib/ruby_lsp/scripts/compose_bundle.rb @@ -5,7 +5,7 @@ def compose(raw_initialize) require_relative "../setup_bundler" require "json" require "uri" - require_relative "../../core_ext/uri" + require "ruby_indexer/lib/ruby_indexer/uri" initialize_request = JSON.parse(raw_initialize, symbolize_names: true) workspace_uri = initialize_request.dig(:params, :workspaceFolders, 0, :uri)