yard-aggredator 1.1.3 → 1.1.4
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 +4 -4
- data/lib/yard/aggredator/plugin.rb +65 -0
- data/lib/yard/aggredator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 14937e3ed6eb62c4a2bb3f87c1623968a8adbaaf9acd31367180b58a39fc9bf4
|
|
4
|
+
data.tar.gz: 6cecc99100f8a4749df988d16e90cf51095f7939731a39b0a94c07e3182e0a31
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e2f9af68fff9948d344f2de4f8b9324087bc5c7eeec986d605c6936b02bcdd9dae4087aaea2d4a4759ccc8db13f0d396a31dc5a065eb183de783aa1424523975
|
|
7
|
+
data.tar.gz: ef1d741893d7d2494a2dbc254116059cbc34645238834cd9bb38ba11077ea13cba093f7272c04d51546b5c8eea465bb347651f6461bf7670a7982924d23058bf
|
|
@@ -14,6 +14,7 @@ module YARD
|
|
|
14
14
|
def htmlify(text, markup = options.markup)
|
|
15
15
|
detected_markup = plain_detect_markup(@current_linking_file || @file&.filename, markup)
|
|
16
16
|
|
|
17
|
+
text = text.dup
|
|
17
18
|
# отложенные директивы @!include и @!embed могли оставить ссылки-заглушки, и теперь можно их заменить на реальный контент
|
|
18
19
|
render_referenced_directives(text, owner)
|
|
19
20
|
|
|
@@ -325,8 +326,72 @@ module YARD
|
|
|
325
326
|
self.name = "#{dirname}_#{name}"
|
|
326
327
|
end
|
|
327
328
|
end
|
|
329
|
+
|
|
330
|
+
module RegistryResolverPatch
|
|
331
|
+
# Отвратительный copy-paste из RegistryResolver
|
|
332
|
+
# при переходе из Yard v0.9.39 -> v0.9.40 бы исправлен баг 2017 года https://github.com/lsegal/yard/issues/1116
|
|
333
|
+
# из-за этого сломалась работа поиска статических родительских методов с привязаннми макросами...
|
|
334
|
+
# исправление: КОМЕНТИРУЕМ СТРОКУ
|
|
335
|
+
def lookup_by_path(path, opts = {})
|
|
336
|
+
path = path.to_s
|
|
337
|
+
namespace = opts[:namespace]
|
|
338
|
+
inheritance = opts[:inheritance] || false
|
|
339
|
+
proxy_fallback = opts[:proxy_fallback] || false
|
|
340
|
+
type = opts[:type]
|
|
341
|
+
|
|
342
|
+
if namespace.is_a?(CodeObjects::Proxy)
|
|
343
|
+
return proxy_fallback ? CodeObjects::Proxy.new(namespace, path, type) : nil
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
if namespace == :root || !namespace
|
|
347
|
+
namespace = @registry.root
|
|
348
|
+
else
|
|
349
|
+
namespace = namespace.parent until namespace.is_a?(CodeObjects::NamespaceObject)
|
|
350
|
+
end
|
|
351
|
+
orignamespace = namespace
|
|
352
|
+
|
|
353
|
+
if path =~ starts_with_default_separator_match
|
|
354
|
+
path = $'
|
|
355
|
+
namespace = @registry.root
|
|
356
|
+
orignamespace = @registry.root
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
resolved = nil
|
|
360
|
+
lexical_lookup = 0
|
|
361
|
+
while namespace && !resolved
|
|
362
|
+
resolved = lookup_path_direct(namespace, path, type)
|
|
363
|
+
# Prevent a bare name from resolving back to the namespace we started
|
|
364
|
+
# from when searching through a parent namespace. For example,
|
|
365
|
+
# `include Enumerable` inside `A::Enumerable` would walk up to namespace
|
|
366
|
+
# `A` and match `A::Enumerable`, creating a false self-referential mixin.
|
|
367
|
+
# Only skip when we have already moved to a parent (namespace != orignamespace).
|
|
368
|
+
# See https://github.com/lsegal/yard/issues/1116
|
|
369
|
+
|
|
370
|
+
# ВОТ ЭТУ СТРОКУ НАДО ЗАКОМЕНТИРОВАТЬ ЧТОБ РАБОТАЛ Aggredator::Api::V3::Message.schema_id
|
|
371
|
+
# resolved = nil if resolved.equal?(orignamespace) && !namespace.equal?(orignamespace)
|
|
372
|
+
resolved ||= lookup_path_inherited(namespace, path, type) if inheritance
|
|
373
|
+
break if resolved
|
|
374
|
+
namespace = namespace.parent
|
|
375
|
+
lexical_lookup += 1
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
# method objects cannot be resolved through lexical lookup by more than 1 ns
|
|
379
|
+
if lexical_lookup > 1 && resolved.is_a?(CodeObjects::MethodObject)
|
|
380
|
+
resolved = nil
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
if proxy_fallback
|
|
384
|
+
resolved ||= CodeObjects::Proxy.new(orignamespace, path, type)
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
resolved
|
|
388
|
+
end
|
|
389
|
+
end
|
|
390
|
+
|
|
328
391
|
end
|
|
329
392
|
|
|
393
|
+
::YARD::RegistryResolver.prepend(::YARD::RegistryResolverPatch)
|
|
394
|
+
|
|
330
395
|
::YARD::Tags::Library.define_directive :include, :with_types, ::YARD::Aggredator::IncludeDirective
|
|
331
396
|
::YARD::Tags::Library.define_directive :embed, :with_types, ::YARD::Aggredator::EmbedDirective
|
|
332
397
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yard-aggredator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samoilenko Yuri
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rouge
|