yard-link_stdlib 0.1.0 → 0.1.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 +4 -4
- data/VERSION +1 -1
- data/bin/make_map.rb +55 -18
- data/lib/yard/cli/link_stdlib.rb +270 -53
- data/lib/yard/link_stdlib/html_helper.rb +8 -22
- data/lib/yard/link_stdlib/object_map.rb +253 -39
- data/lib/yard/link_stdlib/ruby_source.rb +22 -1
- data/lib/yard/link_stdlib/ruby_version.rb +4 -3
- data/lib/yard/link_stdlib/version.rb +3 -3
- data/lib/yard/link_stdlib.rb +439 -167
- data/maps/ruby-2.3.0.json.gz +0 -0
- data/maps/ruby-2.4.0.json.gz +0 -0
- data/maps/ruby-2.5.0.json.gz +0 -0
- metadata +32 -5
- data/lib/yard/link_stdlib/dump.rb +0 -74
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yard-link_stdlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nrser
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.16'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.16'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -122,6 +122,34 @@ dependencies:
|
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.5.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: yard-clean
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.1.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.1.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: yard-doctest
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.1.16
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.1.16
|
125
153
|
description: "A YARD plugin (with a bit of monkey-business) to support referencing
|
126
154
|
\nmodules, classes, methods, etc. from Ruby's standard library the same way\nyou
|
127
155
|
can reference things in your own code, like {String}.\n\nI find this makes the generated
|
@@ -140,7 +168,6 @@ files:
|
|
140
168
|
- lib/yard-link_stdlib.rb
|
141
169
|
- lib/yard/cli/link_stdlib.rb
|
142
170
|
- lib/yard/link_stdlib.rb
|
143
|
-
- lib/yard/link_stdlib/dump.rb
|
144
171
|
- lib/yard/link_stdlib/html_helper.rb
|
145
172
|
- lib/yard/link_stdlib/object_map.rb
|
146
173
|
- lib/yard/link_stdlib/ruby_source.rb
|
@@ -1,74 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# encoding: UTF-8
|
3
|
-
|
4
|
-
|
5
|
-
# Namespace
|
6
|
-
# ========================================================================
|
7
|
-
|
8
|
-
module YARD
|
9
|
-
module LinkStdlib
|
10
|
-
|
11
|
-
|
12
|
-
# Definitions
|
13
|
-
# ========================================================================
|
14
|
-
|
15
|
-
# Dump a hash of values as a `debug`-level log message (`log` is a global
|
16
|
-
# function when you're hangin' in the YARD).
|
17
|
-
#
|
18
|
-
# @example Dump values with a message
|
19
|
-
# dump "There was a problem with the ", obj, "object!",
|
20
|
-
# value_a: value_a,
|
21
|
-
# value_b: value_b
|
22
|
-
#
|
23
|
-
# @example Dump values without a message
|
24
|
-
# dump value_a: value_a, value_b: value_b
|
25
|
-
#
|
26
|
-
# @param [Array<String | Object>] message
|
27
|
-
# Optional log message. Entries will be space-joined to form the message
|
28
|
-
# string: strings will be left as-is, and other objects will be
|
29
|
-
# stringified by calling their `#inspect` method. See examples.
|
30
|
-
#
|
31
|
-
# @param [Hash<Symbol, Object>] values
|
32
|
-
# Map of names to values to dump.
|
33
|
-
#
|
34
|
-
# @return
|
35
|
-
# Whatever `log.debug` returns.
|
36
|
-
#
|
37
|
-
def self.dump *message, **values
|
38
|
-
|
39
|
-
max_name_length = values.
|
40
|
-
keys.
|
41
|
-
map { |name| name.to_s.length }.
|
42
|
-
max
|
43
|
-
|
44
|
-
values_str = values.
|
45
|
-
map { |name, value|
|
46
|
-
name_str = "%-#{ max_name_length + 2 }s" % "#{ name }:"
|
47
|
-
|
48
|
-
" #{ name_str } #{ value.inspect } (#{ value.class })"
|
49
|
-
}.
|
50
|
-
join( "\n" )
|
51
|
-
|
52
|
-
message_str = message.
|
53
|
-
map { |part|
|
54
|
-
case part
|
55
|
-
when String
|
56
|
-
part
|
57
|
-
else
|
58
|
-
part.inspect
|
59
|
-
end
|
60
|
-
}.
|
61
|
-
join( " " )
|
62
|
-
|
63
|
-
log_str = "Values:\n\n#{ values_str }\n"
|
64
|
-
log_str = "#{ message_str }\n\n#{ log_str }" unless message_str.empty?
|
65
|
-
|
66
|
-
log.debug "yard-link_stdlib: #{ log_str }"
|
67
|
-
end # .dump
|
68
|
-
|
69
|
-
|
70
|
-
# /Namespace
|
71
|
-
# ========================================================================
|
72
|
-
|
73
|
-
end # module LinkStdlib
|
74
|
-
end # module YARD
|