-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Rails app detection #1467
Conversation
@@ -12,11 +12,10 @@ def test_does_nothing_if_both_ruby_lsp_and_debug_are_in_the_bundle | |||
refute_path_exists(".ruby-lsp") | |||
end | |||
|
|||
def test_does_nothing_if_both_ruby_lsp_and_debug_are_in_the_bundle2 | |||
def test_does_nothing_if_both_ruby_lsp_and_ruby_lsp_rails_are_in_the_bundle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to update method name in #1381
@@ -479,6 +481,8 @@ def test_ruby_lsp_rails_is_automatically_included_in_rails_apps | |||
source "https://rubygems.org" | |||
gem "rails" | |||
GEMFILE | |||
FileUtils.mkdir(File.join(dir, "bin")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(within the mktmpdir
block so no need to manually delete)
There is some corresponding discussion happening in Shopify/ruby-lsp-rails#284 about what is the right approach for this. |
4013be3
to
43aa280
Compare
43aa280
to
a8b5e5c
Compare
My two cents is that, as long as the |
Handled by Shopify/ruby-lsp-rails#284 |
Motivation
Closes #1466
Implementation
Check for the presence of
bin/rails
as suggested by Rafael.Automated Tests
Included
Manual Tests
It's slightly awkward as we need to ensure the setup process doesn't end up installing the published version:
0.14.999
so you can easily identify it.gem build
gem install <filename>
rails/rails
repo..ruby-lsp
directory if it existsbin/rails
.ruby-lsp/Gemfile
doesn't containruby-lsp-rails