solargraph 0.48.0 → 0.49.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/rspec.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/LICENSE +1 -1
- data/SPONSORS.md +2 -4
- data/lib/solargraph/api_map/store.rb +13 -1
- data/lib/solargraph/api_map.rb +30 -12
- data/lib/solargraph/cache.rb +51 -0
- data/lib/solargraph/complex_type/type_methods.rb +3 -6
- data/lib/solargraph/complex_type/unique_type.rb +57 -0
- data/lib/solargraph/complex_type.rb +20 -1
- data/lib/solargraph/convention/rakefile.rb +17 -0
- data/lib/solargraph/convention.rb +2 -0
- data/lib/solargraph/diagnostics/rubocop.rb +15 -2
- data/lib/solargraph/diagnostics/rubocop_helpers.rb +3 -1
- data/lib/solargraph/language_server/host.rb +22 -18
- data/lib/solargraph/language_server/message/extended/download_core.rb +1 -5
- data/lib/solargraph/language_server/message/initialize.rb +2 -0
- data/lib/solargraph/language_server/message/text_document/formatting.rb +1 -1
- data/lib/solargraph/language_server/message/text_document/signature_help.rb +1 -6
- data/lib/solargraph/language_server/message/workspace/did_change_watched_files.rb +10 -3
- data/lib/solargraph/library.rb +21 -20
- data/lib/solargraph/parser/rubyvm/class_methods.rb +6 -1
- data/lib/solargraph/parser/rubyvm/node_processors/def_node.rb +20 -8
- data/lib/solargraph/parser/rubyvm/node_processors/defs_node.rb +14 -3
- data/lib/solargraph/parser/rubyvm/node_processors/send_node.rb +4 -2
- data/lib/solargraph/parser/rubyvm/node_wrapper.rb +47 -0
- data/lib/solargraph/pin/base.rb +5 -2
- data/lib/solargraph/pin/conversions.rb +2 -6
- data/lib/solargraph/pin/method.rb +84 -10
- data/lib/solargraph/pin/namespace.rb +4 -1
- data/lib/solargraph/pin/parameter.rb +8 -3
- data/lib/solargraph/pin/signature.rb +23 -0
- data/lib/solargraph/pin.rb +1 -0
- data/lib/solargraph/rbs_map/conversions.rb +394 -0
- data/lib/solargraph/rbs_map/core_fills.rb +61 -0
- data/lib/solargraph/rbs_map/core_map.rb +38 -0
- data/lib/solargraph/rbs_map/core_signs.rb +33 -0
- data/lib/solargraph/rbs_map/stdlib_map.rb +36 -0
- data/lib/solargraph/rbs_map.rb +73 -0
- data/lib/solargraph/shell.rb +38 -30
- data/lib/solargraph/source/chain/call.rb +30 -22
- data/lib/solargraph/source/chain.rb +21 -6
- data/lib/solargraph/source_map/clip.rb +5 -0
- data/lib/solargraph/source_map/mapper.rb +2 -0
- data/lib/solargraph/type_checker.rb +71 -65
- data/lib/solargraph/version.rb +1 -1
- data/lib/solargraph/views/environment.erb +2 -2
- data/lib/solargraph/workspace.rb +11 -14
- data/lib/solargraph/yard_map/mapper/to_method.rb +7 -4
- data/lib/solargraph/yard_map.rb +7 -148
- data/lib/solargraph.rb +2 -2
- data/solargraph.gemspec +8 -6
- metadata +43 -36
- data/lib/solargraph/compat.rb +0 -37
- data/lib/solargraph/yard_map/core_docs.rb +0 -170
- data/lib/solargraph/yard_map/core_fills.rb +0 -208
- data/lib/solargraph/yard_map/core_gen.rb +0 -76
- data/lib/solargraph/yard_map/rdoc_to_yard.rb +0 -143
- data/lib/solargraph/yard_map/stdlib_fills.rb +0 -43
- data/yardoc/2.2.2.tar.gz +0 -0
data/lib/solargraph/yard_map.rb
CHANGED
@@ -13,34 +13,13 @@ module Solargraph
|
|
13
13
|
class NoYardocError < StandardError; end
|
14
14
|
|
15
15
|
autoload :Cache, 'solargraph/yard_map/cache'
|
16
|
-
autoload :CoreDocs, 'solargraph/yard_map/core_docs'
|
17
|
-
autoload :CoreGen, 'solargraph/yard_map/core_gen'
|
18
16
|
autoload :Mapper, 'solargraph/yard_map/mapper'
|
19
17
|
autoload :RdocToYard, 'solargraph/yard_map/rdoc_to_yard'
|
20
|
-
autoload :CoreFills, 'solargraph/yard_map/core_fills'
|
21
|
-
autoload :StdlibFills, 'solargraph/yard_map/stdlib_fills'
|
22
18
|
autoload :Helpers, 'solargraph/yard_map/helpers'
|
23
19
|
autoload :ToMethod, 'solargraph/yard_map/to_method'
|
24
20
|
|
25
21
|
include ApiMap::BundlerMethods
|
26
22
|
|
27
|
-
CoreDocs.require_minimum
|
28
|
-
|
29
|
-
def stdlib_paths
|
30
|
-
@@stdlib_paths ||= begin
|
31
|
-
result = {}
|
32
|
-
YARD::Registry.load! CoreDocs.yardoc_stdlib_file
|
33
|
-
YARD::Registry.all.each do |co|
|
34
|
-
next if co.file.nil?
|
35
|
-
path = co.file.sub(/^(ext|lib)\//, '').sub(/\.(rb|c)$/, '')
|
36
|
-
base = path.split('/').first
|
37
|
-
result[base] ||= []
|
38
|
-
result[base].push co
|
39
|
-
end
|
40
|
-
result
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
23
|
# @return [Boolean]
|
45
24
|
attr_writer :with_dependencies
|
46
25
|
|
@@ -80,6 +59,7 @@ module Solargraph
|
|
80
59
|
@rebindable_method_names = nil
|
81
60
|
@pin_class_hash = nil
|
82
61
|
@pin_select_cache = {}
|
62
|
+
pins.each { |p| p.source = :yard }
|
83
63
|
true
|
84
64
|
end
|
85
65
|
|
@@ -126,12 +106,6 @@ module Solargraph
|
|
126
106
|
nil
|
127
107
|
end
|
128
108
|
|
129
|
-
# @return [Array<Solargraph::Pin::Base>]
|
130
|
-
def core_pins
|
131
|
-
# Using a class variable to reduce loads
|
132
|
-
@@core_pins ||= load_core_pins
|
133
|
-
end
|
134
|
-
|
135
109
|
# @param path [String]
|
136
110
|
# @return [Pin::Base]
|
137
111
|
def path_pin path
|
@@ -155,10 +129,6 @@ module Solargraph
|
|
155
129
|
nil
|
156
130
|
end
|
157
131
|
|
158
|
-
def stdlib_pins
|
159
|
-
@stdlib_pins ||= []
|
160
|
-
end
|
161
|
-
|
162
132
|
def base_required
|
163
133
|
@base_required ||= Set.new
|
164
134
|
end
|
@@ -199,10 +169,9 @@ module Solargraph
|
|
199
169
|
def process_requires
|
200
170
|
@gemset = process_gemsets
|
201
171
|
required.merge @gemset.keys if required.include?('bundler/require')
|
202
|
-
pins.
|
172
|
+
pins.clear
|
203
173
|
unresolved_requires.clear
|
204
174
|
missing_docs.clear
|
205
|
-
stdlib_pins.clear
|
206
175
|
environ = Convention.for_global(self)
|
207
176
|
done = []
|
208
177
|
already_errored = []
|
@@ -234,14 +203,10 @@ module Solargraph
|
|
234
203
|
base = req.split('/').first
|
235
204
|
return if already_errored.include?(base)
|
236
205
|
already_errored.push base
|
237
|
-
stdtmp = load_stdlib_pins(base)
|
238
206
|
if yd.nil?
|
239
207
|
missing_docs.push req
|
240
|
-
elsif stdtmp.empty?
|
241
|
-
unresolved_requires.push req
|
242
208
|
else
|
243
|
-
|
244
|
-
result.concat stdtmp
|
209
|
+
unresolved_requires.push req
|
245
210
|
end
|
246
211
|
end
|
247
212
|
|
@@ -288,22 +253,8 @@ module Solargraph
|
|
288
253
|
def process_yardoc y, spec = nil
|
289
254
|
return [] if y.nil?
|
290
255
|
if spec
|
291
|
-
|
292
|
-
if
|
293
|
-
Solargraph.logger.info "Loading #{spec.name} #{spec.version} from cache"
|
294
|
-
file = File.open(ser, 'rb')
|
295
|
-
dump = file.read
|
296
|
-
file.close
|
297
|
-
begin
|
298
|
-
result = Marshal.load(dump)
|
299
|
-
return result unless result.nil? || result.empty?
|
300
|
-
Solargraph.logger.warn "Empty cache for #{spec.name} #{spec.version}. Reloading"
|
301
|
-
File.unlink ser
|
302
|
-
rescue StandardError => e
|
303
|
-
Solargraph.logger.warn "Error loading pin cache: [#{e.class}] #{e.message}"
|
304
|
-
File.unlink ser
|
305
|
-
end
|
306
|
-
end
|
256
|
+
cache = Solargraph::Cache.load('gems', "#{spec.name}-#{spec.version}.ser")
|
257
|
+
return cache if cache
|
307
258
|
end
|
308
259
|
size = Dir.glob(File.join(y, '**', '*'))
|
309
260
|
.map{ |f| File.size(f) }
|
@@ -317,10 +268,7 @@ module Solargraph
|
|
317
268
|
result = Mapper.new(YARD::Registry.all, spec).map
|
318
269
|
raise NoYardocError, "Yardoc at #{y} is empty" if result.empty?
|
319
270
|
if spec
|
320
|
-
|
321
|
-
file = File.open(ser, 'wb')
|
322
|
-
file.write Marshal.dump(result)
|
323
|
-
file.close
|
271
|
+
Solargraph::Cache.save 'gems', "#{spec.name}-#{spec.version}.ser", result
|
324
272
|
end
|
325
273
|
result
|
326
274
|
end
|
@@ -328,13 +276,7 @@ module Solargraph
|
|
328
276
|
# @param spec [Gem::Specification]
|
329
277
|
# @return [String]
|
330
278
|
def yardoc_file_for_spec spec
|
331
|
-
|
332
|
-
if File.exist?(cache_dir)
|
333
|
-
Solargraph.logger.info "Using cached documentation for #{spec.name} at #{cache_dir}"
|
334
|
-
cache_dir
|
335
|
-
else
|
336
|
-
YARD::Registry.yardoc_file_for_gem(spec.name, "= #{spec.version}")
|
337
|
-
end
|
279
|
+
YARD::Registry.yardoc_file_for_gem(spec.name, "= #{spec.version}")
|
338
280
|
end
|
339
281
|
|
340
282
|
# @param path [String]
|
@@ -355,88 +297,5 @@ module Solargraph
|
|
355
297
|
end
|
356
298
|
spec
|
357
299
|
end
|
358
|
-
|
359
|
-
def load_core_pins
|
360
|
-
yd = CoreDocs.yardoc_file
|
361
|
-
ser = File.join(File.dirname(yd), 'core.ser')
|
362
|
-
result = if File.file?(ser)
|
363
|
-
file = File.open(ser, 'rb')
|
364
|
-
dump = file.read
|
365
|
-
file.close
|
366
|
-
begin
|
367
|
-
Marshal.load(dump)
|
368
|
-
rescue StandardError => e
|
369
|
-
Solargraph.logger.warn "Error loading core pin cache: [#{e.class}] #{e.message}"
|
370
|
-
File.unlink ser
|
371
|
-
read_core_and_save_cache(yd, ser)
|
372
|
-
end
|
373
|
-
else
|
374
|
-
read_core_and_save_cache(yd, ser)
|
375
|
-
end
|
376
|
-
ApiMap::Store.new(result + CoreFills::ALL).pins.reject { |pin| pin.is_a?(Pin::Reference::Override) }
|
377
|
-
end
|
378
|
-
|
379
|
-
def read_core_and_save_cache yd, ser
|
380
|
-
result = []
|
381
|
-
load_yardoc yd
|
382
|
-
result.concat Mapper.new(YARD::Registry.all).map
|
383
|
-
# HACK: Assume core methods with a single `args` parameter accept restarg
|
384
|
-
result.select { |pin| pin.is_a?(Solargraph::Pin::Method )}.each do |pin|
|
385
|
-
if pin.parameters.length == 1 && pin.parameters.first.name == 'args' && pin.parameters.first.decl == :arg
|
386
|
-
# @todo Smelly instance variable access
|
387
|
-
pin.parameters.first.instance_variable_set(:@decl, :restarg)
|
388
|
-
end
|
389
|
-
end
|
390
|
-
# HACK: Set missing parameters on `==` methods, e.g., `Symbol#==`
|
391
|
-
result.select { |pin| pin.name == '==' && pin.parameters.empty? }.each do |pin|
|
392
|
-
pin.parameters.push Pin::Parameter.new(decl: :arg, name: 'obj2')
|
393
|
-
end
|
394
|
-
dump = Marshal.dump(result)
|
395
|
-
file = File.open(ser, 'wb')
|
396
|
-
file.write dump
|
397
|
-
file.close
|
398
|
-
result
|
399
|
-
end
|
400
|
-
|
401
|
-
def load_stdlib_pins base
|
402
|
-
ser = File.join(File.dirname(CoreDocs.yardoc_stdlib_file), "#{base}.ser")
|
403
|
-
result = if File.file?(ser)
|
404
|
-
Solargraph.logger.info "Loading #{base} stdlib from cache"
|
405
|
-
file = File.open(ser, 'rb')
|
406
|
-
dump = file.read
|
407
|
-
file.close
|
408
|
-
begin
|
409
|
-
Marshal.load(dump)
|
410
|
-
rescue StandardError => e
|
411
|
-
Solargraph.logger.warn "Error loading #{base} stdlib pin cache: [#{e.class}] #{e.message}"
|
412
|
-
File.unlink ser
|
413
|
-
read_stdlib_and_save_cache(base, ser)
|
414
|
-
end
|
415
|
-
else
|
416
|
-
read_stdlib_and_save_cache(base, ser)
|
417
|
-
end
|
418
|
-
fills = StdlibFills.get(base)
|
419
|
-
unless fills.empty?
|
420
|
-
result = ApiMap::Store.new(result + fills).pins.reject { |pin| pin.is_a?(Pin::Reference::Override) }
|
421
|
-
end
|
422
|
-
result
|
423
|
-
end
|
424
|
-
|
425
|
-
def read_stdlib_and_save_cache base, ser
|
426
|
-
result = []
|
427
|
-
if stdlib_paths[base]
|
428
|
-
Solargraph.logger.info "Loading #{base} stdlib from yardoc"
|
429
|
-
result.concat Mapper.new(stdlib_paths[base]).map
|
430
|
-
unless result.empty?
|
431
|
-
dump = Marshal.dump(result)
|
432
|
-
file = File.open(ser, 'wb')
|
433
|
-
file.write dump
|
434
|
-
file.close
|
435
|
-
end
|
436
|
-
end
|
437
|
-
result
|
438
|
-
end
|
439
300
|
end
|
440
301
|
end
|
441
|
-
|
442
|
-
Solargraph::YardMap::CoreDocs.require_minimum
|
data/lib/solargraph.rb
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
Encoding.default_external = 'UTF-8'
|
4
4
|
|
5
|
-
require 'solargraph/compat'
|
6
5
|
require 'solargraph/version'
|
7
6
|
|
8
7
|
# The top-level namespace for the Solargraph code mapping, documentation,
|
@@ -41,9 +40,10 @@ module Solargraph
|
|
41
40
|
autoload :Convention, 'solargraph/convention'
|
42
41
|
autoload :Documentor, 'solargraph/documentor'
|
43
42
|
autoload :Parser, 'solargraph/parser'
|
43
|
+
autoload :RbsMap, 'solargraph/rbs_map'
|
44
|
+
autoload :Cache, 'solargraph/cache'
|
44
45
|
|
45
46
|
dir = File.dirname(__FILE__)
|
46
|
-
YARDOC_PATH = File.realpath(File.join(dir, '..', 'yardoc'))
|
47
47
|
YARD_EXTENSION_FILE = File.join(dir, 'yard-solargraph.rb')
|
48
48
|
VIEWS_PATH = File.join(dir, 'solargraph', 'views')
|
49
49
|
|
data/solargraph.gemspec
CHANGED
@@ -13,30 +13,32 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
14
14
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
15
15
|
end
|
16
|
-
s.homepage = '
|
16
|
+
s.homepage = 'https://solargraph.org'
|
17
17
|
s.license = 'MIT'
|
18
18
|
s.executables = ['solargraph']
|
19
|
+
s.metadata["funding_uri"] = "https://www.patreon.com/castwide"
|
19
20
|
|
20
|
-
s.required_ruby_version = '>= 2.
|
21
|
+
s.required_ruby_version = '>= 2.6'
|
21
22
|
|
22
23
|
s.add_runtime_dependency 'backport', '~> 1.2'
|
23
24
|
s.add_runtime_dependency 'benchmark'
|
24
|
-
s.add_runtime_dependency 'bundler', '
|
25
|
+
s.add_runtime_dependency 'bundler', '~> 2.0'
|
25
26
|
s.add_runtime_dependency 'diff-lcs', '~> 1.4'
|
26
27
|
s.add_runtime_dependency 'e2mmap'
|
27
28
|
s.add_runtime_dependency 'jaro_winkler', '~> 1.5'
|
28
29
|
s.add_runtime_dependency 'kramdown', '~> 2.3'
|
29
30
|
s.add_runtime_dependency 'kramdown-parser-gfm', '~> 1.1'
|
30
31
|
s.add_runtime_dependency 'parser', '~> 3.0'
|
31
|
-
s.add_runtime_dependency '
|
32
|
-
s.add_runtime_dependency '
|
32
|
+
s.add_runtime_dependency 'rbs', '~> 2.0'
|
33
|
+
s.add_runtime_dependency 'reverse_markdown', '~> 2.0'
|
34
|
+
s.add_runtime_dependency 'rubocop', '~> 1.38'
|
33
35
|
s.add_runtime_dependency 'thor', '~> 1.0'
|
34
36
|
s.add_runtime_dependency 'tilt', '~> 2.0'
|
35
37
|
s.add_runtime_dependency 'yard', '~> 0.9', '>= 0.9.24'
|
36
38
|
|
37
39
|
s.add_development_dependency 'pry'
|
38
40
|
s.add_development_dependency 'public_suffix', '~> 3.1'
|
39
|
-
s.add_development_dependency 'rspec', '~> 3.5'
|
41
|
+
s.add_development_dependency 'rspec', '~> 3.5'
|
40
42
|
s.add_development_dependency 'simplecov', '~> 0.14'
|
41
43
|
s.add_development_dependency 'webmock', '~> 3.6'
|
42
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solargraph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.49.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Snyder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backport
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '2.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: diff-lcs
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,39 +137,47 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '3.0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: rbs
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - "
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: 1.0.5
|
146
|
-
- - "<"
|
143
|
+
- - "~>"
|
147
144
|
- !ruby/object:Gem::Version
|
148
|
-
version: '
|
145
|
+
version: '2.0'
|
149
146
|
type: :runtime
|
150
147
|
prerelease: false
|
151
148
|
version_requirements: !ruby/object:Gem::Requirement
|
152
149
|
requirements:
|
153
|
-
- - "
|
150
|
+
- - "~>"
|
154
151
|
- !ruby/object:Gem::Version
|
155
|
-
version:
|
156
|
-
|
152
|
+
version: '2.0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: reverse_markdown
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
157
158
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
159
|
+
version: '2.0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '2.0'
|
159
167
|
- !ruby/object:Gem::Dependency
|
160
168
|
name: rubocop
|
161
169
|
requirement: !ruby/object:Gem::Requirement
|
162
170
|
requirements:
|
163
|
-
- - "
|
171
|
+
- - "~>"
|
164
172
|
- !ruby/object:Gem::Version
|
165
|
-
version: '
|
173
|
+
version: '1.38'
|
166
174
|
type: :runtime
|
167
175
|
prerelease: false
|
168
176
|
version_requirements: !ruby/object:Gem::Requirement
|
169
177
|
requirements:
|
170
|
-
- - "
|
178
|
+
- - "~>"
|
171
179
|
- !ruby/object:Gem::Version
|
172
|
-
version: '
|
180
|
+
version: '1.38'
|
173
181
|
- !ruby/object:Gem::Dependency
|
174
182
|
name: thor
|
175
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -253,9 +261,6 @@ dependencies:
|
|
253
261
|
- - "~>"
|
254
262
|
- !ruby/object:Gem::Version
|
255
263
|
version: '3.5'
|
256
|
-
- - ">="
|
257
|
-
- !ruby/object:Gem::Version
|
258
|
-
version: 3.5.0
|
259
264
|
type: :development
|
260
265
|
prerelease: false
|
261
266
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -263,9 +268,6 @@ dependencies:
|
|
263
268
|
- - "~>"
|
264
269
|
- !ruby/object:Gem::Version
|
265
270
|
version: '3.5'
|
266
|
-
- - ">="
|
267
|
-
- !ruby/object:Gem::Version
|
268
|
-
version: 3.5.0
|
269
271
|
- !ruby/object:Gem::Dependency
|
270
272
|
name: simplecov
|
271
273
|
requirement: !ruby/object:Gem::Requirement
|
@@ -301,6 +303,7 @@ executables:
|
|
301
303
|
extensions: []
|
302
304
|
extra_rdoc_files: []
|
303
305
|
files:
|
306
|
+
- ".github/FUNDING.yml"
|
304
307
|
- ".github/workflows/rspec.yml"
|
305
308
|
- ".gitignore"
|
306
309
|
- ".rspec"
|
@@ -321,7 +324,7 @@ files:
|
|
321
324
|
- lib/solargraph/api_map/source_to_yard.rb
|
322
325
|
- lib/solargraph/api_map/store.rb
|
323
326
|
- lib/solargraph/bench.rb
|
324
|
-
- lib/solargraph/
|
327
|
+
- lib/solargraph/cache.rb
|
325
328
|
- lib/solargraph/complex_type.rb
|
326
329
|
- lib/solargraph/complex_type/type_methods.rb
|
327
330
|
- lib/solargraph/complex_type/unique_type.rb
|
@@ -329,6 +332,7 @@ files:
|
|
329
332
|
- lib/solargraph/convention/base.rb
|
330
333
|
- lib/solargraph/convention/gemfile.rb
|
331
334
|
- lib/solargraph/convention/gemspec.rb
|
335
|
+
- lib/solargraph/convention/rakefile.rb
|
332
336
|
- lib/solargraph/convention/rspec.rb
|
333
337
|
- lib/solargraph/converters/dd.rb
|
334
338
|
- lib/solargraph/converters/dl.rb
|
@@ -463,6 +467,7 @@ files:
|
|
463
467
|
- lib/solargraph/parser/rubyvm/node_processors/scope_node.rb
|
464
468
|
- lib/solargraph/parser/rubyvm/node_processors/send_node.rb
|
465
469
|
- lib/solargraph/parser/rubyvm/node_processors/sym_node.rb
|
470
|
+
- lib/solargraph/parser/rubyvm/node_wrapper.rb
|
466
471
|
- lib/solargraph/parser/snippet.rb
|
467
472
|
- lib/solargraph/pin.rb
|
468
473
|
- lib/solargraph/pin/base.rb
|
@@ -493,10 +498,17 @@ files:
|
|
493
498
|
- lib/solargraph/pin/reference/require.rb
|
494
499
|
- lib/solargraph/pin/reference/superclass.rb
|
495
500
|
- lib/solargraph/pin/search.rb
|
501
|
+
- lib/solargraph/pin/signature.rb
|
496
502
|
- lib/solargraph/pin/singleton.rb
|
497
503
|
- lib/solargraph/pin/symbol.rb
|
498
504
|
- lib/solargraph/position.rb
|
499
505
|
- lib/solargraph/range.rb
|
506
|
+
- lib/solargraph/rbs_map.rb
|
507
|
+
- lib/solargraph/rbs_map/conversions.rb
|
508
|
+
- lib/solargraph/rbs_map/core_fills.rb
|
509
|
+
- lib/solargraph/rbs_map/core_map.rb
|
510
|
+
- lib/solargraph/rbs_map/core_signs.rb
|
511
|
+
- lib/solargraph/rbs_map/stdlib_map.rb
|
500
512
|
- lib/solargraph/server_methods.rb
|
501
513
|
- lib/solargraph/shell.rb
|
502
514
|
- lib/solargraph/source.rb
|
@@ -541,24 +553,19 @@ files:
|
|
541
553
|
- lib/solargraph/workspace/config.rb
|
542
554
|
- lib/solargraph/yard_map.rb
|
543
555
|
- lib/solargraph/yard_map/cache.rb
|
544
|
-
- lib/solargraph/yard_map/core_docs.rb
|
545
|
-
- lib/solargraph/yard_map/core_fills.rb
|
546
|
-
- lib/solargraph/yard_map/core_gen.rb
|
547
556
|
- lib/solargraph/yard_map/helpers.rb
|
548
557
|
- lib/solargraph/yard_map/mapper.rb
|
549
558
|
- lib/solargraph/yard_map/mapper/to_constant.rb
|
550
559
|
- lib/solargraph/yard_map/mapper/to_method.rb
|
551
560
|
- lib/solargraph/yard_map/mapper/to_namespace.rb
|
552
|
-
- lib/solargraph/yard_map/rdoc_to_yard.rb
|
553
|
-
- lib/solargraph/yard_map/stdlib_fills.rb
|
554
561
|
- lib/solargraph/yard_map/to_method.rb
|
555
562
|
- lib/yard-solargraph.rb
|
556
563
|
- solargraph.gemspec
|
557
|
-
|
558
|
-
homepage: http://solargraph.org
|
564
|
+
homepage: https://solargraph.org
|
559
565
|
licenses:
|
560
566
|
- MIT
|
561
|
-
metadata:
|
567
|
+
metadata:
|
568
|
+
funding_uri: https://www.patreon.com/castwide
|
562
569
|
post_install_message:
|
563
570
|
rdoc_options: []
|
564
571
|
require_paths:
|
@@ -567,7 +574,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
567
574
|
requirements:
|
568
575
|
- - ">="
|
569
576
|
- !ruby/object:Gem::Version
|
570
|
-
version: '2.
|
577
|
+
version: '2.6'
|
571
578
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
572
579
|
requirements:
|
573
580
|
- - ">="
|
data/lib/solargraph/compat.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
unless Hash.method_defined?(:transform_keys)
|
2
|
-
class Hash
|
3
|
-
def transform_keys &block
|
4
|
-
result = {}
|
5
|
-
each_pair do |k, v|
|
6
|
-
result[block.call(k)] = v
|
7
|
-
end
|
8
|
-
result
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
unless Hash.method_defined?(:transform_values)
|
14
|
-
class Hash
|
15
|
-
def transform_values &block
|
16
|
-
result = {}
|
17
|
-
each_pair do |k, v|
|
18
|
-
result[k] = block.call(v)
|
19
|
-
end
|
20
|
-
result
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
unless Array.method_defined?(:sum)
|
26
|
-
class Array
|
27
|
-
def sum &block
|
28
|
-
inject(0) do |s, x|
|
29
|
-
if block
|
30
|
-
s + block.call(x)
|
31
|
-
else
|
32
|
-
s + x
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|