nrepl-lazuli 0.2.0 → 0.2.1

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: 2deef62506da60f639206583fc37504630c3fdefcab9013a1ef25b354f51221c
4
- data.tar.gz: 8374c37e1eae4d69479137163f10242ea0f287c9ffd099830b1d3d361b6c344c
3
+ metadata.gz: f4f4fa0597b301ec633b7a332a60a86ec773239fc9c199096249459c7567c0b1
4
+ data.tar.gz: ec2ce7297bd7351c1be0095af5e157b88c70a8f8ce434ea3e046cd3b97e8d1aa
5
5
  SHA512:
6
- metadata.gz: c81e136417a9d6dac29f007a2539011baebc83d6975f1715eaa3f6f0799b4e63d4484bf834e729c0b53f65b0dcff09c917443f41c1f50edb1104cf3efb740390
7
- data.tar.gz: a6293282dc353c2cfa998fd557a1c84a7482224009ea905f08f82c3615e38e64b4507f5927630be9f6e4e7a2d6a00a05d02e735f59b357249ccab0d7840e4a6c
6
+ metadata.gz: b813283650b6ef0a56d0e8a6372f5a5ffea33235322d62ddc1204cc0f696de4912be861752dac02f859ce4592f9c4c84e89c03b9050597c357f222bbe82dbf14
7
+ data.tar.gz: 5354de88865cded64e7aa9f22b1bebf43fae21d396bfe9cd212a7859d35eccb6a246b3ad273f4d08679fb485d56b75b383986ddb7c494c9a92869c5606d755bb
@@ -114,16 +114,24 @@ module NREPL
114
114
  @@definitions = {}
115
115
 
116
116
  def __lazuli_source_location(method)
117
- ancestors.each do |klass|
117
+ final_loc = nil
118
+ loc = ancestors.each do |klass|
118
119
  loc = (klass.instance_variable_get(:@__lazuli_methods) || {})[method]
119
- return loc if loc
120
+ if loc
121
+ final_loc = loc
122
+ break
123
+ end
124
+ end
125
+
126
+ if(final_loc && File.exist?(final_loc[0]))
127
+ final_loc
128
+ else
129
+ instance_method(method).source_location
120
130
  end
121
- return instance_method(method).source_location
122
131
  end
123
132
 
124
133
  def method_added(method_name)
125
134
  return if method_name == :__lazuli_source_location
126
- # puts "Thing added #{method_name}"
127
135
  path = caller.reject { |x| x =~ /gems.*gems/ }[0]
128
136
  if path
129
137
  (file, row) = path.split(/:/)
@@ -6,7 +6,7 @@ module NREPL
6
6
  DEFAULT_HOST = '127.0.0.1'
7
7
  PORT_FILENAME = '.nrepl-port'
8
8
 
9
- require_relative 'nrepl/server'
9
+ require_relative 'nrepl-lazuli/server'
10
10
  @@watches = {}
11
11
  @@connections = Set.new
12
12
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nrepl-lazuli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maurício Szabo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-04 00:00:00.000000000 Z
11
+ date: 2024-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bencode
@@ -31,11 +31,11 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - lib/nrepl.rb
35
- - lib/nrepl/connection.rb
36
- - lib/nrepl/fake_stdout.rb
37
- - lib/nrepl/server.rb
38
- homepage: https://rubygems.org/gems/nrepl-lazuli
34
+ - lib/nrepl-lazuli.rb
35
+ - lib/nrepl-lazuli/connection.rb
36
+ - lib/nrepl-lazuli/fake_stdout.rb
37
+ - lib/nrepl-lazuli/server.rb
38
+ homepage: https://gitlab.com/clj-editors/nrepl-lazuli
39
39
  licenses:
40
40
  - MIT
41
41
  metadata: {}
File without changes
File without changes