ruby-lsp-rails 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3d8b40085e6c7ca1e23283423a0966da489180e36e4fb50415f41b1a37f5294
4
- data.tar.gz: e98455cb80f6c386e9aa1c3fa516a29cbf0027826aed8c5af029cc1de61aaa05
3
+ metadata.gz: 54789b1f5da58f025ec88cfcff5cf95f800ae68af9dc409d31a4cdf6307e8286
4
+ data.tar.gz: c03bd0623133606a7ba2290198939fb7de0071bdcc2e52bea30efdb3ed1fc7e2
5
5
  SHA512:
6
- metadata.gz: ff23cfda2194b449136438eee3475801c4568d7efa9dea08c9c60bd11f732af31c10a30b95014c7d366fbf5ad86dd7471dd3419ef4ef2808f031307d1ffc841e
7
- data.tar.gz: 4a776b1c73b4c2683ba6db906afc3dccd2221f0dd4943a56d1a7fd1f0b4c43f92a789231d82e85aec2ba664fd505013c3c3a594a7b57d6931b35bfd433998ca0
6
+ metadata.gz: 7426ceebeabe03877d10b49fcb05b88c435d968fdcfd300d898768289aff80dfac7936c604d43f46de58eaa1649c5047ae9f7f0edbdb708e86b260cb52827591
7
+ data.tar.gz: 52c94c5e2c2fe0c37e1fd3e807805ad2b80d5749903366a4dc41ff73885b150f8db03dd2a2154a9364e63b0eb36bf065cf0795eb5a19b801c201e8d5e93d40df
data/README.md CHANGED
@@ -48,8 +48,9 @@ See the [documentation](https://shopify.github.io/ruby-lsp-rails) for more in-de
48
48
  1. Open a test which inherits from `ActiveSupport::TestCase` or one of its descendants, such as `ActionDispatch::IntegrationTest`.
49
49
  2. Click on the "Run", "Run in Terminal" or "Debug" code lens which appears above the test class, or an individual test.
50
50
 
51
- Note: When using the Test Explorer view, if your code contains a statement to pause execution (e.g. `debugger`) it will
52
- cause the test runner to hang.
51
+ > [!NOTE]
52
+ > When using the Test Explorer view, if your code contains a statement to pause execution (e.g. `debugger`) it will
53
+ > cause the test runner to hang.
53
54
 
54
55
  ## How It Works
55
56
 
@@ -60,8 +61,7 @@ This gem consists of two components that enable enhanced Rails functionality in
60
61
 
61
62
  This is why the Rails server needs to be running for some features to work.
62
63
 
63
- > **Note**
64
- >
64
+ > [!NOTE]
65
65
  > There is no need to restart the Ruby LSP every time the Rails server is booted.
66
66
  > If the server is shut down, the extra features will temporarily disappear and reappear once the server is running again.
67
67
 
@@ -12,15 +12,13 @@ module RubyLsp
12
12
 
13
13
  initializer "ruby_lsp_rails.setup" do |_app|
14
14
  config.after_initialize do |app|
15
- unless config.ruby_lsp_rails.server == false
15
+ # If we start the app with `bin/rails console` then `Rails::Server` is not defined.
16
+ if defined?(::Rails::Server) && config.ruby_lsp_rails.server
16
17
  app.routes.prepend do
17
18
  T.bind(self, ActionDispatch::Routing::Mapper)
18
19
  mount(RackApp.new => RackApp::BASE_PATH)
19
20
  end
20
- end
21
21
 
22
- # If we start the app with `bin/rails console` then `Rails::Server` is not defined.
23
- if defined?(::Rails::Server)
24
22
  ssl_enable, host, port = ::Rails::Server::Options.new.parse!(ARGV).values_at(:SSLEnable, :Host, :Port)
25
23
  app_uri = "#{ssl_enable ? "https" : "http"}://#{host}:#{port}"
26
24
  app_uri_path = ::Rails.root.join("tmp", "app_uri.txt")
@@ -3,6 +3,6 @@
3
3
 
4
4
  module RubyLsp
5
5
  module Rails
6
- VERSION = "0.2.8"
6
+ VERSION = "0.2.9"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lsp-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-04 00:00:00.000000000 Z
11
+ date: 2024-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
- rubygems_version: 3.4.21
132
+ rubygems_version: 3.5.4
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: A Ruby LSP addon for Rails