-
Notifications
You must be signed in to change notification settings - Fork 30
Rename gem to ruby-lsp-rails
#34
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//= link_directory ../stylesheets/ruby_lsp_rails .css |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# typed: strict | ||
# frozen_string_literal: true | ||
|
||
module RubyLsp | ||
module Rails | ||
class ApplicationController < ActionController::Base | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# typed: strict | ||
# frozen_string_literal: true | ||
|
||
module RubyLsp | ||
module Rails | ||
class ModelsController < ApplicationController | ||
extend T::Sig | ||
|
||
sig { returns(T.untyped) } | ||
def show | ||
const = Object.const_get(params[:id]) # rubocop:disable Sorbet/ConstantsFromStrings | ||
|
||
begin | ||
schema_file = ActiveRecord::Tasks::DatabaseTasks.schema_dump_path(const.connection.pool.db_config) | ||
rescue => e | ||
warn("Could not locate schema: #{e.message}") | ||
end | ||
|
||
if const < ActiveRecord::Base | ||
render(json: { | ||
columns: const.columns.map { |column| [column.name, column.type] }, | ||
schema_file: schema_file, | ||
}) | ||
else | ||
head(:not_found) | ||
end | ||
rescue NameError, ActiveRecord::TableNotSpecified | ||
head(:not_found) | ||
end | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# typed: strict | ||
# frozen_string_literal: true | ||
|
||
module RailsRubyLsp | ||
module RubyLspRails | ||
class ApplicationJob < ActiveJob::Base | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# typed: strict | ||
# frozen_string_literal: true | ||
|
||
module RailsRubyLsp | ||
module RubyLspRails | ||
class ApplicationMailer < ActionMailer::Base | ||
default from: "[email protected]" | ||
layout "mailer" | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# typed: strict | ||
# frozen_string_literal: true | ||
|
||
module RubyLsp | ||
module Rails | ||
class ApplicationRecord < ActiveRecord::Base | ||
self.abstract_class = true | ||
end | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# typed: strict | ||
# frozen_string_literal: true | ||
|
||
RailsRubyLsp::Engine.routes.draw do | ||
RubyLsp::Rails::Engine.routes.draw do | ||
resources :models, only: [:show] | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: rails-ruby-lsp | ||
name: ruby-lsp-rails | ||
|
||
type: ruby | ||
|
||
|
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# typed: strict | ||
# frozen_string_literal: true | ||
|
||
require "sorbet-runtime" | ||
require "ruby_lsp_rails/version" | ||
require "ruby_lsp_rails/engine" | ||
|
||
module RubyLSP | ||
module Rails | ||
end | ||
end |
This file was deleted.
This file was deleted.
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.
Looks like we may need to add the right platforms in the
Gemfile.lock
.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.
Yeah, not sure why that changed 🤔
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.
(
bundle lock --add-platform x86_64-linux
doesn't do anything sincex86_64-linux
is still listed inPLATFORMS
).