bitclust-core 1.2.5 → 1.2.6
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/data/bitclust/template.offline/class +4 -1
- data/data/bitclust/template.offline/doc +2 -1
- data/data/bitclust/template.offline/function +2 -1
- data/data/bitclust/template.offline/layout +4 -1
- data/data/bitclust/template.offline/library +2 -1
- data/data/bitclust/template.offline/method +1 -0
- data/lib/bitclust/classentry.rb +6 -2
- data/lib/bitclust/compat.rb +8 -0
- data/lib/bitclust/docentry.rb +3 -2
- data/lib/bitclust/entry.rb +3 -0
- data/lib/bitclust/functionentry.rb +8 -7
- data/lib/bitclust/functionreferenceparser.rb +2 -0
- data/lib/bitclust/libraryentry.rb +1 -0
- data/lib/bitclust/lineinput.rb +6 -2
- data/lib/bitclust/methoddatabase.rb +3 -0
- data/lib/bitclust/methodentry.rb +5 -4
- data/lib/bitclust/preprocessor.rb +4 -0
- data/lib/bitclust/rdcompiler.rb +4 -0
- data/lib/bitclust/rrdparser.rb +18 -15
- data/lib/bitclust/screen.rb +9 -2
- data/lib/bitclust/subcommands/statichtml_command.rb +9 -0
- data/lib/bitclust/version.rb +1 -1
- data/test/test_entry.rb +14 -1
- data/test/test_rrdparser.rb +16 -0
- metadata +14 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9351ae4c31a9070629d3caca3ea7d7dbc1b323ca1b5840de4aa78d6fd482fe7b
|
4
|
+
data.tar.gz: b80b4414d21ee137c425025778ad750122835b5294ab55012ed7debba0d0ea89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: def1f2a7b7b27922f0dfd2b3559a273e3289b46407be4e478a6af86a05a579ae7d3e6de8321474589fb29aa2a71359bd4dfb76691e73d27f972922b99edd1df3
|
7
|
+
data.tar.gz: 39af952569f246199ec9d258ede5faa937241aeb790368fb8d629aa31531ae0c6277e8c9b80f4e95b608d1131021dfebbd29c321f24519d8d8072d7820a465a2
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<%
|
2
2
|
@title = "#{@entry.type} #{@entry.name}"
|
3
3
|
@description = @entry.description
|
4
|
+
@edit_url = edit_url(@entry.source_location) if @conf[:edit_base_url] && @entry.source_location
|
4
5
|
%>
|
5
6
|
<% if @conf[:canonical_base_url] %>
|
6
7
|
<script type="application/ld+json">
|
@@ -46,7 +47,7 @@
|
|
46
47
|
</ol>
|
47
48
|
</nav>
|
48
49
|
<% headline_init %>
|
49
|
-
<%= headline("#{@entry.type} #{@entry.name}" + @entry.ancestors[1..@alevel].map{|c| " + #{c.name}" }.join) %>
|
50
|
+
<%= headline("#{@entry.type} #{@entry.name}" + @entry.ancestors[1..@alevel].map{|c| " + #{c.name}" }.join, edit_url: @edit_url) %>
|
50
51
|
</header>
|
51
52
|
|
52
53
|
<main>
|
@@ -152,9 +153,11 @@ displayed_methods = Set.new(ents.instance_methods.map(&:name))
|
|
152
153
|
<%= headline(_("Ancestor Methods")) %>
|
153
154
|
<dl>
|
154
155
|
<% ancestors.each do |c|
|
156
|
+
undefined_methods = @entry.partitioned_entries.undefined
|
155
157
|
methods = c.partitioned_entries(@alevel).instance_methods
|
156
158
|
.flat_map { |m| m.names.map { |n| [n, m] } }
|
157
159
|
.reject { |name,| displayed_methods.include?(name) }
|
160
|
+
.reject { |name,| undefined_methods.any? { |m| m.names.include?(name) } }
|
158
161
|
.sort
|
159
162
|
next if methods.empty? %>
|
160
163
|
<dt><%= _('Ancestor Methods %s', c.name) %></dt>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<%
|
2
2
|
@title = @entry.title
|
3
3
|
@description = @entry.description
|
4
|
+
@edit_url = edit_url(@entry.source_location) if @conf[:edit_base_url] && @entry.source_location
|
4
5
|
%>
|
5
6
|
<% if @conf[:canonical_base_url] %>
|
6
7
|
<script type="application/ld+json">
|
@@ -39,7 +40,7 @@
|
|
39
40
|
</ol>
|
40
41
|
</nav>
|
41
42
|
<% headline_init %>
|
42
|
-
<%= headline(@entry.title) %>
|
43
|
+
<%= headline(@entry.title, edit_url: @edit_url) %>
|
43
44
|
</header>
|
44
45
|
|
45
46
|
<main>
|
@@ -2,6 +2,7 @@
|
|
2
2
|
entry = @entry
|
3
3
|
@title = "#{entry.type_label} #{entry.label}"
|
4
4
|
@description = @entry.description
|
5
|
+
@edit_url = edit_url(@entry.source_location) if @conf[:edit_base_url] && @entry.source_location
|
5
6
|
%>
|
6
7
|
<% if @conf[:canonical_base_url] %>
|
7
8
|
<script type="application/ld+json">
|
@@ -40,7 +41,7 @@
|
|
40
41
|
</ol>
|
41
42
|
</nav>
|
42
43
|
<% headline_init %>
|
43
|
-
<%= headline("#{entry.type_label} #{entry.label}") %>
|
44
|
+
<%= headline("#{entry.type_label} #{entry.label}", edit_url: @edit_url) %>
|
44
45
|
</header>
|
45
46
|
|
46
47
|
<main>
|
@@ -22,7 +22,10 @@
|
|
22
22
|
<img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/3.0/88x31.png" />
|
23
23
|
</a>
|
24
24
|
|
25
|
-
|
25
|
+
<a href="https://github.com/rurema/doctree/issues/new" id="feedback-link">フィードバックを送る</a>
|
26
|
+
<% if defined?(@edit_url) && @edit_url %>
|
27
|
+
/ <a href="<%= @edit_url %>">このマニュアルを編集する</a>
|
28
|
+
<% end %>
|
26
29
|
<script>if (window.URLSearchParams) { document.getElementById("feedback-link").search = new URLSearchParams({'body': document.location}); }</script>
|
27
30
|
</footer>
|
28
31
|
</body>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<%
|
2
2
|
@title = "library #{@entry.name}"
|
3
3
|
@description = @entry.description
|
4
|
+
@edit_url = edit_url(@entry.source_location) if @conf[:edit_base_url] && @entry.source_location
|
4
5
|
%>
|
5
6
|
<% if @conf[:canonical_base_url] %>
|
6
7
|
<script type="application/ld+json">
|
@@ -39,7 +40,7 @@
|
|
39
40
|
</ol>
|
40
41
|
</nav>
|
41
42
|
<% headline_init %>
|
42
|
-
<%= headline(@entry.id == '_builtin' ? _('Builtin Library') : "library #{@entry.name}") %>
|
43
|
+
<%= headline(@entry.id == '_builtin' ? _('Builtin Library') : "library #{@entry.name}", edit_url: @edit_url) %>
|
43
44
|
</header>
|
44
45
|
|
45
46
|
<main>
|
data/lib/bitclust/classentry.rb
CHANGED
@@ -88,6 +88,7 @@ module BitClust
|
|
88
88
|
property :aliases, '[ClassEntry]'
|
89
89
|
property :aliasof, 'ClassEntry'
|
90
90
|
property :source, 'String'
|
91
|
+
property :source_location, 'Location'
|
91
92
|
}
|
92
93
|
|
93
94
|
# FIXME: do not use superclass property aliasing (#6826)
|
@@ -253,7 +254,7 @@ module BitClust
|
|
253
254
|
:instance_methods, :private_instance_methods,
|
254
255
|
:module_functions,
|
255
256
|
:constants, :special_variables,
|
256
|
-
:added)
|
257
|
+
:added, :undefined)
|
257
258
|
|
258
259
|
def partitioned_entries(level = 0)
|
259
260
|
s = []; spv = []
|
@@ -261,6 +262,7 @@ module BitClust
|
|
261
262
|
mf = []
|
262
263
|
c = []; v = []
|
263
264
|
added = []
|
265
|
+
undefined = []
|
264
266
|
entries(level).sort_by(&:name).each do |m|
|
265
267
|
case m.kind
|
266
268
|
when :defined, :redefined
|
@@ -280,9 +282,11 @@ module BitClust
|
|
280
282
|
end
|
281
283
|
when :added
|
282
284
|
added.push m
|
285
|
+
when :undefined
|
286
|
+
undefined.push m
|
283
287
|
end
|
284
288
|
end
|
285
|
-
Parts.new(s,spv, i,ipv, mf, c, v, added)
|
289
|
+
Parts.new(s,spv, i,ipv, mf, c, v, added, undefined)
|
286
290
|
end
|
287
291
|
|
288
292
|
def singleton_methods(level = 0)
|
data/lib/bitclust/compat.rb
CHANGED
@@ -26,6 +26,14 @@ unless String.method_defined?(:bytesize)
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
unless String.method_defined?(:match?)
|
30
|
+
class String
|
31
|
+
def match?(pattern, pos = 0)
|
32
|
+
!match(pattern, pos).nil?
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
29
37
|
def fopen(*args, &block)
|
30
38
|
option = args[1]
|
31
39
|
if option and !Object.const_defined?(:Encoding)
|
data/lib/bitclust/docentry.rb
CHANGED
data/lib/bitclust/entry.rb
CHANGED
@@ -98,6 +98,7 @@ module BitClust
|
|
98
98
|
when '[LibraryEntry]' then "[]"
|
99
99
|
when '[ClassEntry]' then "[]"
|
100
100
|
when '[MethodEntry]' then "[]"
|
101
|
+
when 'Location' then "nil"
|
101
102
|
else
|
102
103
|
raise "must not happen: @type=#{@type.inspect}"
|
103
104
|
end
|
@@ -115,6 +116,7 @@ module BitClust
|
|
115
116
|
when '[LibraryEntry]' then "restore_libraries(h['#{@name}'])"
|
116
117
|
when '[ClassEntry]' then "restore_classes(h['#{@name}'])"
|
117
118
|
when '[MethodEntry]' then "restore_methods(h['#{@name}'])"
|
119
|
+
when 'Location' then "h['#{@name}']&.tap { |loc| break if loc.empty?; break Location.new(*loc.split(?:)) }"
|
118
120
|
else
|
119
121
|
raise "must not happen: @type=#{@type.inspect}"
|
120
122
|
end
|
@@ -132,6 +134,7 @@ module BitClust
|
|
132
134
|
when '[LibraryEntry]' then "serialize_entries(@#{@name})"
|
133
135
|
when '[ClassEntry]' then "serialize_entries(@#{@name})"
|
134
136
|
when '[MethodEntry]' then "serialize_entries(@#{@name})"
|
137
|
+
when 'Location' then "@#@name.to_s"
|
135
138
|
else
|
136
139
|
raise "must not happen: @type=#{@type.inspect}"
|
137
140
|
end
|
@@ -37,13 +37,14 @@ module BitClust
|
|
37
37
|
end
|
38
38
|
|
39
39
|
persistent_properties {
|
40
|
-
property :filename,
|
41
|
-
property :macro,
|
42
|
-
property :private,
|
43
|
-
property :type,
|
44
|
-
property :name,
|
45
|
-
property :params,
|
46
|
-
property :source,
|
40
|
+
property :filename, 'String'
|
41
|
+
property :macro, 'bool'
|
42
|
+
property :private, 'bool'
|
43
|
+
property :type, 'String'
|
44
|
+
property :name, 'String'
|
45
|
+
property :params, 'String'
|
46
|
+
property :source, 'String'
|
47
|
+
property :source_location, 'Location'
|
47
48
|
}
|
48
49
|
|
49
50
|
attr_reader :id
|
@@ -34,6 +34,7 @@ module BitClust
|
|
34
34
|
|
35
35
|
def parse(f, filename, params = {})
|
36
36
|
@filename = filename
|
37
|
+
@path = f.path
|
37
38
|
s = Preprocessor.read(f, params)
|
38
39
|
file_entries LineInput.for_string(s)
|
39
40
|
@db.functions
|
@@ -59,6 +60,7 @@ module BitClust
|
|
59
60
|
f.name = h.name
|
60
61
|
f.params = h.params
|
61
62
|
f.source = body.join('')
|
63
|
+
f.source_location = body[0]&.location&.tap {|loc| break Location.new(@path, loc.line - 1) }
|
62
64
|
}
|
63
65
|
end
|
64
66
|
|
data/lib/bitclust/lineinput.rb
CHANGED
@@ -9,6 +9,7 @@
|
|
9
9
|
#
|
10
10
|
|
11
11
|
require 'stringio'
|
12
|
+
require 'bitclust/parseutils'
|
12
13
|
|
13
14
|
# Utility class for line-wise file parsing
|
14
15
|
class LineInput
|
@@ -34,7 +35,7 @@ class LineInput
|
|
34
35
|
end
|
35
36
|
|
36
37
|
def path
|
37
|
-
@input.path
|
38
|
+
@input.path if @input.respond_to?(:path)
|
38
39
|
end
|
39
40
|
|
40
41
|
def name
|
@@ -52,12 +53,15 @@ class LineInput
|
|
52
53
|
def gets
|
53
54
|
unless @buf.empty?
|
54
55
|
@lineno += 1
|
55
|
-
|
56
|
+
line = @buf.pop
|
57
|
+
line&.location ||= BitClust::Location.new(path, @lineno)
|
58
|
+
return line
|
56
59
|
end
|
57
60
|
return nil if @eof_p # to avoid ARGF blocking.
|
58
61
|
line = @input.gets
|
59
62
|
@eof_p = true unless line
|
60
63
|
@lineno += 1
|
64
|
+
line&.location ||= BitClust::Location.new(path, @lineno)
|
61
65
|
line
|
62
66
|
end
|
63
67
|
|
@@ -175,14 +175,17 @@ module BitClust
|
|
175
175
|
end
|
176
176
|
|
177
177
|
def copy_doc
|
178
|
+
root_path = Pathname.new(@root).expand_path
|
178
179
|
Dir.glob("#{@root}/../../doc/**/*.rd").each do |f|
|
179
180
|
if %r!\A#{Regexp.escape(@root)}/\.\./\.\./doc/([-\./\w]+)\.rd\z! =~ f
|
180
181
|
id = libname2id($1)
|
181
182
|
se = DocEntry.new(self, id)
|
182
183
|
s = Preprocessor.read(f, properties)
|
183
184
|
title, source = RRDParser.split_doc(s)
|
185
|
+
relative_path = Pathname.new(f).expand_path(@root).relative_path_from(root_path)
|
184
186
|
se.title = title
|
185
187
|
se.source = source
|
188
|
+
se.source_location = Location.new(relative_path, 1)
|
186
189
|
se.save
|
187
190
|
end
|
188
191
|
end
|
data/lib/bitclust/methodentry.rb
CHANGED
@@ -95,10 +95,11 @@ module BitClust
|
|
95
95
|
attr_writer :klass
|
96
96
|
|
97
97
|
persistent_properties {
|
98
|
-
property :names,
|
99
|
-
property :visibility,
|
100
|
-
property :kind,
|
101
|
-
property :source,
|
98
|
+
property :names, '[String]'
|
99
|
+
property :visibility, 'Symbol' # :public | :private | :protected
|
100
|
+
property :kind, 'Symbol' # :defined | :added | :redefined
|
101
|
+
property :source, 'String'
|
102
|
+
property :source_location, 'Location'
|
102
103
|
}
|
103
104
|
|
104
105
|
def inspect
|
data/lib/bitclust/rdcompiler.rb
CHANGED
@@ -393,6 +393,10 @@ module BitClust
|
|
393
393
|
string a_href(@urlmapper.method_url(methodid2specstring(@method.id)), "permalink")
|
394
394
|
string ']['
|
395
395
|
string rdoc_link(@method.id, @option[:database].properties["version"])
|
396
|
+
if @option[:edit_base_url] && @method.source_location
|
397
|
+
string ']['
|
398
|
+
string a_href(@urlmapper.edit_url(@method.source_location), 'edit')
|
399
|
+
end
|
396
400
|
string ']</span>'
|
397
401
|
end
|
398
402
|
if @method and not @method.defined?
|
data/lib/bitclust/rrdparser.rb
CHANGED
@@ -10,6 +10,7 @@
|
|
10
10
|
require 'bitclust/compat'
|
11
11
|
require 'bitclust/preprocessor'
|
12
12
|
require 'bitclust/methodid'
|
13
|
+
require 'bitclust/methoddatabase'
|
13
14
|
require 'bitclust/lineinput'
|
14
15
|
require 'bitclust/parseutils'
|
15
16
|
require 'bitclust/nameutils'
|
@@ -69,7 +70,7 @@ module BitClust
|
|
69
70
|
|
70
71
|
def parse_file(path, libname, params = {})
|
71
72
|
fopen(path, 'r:UTF-8') {|f|
|
72
|
-
return parse(f, libname, params)
|
73
|
+
return parse(f, libname, params).tap { |lib| lib.source_location = Location.new(path, 1) }
|
73
74
|
}
|
74
75
|
end
|
75
76
|
|
@@ -113,14 +114,14 @@ module BitClust
|
|
113
114
|
type, name, superclass = *parse_level1_header(line)
|
114
115
|
case type
|
115
116
|
when 'class'
|
116
|
-
@context.define_class name, (superclass || 'Object')
|
117
|
+
@context.define_class name, (superclass || 'Object'), location: line.location
|
117
118
|
read_class_body f
|
118
119
|
when 'module'
|
119
120
|
parse_error "superclass given for module", line if superclass
|
120
|
-
@context.define_module name
|
121
|
+
@context.define_module name, location: line.location
|
121
122
|
read_class_body f
|
122
123
|
when 'object'
|
123
|
-
@context.define_object name, superclass
|
124
|
+
@context.define_object name, superclass, location: line.location
|
124
125
|
read_object_body f
|
125
126
|
when 'reopen'
|
126
127
|
@context.reopen_class name
|
@@ -348,30 +349,31 @@ module BitClust
|
|
348
349
|
@library.sublibrary @db.get_library(libname)
|
349
350
|
end
|
350
351
|
|
351
|
-
def define_class(name, supername)
|
352
|
+
def define_class(name, supername, location: nil)
|
352
353
|
if @db.properties['version'] >= "1.9.0"
|
353
354
|
top = 'BasicObject'
|
354
355
|
else
|
355
356
|
top = 'Object'
|
356
357
|
end
|
357
358
|
superclass = (name == top ? nil : @db.get_class(supername))
|
358
|
-
register_class :class, name, superclass
|
359
|
+
register_class :class, name, superclass, location: location
|
359
360
|
end
|
360
361
|
|
361
|
-
def define_module(name)
|
362
|
-
register_class :module, name, nil
|
362
|
+
def define_module(name, location: nil)
|
363
|
+
register_class :module, name, nil, location: location
|
363
364
|
end
|
364
365
|
|
365
|
-
def define_object(name, singleton_object_class)
|
366
|
+
def define_object(name, singleton_object_class, location: nil)
|
366
367
|
singleton_object_class = @db.get_class(singleton_object_class) if singleton_object_class
|
367
|
-
register_class :object, name, singleton_object_class
|
368
|
+
register_class :object, name, singleton_object_class, location: location
|
368
369
|
end
|
369
370
|
|
370
|
-
def register_class(type, name, superclass)
|
371
|
+
def register_class(type, name, superclass, location: nil)
|
371
372
|
@klass = @db.open_class(name) {|c|
|
372
373
|
c.type = type
|
373
374
|
c.superclass = superclass
|
374
375
|
c.library = @library
|
376
|
+
c.source_location = location
|
375
377
|
@library.add_class c
|
376
378
|
}
|
377
379
|
@kind = :defined
|
@@ -448,10 +450,11 @@ module BitClust
|
|
448
450
|
def define_method(chunk)
|
449
451
|
id = method_id(chunk)
|
450
452
|
@db.open_method(id) {|m|
|
451
|
-
m.names
|
452
|
-
m.kind
|
453
|
-
m.visibility
|
454
|
-
m.source
|
453
|
+
m.names = chunk.names.sort
|
454
|
+
m.kind = chunk.source.match?(/^@undef$/) ? :undefined : @kind
|
455
|
+
m.visibility = @visibility || :public
|
456
|
+
m.source = chunk.source
|
457
|
+
m.source_location = chunk.source.location
|
455
458
|
case @kind
|
456
459
|
when :added, :redefined
|
457
460
|
@library.add_method m
|
data/lib/bitclust/screen.rb
CHANGED
@@ -368,6 +368,10 @@ module BitClust
|
|
368
368
|
@urlmapper.canonical_url(current_url)
|
369
369
|
end
|
370
370
|
|
371
|
+
def edit_url(location)
|
372
|
+
@urlmapper.edit_url(location)
|
373
|
+
end
|
374
|
+
|
371
375
|
def opensearchdescription_url
|
372
376
|
@urlmapper.opensearchdescription_url
|
373
377
|
end
|
@@ -396,8 +400,11 @@ module BitClust
|
|
396
400
|
@hlevel -= 1
|
397
401
|
end
|
398
402
|
|
399
|
-
def headline(str)
|
400
|
-
|
403
|
+
def headline(str, edit_url: nil)
|
404
|
+
edit_link = edit_url ? <<~HTML : ''
|
405
|
+
<span class="permalink">[<a href="#{edit_url}">edit</a>]</span>
|
406
|
+
HTML
|
407
|
+
"<h#{@hlevel}>#{escape_html(str)}</h#{@hlevel}>" + edit_link
|
401
408
|
end
|
402
409
|
|
403
410
|
def headline_noescape(str)
|
@@ -28,6 +28,7 @@ module BitClust
|
|
28
28
|
@suffix = h[:suffix]
|
29
29
|
@fs_casesensitive = h[:fs_casesensitive]
|
30
30
|
@canonical_base_url = h[:canonical_base_url]
|
31
|
+
@edit_base_url = h[:edit_base_url]
|
31
32
|
end
|
32
33
|
|
33
34
|
def library_url(name)
|
@@ -87,6 +88,10 @@ module BitClust
|
|
87
88
|
(@canonical_base_url + "/#{current_url}").sub(@bitclust_html_base, "").sub(/([^:])\/\/+/, "\\1/")
|
88
89
|
end
|
89
90
|
|
91
|
+
def edit_url(location)
|
92
|
+
"#{@edit_base_url}/#{location.file}#L#{location.line}".sub(/([^:])\/\/+/, "\\1/")
|
93
|
+
end
|
94
|
+
|
90
95
|
def encodename_package(str)
|
91
96
|
if @fs_casesensitive
|
92
97
|
encodename_url(str)
|
@@ -141,6 +146,9 @@ module BitClust
|
|
141
146
|
@parser.on('--canonical-base-url=URL', 'Canonical base URL') do |url|
|
142
147
|
@canonical_base_url = url
|
143
148
|
end
|
149
|
+
@parser.on('--edit-base-url=URL', 'Edit base URL') do |url|
|
150
|
+
@edit_base_url = url
|
151
|
+
end
|
144
152
|
@parser.on('--tracking-id=ID', 'Google Tag Manager Tracking ID') do |id|
|
145
153
|
@gtm_tracking_id = id
|
146
154
|
end
|
@@ -225,6 +233,7 @@ module BitClust
|
|
225
233
|
:tochm_mode => true,
|
226
234
|
:fs_casesensitive => @fs_casesensitive,
|
227
235
|
:canonical_base_url => @canonical_base_url,
|
236
|
+
:edit_base_url => @edit_base_url,
|
228
237
|
:gtm_tracking_id => @gtm_tracking_id,
|
229
238
|
:meta_robots_content => @meta_robots_content,
|
230
239
|
:stop_on_syntax_error => @stop_on_syntax_error,
|
data/lib/bitclust/version.rb
CHANGED
data/test/test_entry.rb
CHANGED
@@ -9,6 +9,14 @@ alias HogeHoge
|
|
9
9
|
alias HogeHogeHoge
|
10
10
|
== Class Methods
|
11
11
|
--- hoge
|
12
|
+
hoge
|
13
|
+
--- fuga
|
14
|
+
@undef
|
15
|
+
fuga
|
16
|
+
== Instance Methods
|
17
|
+
--- fugafuga
|
18
|
+
@undef
|
19
|
+
fugafuga
|
12
20
|
= class Bar < Hoge
|
13
21
|
== Class Methods
|
14
22
|
--- bar
|
@@ -19,7 +27,7 @@ HERE
|
|
19
27
|
end
|
20
28
|
|
21
29
|
def test_entries
|
22
|
-
assert_equal(['bar', 'hoge'],
|
30
|
+
assert_equal(['bar', 'fuga', 'fugafuga', 'hoge'],
|
23
31
|
@lib.fetch_class("Bar").entries(1).map{|e| e.name}.sort)
|
24
32
|
end
|
25
33
|
|
@@ -45,6 +53,11 @@ HERE
|
|
45
53
|
assert(@lib.fetch_class("ErrErr").error_class?)
|
46
54
|
end
|
47
55
|
|
56
|
+
def test_partitioned_entries
|
57
|
+
parts = @lib.fetch_class('Hoge').partitioned_entries
|
58
|
+
assert_equal(['fuga', 'fugafuga'], parts.undefined.map(&:name))
|
59
|
+
end
|
60
|
+
|
48
61
|
def test_superclass
|
49
62
|
assert('Exception', @lib.fetch_class("Err").superclass.name)
|
50
63
|
assert('Exception', @lib.fetch_class("ErrErr").superclass.name)
|
data/test/test_rrdparser.rb
CHANGED
@@ -23,4 +23,20 @@ a
|
|
23
23
|
HERE
|
24
24
|
assert_equal(["", "==[a:hoge]hoge\na\n"], result)
|
25
25
|
end
|
26
|
+
|
27
|
+
def test_undef
|
28
|
+
result = BitClust::RRDParser.parse(<<HERE, 'dummy')
|
29
|
+
= module Dummy
|
30
|
+
== Instance Methods
|
31
|
+
--- test_undef
|
32
|
+
|
33
|
+
@undef
|
34
|
+
|
35
|
+
このメソッドは利用できない
|
36
|
+
|
37
|
+
HERE
|
38
|
+
_library, methoddatabase = result
|
39
|
+
test_undef_spec = BitClust::MethodSpec.parse('Dummy#test_undef')
|
40
|
+
assert_equal(:undefined, methoddatabase.get_method(test_undef_spec).kind)
|
41
|
+
end
|
26
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitclust-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/rurema
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -237,6 +237,7 @@ metadata:
|
|
237
237
|
documentation_uri: https://github.com/rurema/doctree/wiki
|
238
238
|
homepage_uri: https://docs.ruby-lang.org/ja/
|
239
239
|
source_code_uri: https://github.com/rurema/bitclust
|
240
|
+
github_repo: https://github.com/rurema/bitclust
|
240
241
|
wiki_uri: https://github.com/rurema/doctree/wiki
|
241
242
|
post_install_message:
|
242
243
|
rdoc_options: []
|
@@ -258,19 +259,19 @@ signing_key:
|
|
258
259
|
specification_version: 4
|
259
260
|
summary: BitClust is a rurema document processor.
|
260
261
|
test_files:
|
261
|
-
- test/test_functionreferenceparser.rb
|
262
|
-
- test/test_refsdatabase.rb
|
263
|
-
- test/test_rrdparser.rb
|
264
262
|
- test/test_syntax_highlighter.rb
|
265
|
-
- test/test_methoddatabase.rb
|
266
|
-
- test/test_simplesearcher.rb
|
267
|
-
- test/test_nameutils.rb
|
268
|
-
- test/run_test.rb
|
269
263
|
- test/test_methodsignature.rb
|
270
|
-
- test/test_rdcompiler.rb
|
271
264
|
- test/test_functiondatabase.rb
|
272
|
-
- test/test_runner.rb
|
273
|
-
- test/test_bitclust.rb
|
274
|
-
- test/test_entry.rb
|
275
265
|
- test/test_preprocessor.rb
|
266
|
+
- test/test_refsdatabase.rb
|
267
|
+
- test/test_nameutils.rb
|
268
|
+
- test/test_bitclust.rb
|
269
|
+
- test/test_simplesearcher.rb
|
270
|
+
- test/test_rdcompiler.rb
|
276
271
|
- test/test_libraryentry.rb
|
272
|
+
- test/test_runner.rb
|
273
|
+
- test/test_rrdparser.rb
|
274
|
+
- test/test_methoddatabase.rb
|
275
|
+
- test/test_functionreferenceparser.rb
|
276
|
+
- test/run_test.rb
|
277
|
+
- test/test_entry.rb
|