yard-link_stdlib 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: 35e1ca61be63e6ca2ec8b75762cf24cb2139e375
4
- data.tar.gz: c5be9c26529b4fea0ebb8e32f84603090bf2b193
3
+ metadata.gz: 8b2891135626961fd0982cc28dc8eb233937afef
4
+ data.tar.gz: b8329bd8d7dd34f6d63e578f96f7b0d050506625
5
5
  SHA512:
6
- metadata.gz: 374248e1ffd21df5717efc40de3dccbd7bc0ae62d804ce4acb36f84776cfa9293ea620547954d497c407ec91e040d408ca550dd831d5a375d6fcf4e2c6aca1e3
7
- data.tar.gz: f4638c958009fbeccf3c6fedbdcac2ba14af45d21286ac6ac0988c6b94e093c1b7db7983e5a067460b1b2e8e4f96fab935f8f1615f0e0884e36b96b0abc2302d
6
+ metadata.gz: 891798c75cffee0e471498618ae9a77e4fd74ef355405a3e15f8741924661e39f85ddcd3bd45c0fc84ec2d9880516cb3cfeffad1ca81bbe499e1b3466bf71456
7
+ data.tar.gz: dbfa391daf2a95683d21442e62eb2e3935e834eb3eaf216b4f3734add748159bfea58eab44ef441ad924a1dbcaaf21ec498fe1a0fe5bcb60db0424bd36aab1d0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
data/bin/make_map.rb CHANGED
@@ -90,6 +90,45 @@ class RDoc::RDoc
90
90
  end # class RDoc::RDoc
91
91
 
92
92
 
93
+ def load_pry
94
+ require 'pry'
95
+ # In most project you probably *don't* want to load the RC file,
96
+ # as it may have dependencies
97
+ Pry.config.should_load_rc = false
98
+ end
99
+
100
+
101
+ # Add pre-defined global variables and constants, which are hand-documented in
102
+ # RUBY_SRC/doc/globals.rdoc
103
+ #
104
+ # and available on the site at
105
+ #
106
+ # https://docs.ruby-lang.org/en/<MAJOR.MINOR.0>/globals_rdoc.html
107
+ #
108
+ # like https://docs.ruby-lang.org/en/2.3.0/globals_rdoc.html
109
+ #
110
+ #
111
+ def add_globals_and_constants map
112
+ rdoc_path = './doc/globals.rdoc'
113
+ html_path = 'globals_rdoc.html'
114
+
115
+ unless File.file? rdoc_path
116
+ warn "Can't find globals and constants RDoc file at " +
117
+ "#{ File.expand_path rdoc_path }"
118
+ warn "Pre-defined global variables and constants will NOT be available" +
119
+ "in this map!"
120
+ return
121
+ end
122
+
123
+ contents = File.read rdoc_path
124
+
125
+ contents.scan /^(\S+)::\s/ do |(name)|
126
+ map[ name ] = html_path
127
+ # puts "Added #{ name.inspect } => #{ html_path }"
128
+ end
129
+ end
130
+
131
+
93
132
  def main args
94
133
  src = Pathname.new( args.shift ).expand_path
95
134
  dest = Pathname.new( args.shift ).expand_path
@@ -112,8 +151,12 @@ def main args
112
151
  rd.almost_document args
113
152
 
114
153
  map = {}
115
-
154
+
155
+ add_globals_and_constants map
156
+
157
+ # Add all classes and modules
116
158
  rd.store.all_classes_and_modules.each do |mod|
159
+ # Example of how to stop and inspect a particular module when debugging
117
160
  # if mod.full_name == 'Gem::Specification'
118
161
  # require 'pry'
119
162
  # Pry.config.should_load_rc = false
@@ -129,6 +172,7 @@ def main args
129
172
  mod.instance_method_list,
130
173
  ].flatten.each { |entry|
131
174
  map[ entry.full_name ] = entry.path
175
+ # puts "Added #{ entry.full_name.inspect } => #{ entry.path }"
132
176
  }
133
177
 
134
178
  end
Binary file
Binary file
Binary file
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
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - nrser
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-23 00:00:00.000000000 Z
11
+ date: 2019-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard