ruby-lsp-cell 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 178572be5a2fb9118cec4c384a4d2ef55263d9c689021e3e5ef849f8f73059e3
4
- data.tar.gz: e12e41a2e2204d4ab27cecbd670ddff43cf47a8e22b432eb477fb6b1627d6041
3
+ metadata.gz: d26cf866d9c38fe88db134b7da05d7c883aa8cab0907b064042ef41a01dce7c7
4
+ data.tar.gz: d91237300c2695320827a43142dcb84d3392d66486fa72a6f7df16750f490743
5
5
  SHA512:
6
- metadata.gz: d99a39479620e9becaf3d94d3e928d68f1c8228d1d162e0a02e0a3c79e7337d853b365338416c4cbf30673b62df1f48f26e890aa12213df5fc8177735751f7bd
7
- data.tar.gz: f8fcbfa1bef3a640d57c4551ccea2ab9a3f6c4303f9b8fb8abda2960720bf7bc1a05db00455460f5df732ef7d1d816630d76adc8528f8655ed3e6f4ee6920531
6
+ metadata.gz: 3d0b35cd0593bcdc3c71cb18c19c7ffd8202763ce75a26389c1538e6f5ab4650e8996c69efcd8a16dd6e31e3d9c1b7013d869759b1a0bd922fec4f71a384f2be
7
+ data.tar.gz: 46d0d9e866cdc4a8a0a75f6b930a31d40861616f5f2212069937cfdd4ba3a7077fe542b2b398f0dca1f6b5b9aa9d1a2a113c4bb5eeda349f03f3b86dc679f1dc
@@ -3,6 +3,6 @@
3
3
 
4
4
  module RubyLsp
5
5
  module Cell
6
- VERSION = "0.1.1"
6
+ VERSION = "0.1.2"
7
7
  end
8
8
  end
@@ -40,6 +40,7 @@ module RubyLsp
40
40
  def on_class_node_enter(node)
41
41
  @class_name = node.constant_path.slice
42
42
  return unless @class_name.end_with?("Cell")
43
+ return unless @global_state.index.linearized_ancestors_of(@class_name).include?("Cell::ViewModel")
43
44
 
44
45
  add_default_goto_code_lens(node)
45
46
  end
@@ -53,6 +54,7 @@ module RubyLsp
53
54
  def on_def_node_leave(node)
54
55
  return unless @class_name.end_with?("Cell")
55
56
  return unless contains_render_call?(node.body)
57
+ return unless @global_state.index.linearized_ancestors_of(@class_name).include?("Cell::ViewModel")
56
58
 
57
59
  add_function_goto_code_lens(node, node.name.to_s)
58
60
  end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path("lib", __dir__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "ruby_lsp/cell/version"
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "ruby-lsp-cell"
9
+ spec.version = RubyLsp::Cell::VERSION
10
+ spec.authors = ["Edgar Guzmán"]
11
+ spec.email = ["guzmanem@hotmail.com"]
12
+
13
+ spec.summary = "Ruby LSP addon for cell-based development support"
14
+ spec.description = "A Ruby LSP extension that provides additional language server features for cell-based development workflows"
15
+ spec.homepage = "https://github.com/guzmanem/ruby-lsp-cell"
16
+ spec.license = "MIT"
17
+ spec.required_ruby_version = ">= 3.0.0"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/guzmanem/ruby-lsp-cell"
21
+ spec.metadata["changelog_uri"] = "https://github.com/guzmanem/ruby-lsp-cell/blob/main/CHANGELOG.md"
22
+ spec.metadata["rubygems_mfa_required"] = "true"
23
+
24
+ # Specify which files should be added to the gem when it is released.
25
+ spec.files = Dir.chdir(__dir__) do
26
+ %x(git ls-files -z).split("\x0").reject do |f|
27
+ (File.expand_path(f) == __FILE__) ||
28
+ f.start_with?(
29
+ "bin/",
30
+ "test/",
31
+ "spec/",
32
+ "features/",
33
+ "examples/",
34
+ ".git",
35
+ ".circleci",
36
+ "rubocop.yml",
37
+ "appveyor",
38
+ "Gemfile",
39
+ "misc/",
40
+ "sorbet/",
41
+ )
42
+ end
43
+ end
44
+
45
+ spec.bindir = "exe"
46
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
47
+ spec.require_paths = ["lib"]
48
+ end
@@ -0,0 +1,8 @@
1
+ # typed: false
2
+ # frozen_string_literal: true
3
+
4
+ raise "Do not load this file!" unless defined?(RubyIndexer)
5
+
6
+ module Cell
7
+ class ViewModel; end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lsp-cell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgar Guzmán
@@ -28,6 +28,8 @@ files:
28
28
  - lib/ruby_lsp/cell/version.rb
29
29
  - lib/ruby_lsp/ruby-lsp-cell/addon.rb
30
30
  - lib/ruby_lsp/ruby-lsp-cell/code_lens.rb
31
+ - ruby-lsp-cell.gemspec
32
+ - tools/cell_fake.rb
31
33
  homepage: https://github.com/guzmanem/ruby-lsp-cell
32
34
  licenses:
33
35
  - MIT