Skip to content

Some structural cleanup and updates #53

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

Merged
merged 6 commits into from
Apr 24, 2023
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
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Ruby LSP Rails is a [Ruby LSP](https://github.com/Shopify/ruby-lsp) extension fo
- Displaying an ActiveRecord model's database columns and types when hovering over it
- (More to come!)


## Installation

To install, add the following line to your application's Gemfile:
Expand All @@ -25,7 +24,7 @@ end

This gem consists of two components that enable enhanced Rails functionality in the editor:

1. A Rails engine that automatically exposes APIs when Rails server is running
1. A Rack middleware that automatically exposes APIs when Rails server is running
1. A Ruby LSP extension that connects to the exposed APIs to fetch runtime information from the Rails server

This is why the Rails server needs to be running for features to work.
Expand All @@ -35,7 +34,6 @@ This is why the Rails server needs to be running for features to work.
> There is no need to restart the Ruby LSP every time the Rails server is booted.
> If the server is shut down, the extra features will temporarily disappear and reappear once the server is running again.


## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Shopify/ruby-lsp-rails. This project is
Expand Down
1 change: 1 addition & 0 deletions lib/ruby_lsp_rails/railtie.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# typed: strict
# frozen_string_literal: true

require "rails/railtie"
require "ruby_lsp_rails/middleware"

module RubyLsp
Expand Down
2 changes: 1 addition & 1 deletion sorbet/tapioca/require.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

# Add your extra requires here (`bin/tapioca require` can be used to bootstrap this list)

require "rails/all"
require "ruby_lsp/internal"
require "syntax_tree"
require "syntax_tree/dsl"
require "minitest/unit"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this print test outputs then running bin/tapioca gem? Is this needed because of mocha?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah currently mocha yells when bin/tapioca gem is run:

MiniTest must be loaded before require 'mocha/minitest'. (RuntimeError)

I thought about testing output too but I actually don't see it:

Screenshot 2023-04-24 at 21 24 07

(I will open a separate PR to bump gem rbis)

require "mocha/minitest"
Empty file removed test/fixtures/files/.keep
Empty file.
Empty file removed test/helpers/.keep
Empty file.
Empty file removed test/integration/.keep
Empty file.
10 changes: 0 additions & 10 deletions test/integration/navigation_test.rb

This file was deleted.

Empty file removed test/mailers/.keep
Empty file.
Empty file removed test/models/.keep
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 0 additions & 8 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
require "ruby_lsp/internal"
require "ruby_lsp/ruby_lsp_rails/extension"

# Load fixtures from the engine
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
ActiveSupport::TestCase.fixture_path = File.expand_path("fixtures", __dir__)
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files"
ActiveSupport::TestCase.fixtures(:all)
end

$VERBOSE = nil unless ENV["VERBOSE"] || ENV["CI"]

module ActiveSupport
Expand Down