bitclust-core 1.6.1 → 1.8.0
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/Rakefile +1 -0
- data/data/bitclust/catalog/ja_JP.UTF-8 +4 -2
- data/data/bitclust/template/class-index +0 -1
- data/data/bitclust/template/function-index +1 -0
- data/data/bitclust/template/layout +1 -0
- data/data/bitclust/template.epub/class +5 -5
- data/data/bitclust/template.epub/class-index +0 -1
- data/data/bitclust/template.epub/contents +7 -4
- data/data/bitclust/template.epub/layout +4 -4
- data/data/bitclust/template.offline/class-index +0 -1
- data/data/bitclust/template.offline/function-index +1 -0
- data/data/bitclust/template.offline/layout +3 -0
- data/lib/bitclust/classentry.rb +1 -1
- data/lib/bitclust/docentry.rb +1 -1
- data/lib/bitclust/functionentry.rb +1 -1
- data/lib/bitclust/generators/epub.rb +69 -5
- data/lib/bitclust/irb.rb +74 -0
- data/lib/bitclust/markdown_bridge.rb +11 -6
- data/lib/bitclust/markdown_exporter.rb +311 -0
- data/lib/bitclust/markdown_tree.rb +118 -11
- data/lib/bitclust/mdcompiler.rb +15 -1
- data/lib/bitclust/mdparser.rb +42 -1
- data/lib/bitclust/methoddatabase.rb +17 -4
- data/lib/bitclust/methodentry.rb +24 -0
- data/lib/bitclust/methodsignature.rb +1 -1
- data/lib/bitclust/nameutils.rb +13 -0
- data/lib/bitclust/preprocessor.rb +4 -37
- data/lib/bitclust/rbs_overload_matcher.rb +179 -0
- data/lib/bitclust/rbs_sig_importer.rb +276 -0
- data/lib/bitclust/rbs_signatures.rb +125 -0
- data/lib/bitclust/rdcompiler.rb +12 -1
- data/lib/bitclust/remote.rb +405 -0
- data/lib/bitclust/runner.rb +7 -10
- data/lib/bitclust/screen.rb +6 -1
- data/lib/bitclust/search_index_generator.rb +28 -10
- data/lib/bitclust/searcher.rb +54 -25
- data/lib/bitclust/subcommands/chm_command.rb +1 -1
- data/lib/bitclust/subcommands/epub_command.rb +2 -2
- data/lib/bitclust/subcommands/extract_command.rb +7 -0
- data/lib/bitclust/subcommands/htmlfile_command.rb +7 -0
- data/lib/bitclust/subcommands/methods_command.rb +5 -28
- data/lib/bitclust/subcommands/query_command.rb +1 -0
- data/lib/bitclust/subcommands/rbssig_command.rb +99 -0
- data/lib/bitclust/subcommands/server_command.rb +21 -10
- data/lib/bitclust/subcommands/setup_command.rb +32 -11
- data/lib/bitclust/subcommands/statichtml_command.rb +59 -0
- data/lib/bitclust/syntax_highlighter.rb +65 -4
- data/lib/bitclust/user_dirs.rb +62 -0
- data/lib/bitclust/version.rb +1 -1
- data/lib/bitclust-irb.rb +2 -0
- data/test/test_chm_command.rb +22 -0
- data/test/test_epub_command.rb +60 -0
- data/test/test_epub_generator.rb +330 -0
- data/test/test_extract_command.rb +45 -0
- data/test/test_irb_plugin.rb +212 -0
- data/test/test_link_checker.rb +1 -1
- data/test/test_markdown_bridge.rb +35 -0
- data/test/test_markdown_exporter.rb +260 -0
- data/test/test_markdown_tree.rb +144 -0
- data/test/test_mdcompiler.rb +47 -5
- data/test/test_mdparser.rb +223 -4
- data/test/test_methodentry.rb +111 -0
- data/test/test_methods_command.rb +32 -0
- data/test/test_methodsignature.rb +3 -1
- data/test/test_opensearchdescription_screen.rb +39 -0
- data/test/test_preprocessor.rb +26 -0
- data/test/test_query_command.rb +30 -0
- data/test/test_rbs_overload_matcher.rb +170 -0
- data/test/test_rbs_sig_importer.rb +237 -0
- data/test/test_rbssig_command.rb +186 -0
- data/test/test_rdcompiler.rb +99 -1
- data/test/test_remote.rb +374 -0
- data/test/test_runner.rb +61 -1
- data/test/test_search_index_generator.rb +81 -0
- data/test/test_searcher.rb +63 -0
- data/test/test_server_command.rb +41 -0
- data/test/test_setup_command.rb +164 -0
- data/test/test_statichtml_command.rb +137 -0
- data/test/test_syntax_highlighter.rb +124 -0
- data/test/test_user_dirs.rb +62 -0
- data/theme/default/js/run.js +14 -0
- data/theme/default/js/search_init.js +3 -1
- data/theme/default/js/search_page.js +7 -1
- data/theme/default/js/version_switcher.js +147 -0
- data/theme/default/search.css +21 -0
- data/theme/default/style.css +83 -7
- data/theme/lillia/style.css +26 -0
- metadata +71 -2
- data/lib/bitclust/ridatabase.rb +0 -359
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'test/unit'
|
|
3
|
+
require 'tmpdir'
|
|
4
|
+
require 'fileutils'
|
|
5
|
+
require 'bitclust/user_dirs'
|
|
6
|
+
|
|
7
|
+
# 設定・DB・キャッシュの置き場所(XDG 準拠+従来の ~/.bitclust fallback)。
|
|
8
|
+
#
|
|
9
|
+
# テストリスト:
|
|
10
|
+
# [x] XDG_* 未設定なら ~/.config ~/.local/share ~/.cache の下の bitclust/
|
|
11
|
+
# [x] XDG_* が絶対パスならそれを使う。相対パスは無視して既定に戻る
|
|
12
|
+
# [x] config_file は XDG → ~/.bitclust の順で存在するものを返す。無ければ nil
|
|
13
|
+
# [x] load_config は設定ファイルの YAML を返す。無ければ nil
|
|
14
|
+
class TestUserDirs < Test::Unit::TestCase
|
|
15
|
+
KEYS = %w[HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME].freeze
|
|
16
|
+
|
|
17
|
+
def setup
|
|
18
|
+
@saved = KEYS.to_h {|k| [k, ENV[k]] }
|
|
19
|
+
@home = Dir.mktmpdir
|
|
20
|
+
ENV['HOME'] = @home
|
|
21
|
+
%w[XDG_CONFIG_HOME XDG_DATA_HOME XDG_CACHE_HOME].each {|k| ENV.delete(k) }
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def teardown
|
|
25
|
+
@saved.each {|k, v| v ? ENV[k] = v : ENV.delete(k) }
|
|
26
|
+
FileUtils.rm_rf(@home)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def test_defaults_under_home
|
|
30
|
+
assert_equal(File.join(@home, '.config', 'bitclust'), BitClust::UserDirs.config_home.to_s)
|
|
31
|
+
assert_equal(File.join(@home, '.local', 'share', 'bitclust'), BitClust::UserDirs.data_home.to_s)
|
|
32
|
+
assert_equal(File.join(@home, '.cache', 'bitclust'), BitClust::UserDirs.cache_home.to_s)
|
|
33
|
+
assert_equal(File.join(@home, '.bitclust'), BitClust::UserDirs.legacy_dir.to_s)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def test_xdg_environment_variables
|
|
37
|
+
ENV['XDG_CONFIG_HOME'] = File.join(@home, 'cfg')
|
|
38
|
+
ENV['XDG_DATA_HOME'] = File.join(@home, 'data')
|
|
39
|
+
ENV['XDG_CACHE_HOME'] = 'relative/cache'
|
|
40
|
+
assert_equal(File.join(@home, 'cfg', 'bitclust'), BitClust::UserDirs.config_home.to_s)
|
|
41
|
+
assert_equal(File.join(@home, 'data', 'bitclust'), BitClust::UserDirs.data_home.to_s)
|
|
42
|
+
assert_equal(File.join(@home, '.cache', 'bitclust'), BitClust::UserDirs.cache_home.to_s)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def test_config_file_prefers_xdg_then_legacy
|
|
46
|
+
assert_nil(BitClust::UserDirs.config_file)
|
|
47
|
+
legacy = File.join(@home, '.bitclust', 'config')
|
|
48
|
+
FileUtils.mkdir_p(File.dirname(legacy))
|
|
49
|
+
File.write(legacy, { default_version: '3.4', database_prefix: '/legacy/db' }.to_yaml)
|
|
50
|
+
assert_equal(legacy, BitClust::UserDirs.config_file.to_s)
|
|
51
|
+
assert_equal('/legacy/db', BitClust::UserDirs.load_config[:database_prefix])
|
|
52
|
+
xdg = File.join(@home, '.config', 'bitclust', 'config')
|
|
53
|
+
FileUtils.mkdir_p(File.dirname(xdg))
|
|
54
|
+
File.write(xdg, { default_version: '4.0', database_prefix: '/xdg/db' }.to_yaml)
|
|
55
|
+
assert_equal(xdg, BitClust::UserDirs.config_file.to_s)
|
|
56
|
+
assert_equal('/xdg/db', BitClust::UserDirs.load_config[:database_prefix])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def test_load_config_without_file
|
|
60
|
+
assert_nil(BitClust::UserDirs.load_config)
|
|
61
|
+
end
|
|
62
|
+
end
|
data/theme/default/js/run.js
CHANGED
|
@@ -134,6 +134,20 @@ function setupBlock(pre, runner) {
|
|
|
134
134
|
}
|
|
135
135
|
group.prepend(button)
|
|
136
136
|
|
|
137
|
+
// RUN の使い方と制限(ruby.wasm で動かないサンプルがあること等)を
|
|
138
|
+
// 説明するヘルプページの RUN 節への動線。リンク先はページごとに相対
|
|
139
|
+
// URL が変わるため、サーバー側が layout の meta で埋め込んだ値を使う
|
|
140
|
+
const helpUrl = document.querySelector('meta[name="rurema-run-help"]')?.content
|
|
141
|
+
if (helpUrl) {
|
|
142
|
+
const help = document.createElement('a')
|
|
143
|
+
help.className = 'highlight__help-link'
|
|
144
|
+
help.href = helpUrl
|
|
145
|
+
help.textContent = '?'
|
|
146
|
+
help.title = 'RUN ボタンのヘルプ'
|
|
147
|
+
help.setAttribute('aria-label', 'RUN ボタンのヘルプ')
|
|
148
|
+
group.append(help)
|
|
149
|
+
}
|
|
150
|
+
|
|
137
151
|
let output
|
|
138
152
|
let outputTextNode
|
|
139
153
|
const ensureOutput = () => {
|
|
@@ -112,7 +112,9 @@
|
|
|
112
112
|
this.escapeHTML(typeClass) + '">' + this.formatType(r.type) + '</span>';
|
|
113
113
|
}
|
|
114
114
|
html += '</p>';
|
|
115
|
-
|
|
115
|
+
// snippet はインデックス生成側が入れたプレーンテキスト
|
|
116
|
+
// (エントリの説明の最初の段落)。HTML として解釈させない
|
|
117
|
+
if (r.snippet) html += '<div class="search-snippet">' + this.escapeHTML(r.snippet) + '</div>';
|
|
116
118
|
li.innerHTML = html;
|
|
117
119
|
return li;
|
|
118
120
|
};
|
|
@@ -158,7 +158,13 @@
|
|
|
158
158
|
html += '<span class="search-type search-type-' +
|
|
159
159
|
this.escapeHTML(typeClass) + '">' + this.formatType(r.type) + '</span>';
|
|
160
160
|
}
|
|
161
|
-
html += '</p
|
|
161
|
+
html += '</p>';
|
|
162
|
+
// snippet はインデックス生成側が入れたプレーンテキスト
|
|
163
|
+
// (エントリの説明の最初の段落)。HTML として解釈させない
|
|
164
|
+
if (r.snippet) {
|
|
165
|
+
html += '<div class="search-snippet">' + this.escapeHTML(r.snippet) + '</div>';
|
|
166
|
+
}
|
|
167
|
+
html += '<p class="search-versions">';
|
|
162
168
|
for (var i = 0; i < versions.length; i++) {
|
|
163
169
|
html += '<a href="' + this.escapeHTML(versionHref(versions[i], r.path)) +
|
|
164
170
|
'">' + this.escapeHTML(versions[i]) + '</a>';
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
// Version switcher for statichtml pages served under a /ja/<version>/ tree.
|
|
2
|
+
//
|
|
3
|
+
// Renders a <select> into the #version-switcher slot in the top bar. Picking
|
|
4
|
+
// a version navigates to the same page under that version; if the page does
|
|
5
|
+
// not exist there, it falls back to the newest version that has it, and as a
|
|
6
|
+
// last resort to that version's top page. On the first interaction every
|
|
7
|
+
// other version is probed with a HEAD request and missing ones are disabled.
|
|
8
|
+
//
|
|
9
|
+
// Pages not served under a versioned path (local previews, /ja/search/) get
|
|
10
|
+
// no switcher: attach() is a no-op there.
|
|
11
|
+
(function () {
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
// 公開済みの版(新しい順)。doctree の Rakefile の
|
|
15
|
+
// SUPPORTED_VERSIONS / OLD_VERSIONS と揃える。
|
|
16
|
+
var RELEASED_VERSIONS = [
|
|
17
|
+
'4.0', '3.4', '3.3', '3.2', '3.1', '3.0',
|
|
18
|
+
'2.7.0', '2.6.0', '2.5.0', '2.4.0', '2.3.0', '2.2.0', '2.1.0', '2.0.0',
|
|
19
|
+
'1.9.3', '1.8.7'
|
|
20
|
+
];
|
|
21
|
+
var EDGE_VERSION = 'master';
|
|
22
|
+
var ALIASES = ['latest', EDGE_VERSION];
|
|
23
|
+
|
|
24
|
+
function knownVersion(version) {
|
|
25
|
+
return RELEASED_VERSIONS.indexOf(version) !== -1 ||
|
|
26
|
+
ALIASES.indexOf(version) !== -1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function parsePath(pathname) {
|
|
30
|
+
var m = /^(.*\/ja\/)([^\/]+)(\/.+)$/.exec(pathname);
|
|
31
|
+
if (!m || !knownVersion(m[2])) return null;
|
|
32
|
+
return { base: m[1], version: m[2], rest: m[3] };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function targetUrl(parsed, version) {
|
|
36
|
+
return parsed.base + version + parsed.rest;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function optionVersions(currentVersion) {
|
|
40
|
+
var versions = [EDGE_VERSION].concat(RELEASED_VERSIONS);
|
|
41
|
+
if (versions.indexOf(currentVersion) === -1) {
|
|
42
|
+
versions.unshift(currentVersion);
|
|
43
|
+
}
|
|
44
|
+
return versions;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// true: exists / false: does not exist / null: unknown (network error)
|
|
48
|
+
function checkExists(url) {
|
|
49
|
+
return fetch(url, { method: 'HEAD' })
|
|
50
|
+
.then(function (res) { return res.ok; })
|
|
51
|
+
.catch(function () { return null; });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Resolve where picking `version` should go. Unknown existence keeps the
|
|
55
|
+
// target so an offline or CORS-restricted page still just navigates.
|
|
56
|
+
function resolveTarget(parsed, version, exists) {
|
|
57
|
+
var target = targetUrl(parsed, version);
|
|
58
|
+
return exists(target).then(function (ok) {
|
|
59
|
+
if (ok !== false) return target;
|
|
60
|
+
var candidates = RELEASED_VERSIONS.filter(function (v) {
|
|
61
|
+
return v !== version;
|
|
62
|
+
});
|
|
63
|
+
var tryNext = function (i) {
|
|
64
|
+
if (i >= candidates.length) return parsed.base + version + '/';
|
|
65
|
+
var url = targetUrl(parsed, candidates[i]);
|
|
66
|
+
return exists(url).then(function (found) {
|
|
67
|
+
return found === true ? url : tryNext(i + 1);
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
return tryNext(0);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function attach(deps) {
|
|
75
|
+
var doc = deps.document;
|
|
76
|
+
var slot = doc.getElementById('version-switcher');
|
|
77
|
+
var parsed = parsePath(deps.location.pathname);
|
|
78
|
+
if (!slot || !parsed) return false;
|
|
79
|
+
var exists = deps.checkExists || checkExists;
|
|
80
|
+
|
|
81
|
+
var select = doc.createElement('select');
|
|
82
|
+
select.setAttribute('aria-label', '他のバージョンの同じページを表示');
|
|
83
|
+
optionVersions(parsed.version).forEach(function (version) {
|
|
84
|
+
var option = doc.createElement('option');
|
|
85
|
+
option.value = version;
|
|
86
|
+
option.textContent = version;
|
|
87
|
+
option.selected = version === parsed.version;
|
|
88
|
+
select.appendChild(option);
|
|
89
|
+
});
|
|
90
|
+
select.value = parsed.version;
|
|
91
|
+
|
|
92
|
+
var probed = false;
|
|
93
|
+
var probe = function () {
|
|
94
|
+
if (probed) return;
|
|
95
|
+
probed = true;
|
|
96
|
+
Array.prototype.forEach.call(select.children, function (option) {
|
|
97
|
+
if (option.value === parsed.version) return;
|
|
98
|
+
exists(targetUrl(parsed, option.value)).then(function (ok) {
|
|
99
|
+
if (ok === false) option.disabled = true;
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
select.addEventListener('focus', probe);
|
|
104
|
+
select.addEventListener('mousedown', probe);
|
|
105
|
+
select.addEventListener('touchstart', probe);
|
|
106
|
+
|
|
107
|
+
select.addEventListener('change', function () {
|
|
108
|
+
var version = select.value;
|
|
109
|
+
if (version === parsed.version) return;
|
|
110
|
+
resolveTarget(parsed, version, exists).then(function (url) {
|
|
111
|
+
deps.setHref(url);
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
slot.appendChild(select);
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
var api = {
|
|
120
|
+
RELEASED_VERSIONS: RELEASED_VERSIONS,
|
|
121
|
+
EDGE_VERSION: EDGE_VERSION,
|
|
122
|
+
parsePath: parsePath,
|
|
123
|
+
targetUrl: targetUrl,
|
|
124
|
+
optionVersions: optionVersions,
|
|
125
|
+
checkExists: checkExists,
|
|
126
|
+
resolveTarget: resolveTarget,
|
|
127
|
+
attach: attach
|
|
128
|
+
};
|
|
129
|
+
if (typeof globalThis !== 'undefined') {
|
|
130
|
+
globalThis.RuremaVersionSwitcher = api;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (typeof document !== 'undefined' && typeof location !== 'undefined') {
|
|
134
|
+
var init = function () {
|
|
135
|
+
attach({
|
|
136
|
+
document: document,
|
|
137
|
+
location: location,
|
|
138
|
+
setHref: function (url) { location.href = url; }
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
if (document.readyState === 'loading') {
|
|
142
|
+
document.addEventListener('DOMContentLoaded', init);
|
|
143
|
+
} else {
|
|
144
|
+
init();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
})();
|
data/theme/default/search.css
CHANGED
|
@@ -26,6 +26,27 @@
|
|
|
26
26
|
text-overflow: ellipsis;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
/* Version switcher: sits next to the brand; the auto margin keeps the
|
|
30
|
+
search box pinned to the right. The slot is empty until
|
|
31
|
+
version_switcher.js fills it (only on /ja/<version>/ pages). */
|
|
32
|
+
#version-switcher {
|
|
33
|
+
flex: 0 0 auto;
|
|
34
|
+
margin-right: auto;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#version-switcher:empty {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
#version-switcher select {
|
|
42
|
+
font-size: 0.9em;
|
|
43
|
+
padding: 0.2em 0.3em;
|
|
44
|
+
border: 1px solid #99a;
|
|
45
|
+
border-radius: 4px;
|
|
46
|
+
background: #fff;
|
|
47
|
+
color: inherit;
|
|
48
|
+
}
|
|
49
|
+
|
|
29
50
|
#search-section {
|
|
30
51
|
position: relative;
|
|
31
52
|
flex: 0 0 auto;
|
data/theme/default/style.css
CHANGED
|
@@ -273,6 +273,25 @@ pre.highlight.ruby[data-editing="true"] > code:focus {
|
|
|
273
273
|
left: -1000px;
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
+
/* for ?(RUN のヘルプページへのリンク。highlight__button-group の中で
|
|
277
|
+
COPY の右に入る)。ボタン(RUN・COPY)と違いページ遷移するリンクなので、
|
|
278
|
+
色・ホバーはサイト共通のリンクの見た目(a のスタイル)に任せて、
|
|
279
|
+
ここでは丸囲みの形と配置だけ整える */
|
|
280
|
+
.highlight__help-link {
|
|
281
|
+
display: inline-block;
|
|
282
|
+
box-sizing: border-box;
|
|
283
|
+
width: 1.5em;
|
|
284
|
+
height: 1.5em;
|
|
285
|
+
line-height: calc(1.5em - 2px);
|
|
286
|
+
text-align: center;
|
|
287
|
+
/* ただの ? だとクリックできると気付きにくいので、丸囲みはてなにして
|
|
288
|
+
ヘルプアイコンらしくする。枠は currentColor なので、リンク色にも
|
|
289
|
+
ホバーの反転(白文字+#33a 背景)にもそのまま追従する */
|
|
290
|
+
border: 1px solid currentColor;
|
|
291
|
+
border-radius: 50%;
|
|
292
|
+
margin: 0 0.25em 0.25em 0.5em;
|
|
293
|
+
}
|
|
294
|
+
|
|
276
295
|
/* サンプルコードのキャプション。pre の上に密着したタブとして表示する
|
|
277
296
|
(上だけ角丸でタブらしく)。script.js がツールバー行の左端に取り込む。
|
|
278
297
|
下のコード部分と同じ背景色にして「つながったタブ」に見せる(ヘッダー
|
|
@@ -329,26 +348,57 @@ dd {
|
|
|
329
348
|
margin: 0.3em 0em 1em 4em;
|
|
330
349
|
}
|
|
331
350
|
|
|
351
|
+
/* 表の基本スタイルは本文中のコンテンツ表(Markdown のテーブル)向け:
|
|
352
|
+
セルに罫線と余白を付けて読みやすくする。text-align はセルの
|
|
353
|
+
インラインスタイル(列揃え指定)が上書きする。
|
|
354
|
+
メソッド一覧などのカード状レイアウト表は後続の .entries 系の
|
|
355
|
+
上書きで従来の見た目を維持する */
|
|
332
356
|
table {
|
|
333
357
|
border-collapse: collapse;
|
|
358
|
+
margin: 0.5em 0 1em;
|
|
334
359
|
}
|
|
335
360
|
|
|
336
|
-
th
|
|
361
|
+
th,
|
|
362
|
+
td {
|
|
337
363
|
text-align: left;
|
|
338
364
|
vertical-align: top;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
padding: 0.3em;
|
|
365
|
+
border: 1px solid #bbb;
|
|
366
|
+
padding: 0.3em 0.8em;
|
|
342
367
|
}
|
|
343
368
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
369
|
+
th {
|
|
370
|
+
background-color: #dde;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
tbody tr:nth-child(even) {
|
|
374
|
+
background-color: #f5f5f5;
|
|
347
375
|
}
|
|
348
376
|
|
|
349
377
|
table.entries {
|
|
350
378
|
width: 100%;
|
|
351
379
|
height: 100%;
|
|
380
|
+
margin: 0;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/* セルの打ち消しは .entries 前置で書く。td.signature 等の個別ルール
|
|
384
|
+
(このファイルの後方)と同格の詳細度に抑えて、後勝ちでそちらを
|
|
385
|
+
優先させるため(table.entries td だと個別ルールより強くなる) */
|
|
386
|
+
.entries th {
|
|
387
|
+
background-color: #AAC;
|
|
388
|
+
border: 3px solid white;
|
|
389
|
+
padding: 0.3em;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.entries td {
|
|
393
|
+
border: none;
|
|
394
|
+
padding: 0;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* tbody はテンプレートでは書かれないがブラウザが補うため、
|
|
398
|
+
コンテンツ表向けの縞がここにも当たるのを打ち消す
|
|
399
|
+
(セル自身の背景で見えないが明示的に無効化しておく) */
|
|
400
|
+
.entries tr:nth-child(even) {
|
|
401
|
+
background-color: transparent;
|
|
352
402
|
}
|
|
353
403
|
|
|
354
404
|
table.entries tr {
|
|
@@ -586,3 +636,29 @@ span.method-until-badge {
|
|
|
586
636
|
}
|
|
587
637
|
span.method-since-badge { background-color: #e6f2e6; color: #2d6a2d; }
|
|
588
638
|
span.method-until-badge { background-color: #f7e6e6; color: #aa3333; }
|
|
639
|
+
|
|
640
|
+
/* RBS 型シグネチャ(rbssig サブコマンドが 4.0 以降の DB に書き込み、
|
|
641
|
+
メソッド見出しの <dt> 群の直後に 1 オーバーロード 1 行の
|
|
642
|
+
<dt class="rbs-signature"> として出る)。参考情報なので rdoc の型表示の
|
|
643
|
+
ように小さく・薄く・少し字下げして、メソッド定義の見出しと明確に
|
|
644
|
+
区別する。行の大半はクラスへのリンクなので、リンクの太字(a の既定)と
|
|
645
|
+
リンク色もここで打ち消さないと見出しと同じ太字の青になってしまう。
|
|
646
|
+
インラインコードのチップ背景も外す */
|
|
647
|
+
dt.rbs-signature {
|
|
648
|
+
font-weight: normal;
|
|
649
|
+
font-size: 80%;
|
|
650
|
+
color: #999;
|
|
651
|
+
line-height: 1.4;
|
|
652
|
+
margin-left: 2em;
|
|
653
|
+
}
|
|
654
|
+
dt.rbs-signature code {
|
|
655
|
+
background-color: transparent;
|
|
656
|
+
padding: 0;
|
|
657
|
+
border-radius: 0;
|
|
658
|
+
font-size: 100%; /* code の 90% 縮小と二重に掛けない(実効 80%) */
|
|
659
|
+
}
|
|
660
|
+
dt.rbs-signature a:link,
|
|
661
|
+
dt.rbs-signature a:visited {
|
|
662
|
+
font-weight: normal;
|
|
663
|
+
color: #8895b5;
|
|
664
|
+
}
|
data/theme/lillia/style.css
CHANGED
|
@@ -317,6 +317,32 @@ span.method-until-badge {
|
|
|
317
317
|
span.method-since-badge { background-color: #e6f2e6; color: #2d6a2d; }
|
|
318
318
|
span.method-until-badge { background-color: #f7e6e6; color: #aa3333; }
|
|
319
319
|
|
|
320
|
+
/* RBS 型シグネチャ(rbssig サブコマンドが 4.0 以降の DB に書き込み、
|
|
321
|
+
メソッド見出しの <dt> 群の直後に 1 オーバーロード 1 行の
|
|
322
|
+
<dt class="rbs-signature"> として出る)。参考情報なので rdoc の型表示の
|
|
323
|
+
ように小さく・薄く・少し字下げして、メソッド定義の見出しと明確に
|
|
324
|
+
区別する。行の大半はクラスへのリンクなので、リンクの太字(a の既定)と
|
|
325
|
+
リンク色もここで打ち消さないと見出しと同じ太字の青になってしまう。
|
|
326
|
+
インラインコードのチップ背景も外す */
|
|
327
|
+
dt.rbs-signature {
|
|
328
|
+
font-weight: normal;
|
|
329
|
+
font-size: 80%;
|
|
330
|
+
color: #999;
|
|
331
|
+
line-height: 1.4;
|
|
332
|
+
margin-left: 2em;
|
|
333
|
+
}
|
|
334
|
+
dt.rbs-signature code {
|
|
335
|
+
background-color: transparent;
|
|
336
|
+
padding: 0;
|
|
337
|
+
border-radius: 0;
|
|
338
|
+
font-size: 100%; /* code の縮小と二重に掛けない(実効 80%) */
|
|
339
|
+
}
|
|
340
|
+
dt.rbs-signature a:link,
|
|
341
|
+
dt.rbs-signature a:visited {
|
|
342
|
+
font-weight: normal;
|
|
343
|
+
color: #8895b5;
|
|
344
|
+
}
|
|
345
|
+
|
|
320
346
|
.method-description{
|
|
321
347
|
padding-bottom: 10px;
|
|
322
348
|
margin-bottom: 90px ;
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bitclust-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- https://github.com/rurema
|
|
@@ -51,6 +51,20 @@ dependencies:
|
|
|
51
51
|
- - ">="
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
53
|
version: '0'
|
|
54
|
+
- !ruby/object:Gem::Dependency
|
|
55
|
+
name: rexml
|
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - ">="
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '0'
|
|
61
|
+
type: :development
|
|
62
|
+
prerelease: false
|
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
+
requirements:
|
|
65
|
+
- - ">="
|
|
66
|
+
- !ruby/object:Gem::Version
|
|
67
|
+
version: '0'
|
|
54
68
|
- !ruby/object:Gem::Dependency
|
|
55
69
|
name: rack
|
|
56
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -155,6 +169,20 @@ dependencies:
|
|
|
155
169
|
- - ">="
|
|
156
170
|
- !ruby/object:Gem::Version
|
|
157
171
|
version: '0'
|
|
172
|
+
- !ruby/object:Gem::Dependency
|
|
173
|
+
name: rbs
|
|
174
|
+
requirement: !ruby/object:Gem::Requirement
|
|
175
|
+
requirements:
|
|
176
|
+
- - ">="
|
|
177
|
+
- !ruby/object:Gem::Version
|
|
178
|
+
version: '3.10'
|
|
179
|
+
type: :runtime
|
|
180
|
+
prerelease: false
|
|
181
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
182
|
+
requirements:
|
|
183
|
+
- - ">="
|
|
184
|
+
- !ruby/object:Gem::Version
|
|
185
|
+
version: '3.10'
|
|
158
186
|
description: |
|
|
159
187
|
Rurema is a Japanese ruby documentation project, and
|
|
160
188
|
bitclust is a rurema document processor.
|
|
@@ -215,6 +243,7 @@ files:
|
|
|
215
243
|
- data/bitclust/template/method
|
|
216
244
|
- data/bitclust/template/opensearchdescription
|
|
217
245
|
- data/bitclust/template/search
|
|
246
|
+
- lib/bitclust-irb.rb
|
|
218
247
|
- lib/bitclust.rb
|
|
219
248
|
- lib/bitclust/app.rb
|
|
220
249
|
- lib/bitclust/capi_converter.rb
|
|
@@ -236,10 +265,12 @@ files:
|
|
|
236
265
|
- lib/bitclust/include_graph.rb
|
|
237
266
|
- lib/bitclust/include_pruner.rb
|
|
238
267
|
- lib/bitclust/interface.rb
|
|
268
|
+
- lib/bitclust/irb.rb
|
|
239
269
|
- lib/bitclust/libraryentry.rb
|
|
240
270
|
- lib/bitclust/lineinput.rb
|
|
241
271
|
- lib/bitclust/link_checker.rb
|
|
242
272
|
- lib/bitclust/markdown_bridge.rb
|
|
273
|
+
- lib/bitclust/markdown_exporter.rb
|
|
243
274
|
- lib/bitclust/markdown_orchestrator.rb
|
|
244
275
|
- lib/bitclust/markdown_to_rrd.rb
|
|
245
276
|
- lib/bitclust/markdown_tree.rb
|
|
@@ -255,11 +286,14 @@ files:
|
|
|
255
286
|
- lib/bitclust/parseutils.rb
|
|
256
287
|
- lib/bitclust/preprocessor.rb
|
|
257
288
|
- lib/bitclust/progress_bar.rb
|
|
289
|
+
- lib/bitclust/rbs_overload_matcher.rb
|
|
290
|
+
- lib/bitclust/rbs_sig_importer.rb
|
|
291
|
+
- lib/bitclust/rbs_signatures.rb
|
|
258
292
|
- lib/bitclust/rdcompiler.rb
|
|
259
293
|
- lib/bitclust/refsdatabase.rb
|
|
260
294
|
- lib/bitclust/reloadable_request_handler.rb
|
|
295
|
+
- lib/bitclust/remote.rb
|
|
261
296
|
- lib/bitclust/requesthandler.rb
|
|
262
|
-
- lib/bitclust/ridatabase.rb
|
|
263
297
|
- lib/bitclust/rrd_to_markdown.rb
|
|
264
298
|
- lib/bitclust/rrdparser.rb
|
|
265
299
|
- lib/bitclust/runner.rb
|
|
@@ -285,6 +319,7 @@ files:
|
|
|
285
319
|
- lib/bitclust/subcommands/preproc_command.rb
|
|
286
320
|
- lib/bitclust/subcommands/property_command.rb
|
|
287
321
|
- lib/bitclust/subcommands/query_command.rb
|
|
322
|
+
- lib/bitclust/subcommands/rbssig_command.rb
|
|
288
323
|
- lib/bitclust/subcommands/searchpage_command.rb
|
|
289
324
|
- lib/bitclust/subcommands/server_command.rb
|
|
290
325
|
- lib/bitclust/subcommands/setup_command.rb
|
|
@@ -292,6 +327,7 @@ files:
|
|
|
292
327
|
- lib/bitclust/subcommands/update_command.rb
|
|
293
328
|
- lib/bitclust/syntax_highlighter.rb
|
|
294
329
|
- lib/bitclust/textutils.rb
|
|
330
|
+
- lib/bitclust/user_dirs.rb
|
|
295
331
|
- lib/bitclust/version.rb
|
|
296
332
|
- lib/bitclust/version_badges.rb
|
|
297
333
|
- lib/bitclust/whole_file_gate.rb
|
|
@@ -299,20 +335,26 @@ files:
|
|
|
299
335
|
- test/test_app.rb
|
|
300
336
|
- test/test_bitclust.rb
|
|
301
337
|
- test/test_capi_converter.rb
|
|
338
|
+
- test/test_chm_command.rb
|
|
302
339
|
- test/test_class_screen.rb
|
|
303
340
|
- test/test_copy_doc_md.rb
|
|
304
341
|
- test/test_doc_converter.rb
|
|
305
342
|
- test/test_entity_splitter.rb
|
|
306
343
|
- test/test_entry.rb
|
|
307
344
|
- test/test_eol_warning.rb
|
|
345
|
+
- test/test_epub_command.rb
|
|
346
|
+
- test/test_epub_generator.rb
|
|
347
|
+
- test/test_extract_command.rb
|
|
308
348
|
- test/test_functiondatabase.rb
|
|
309
349
|
- test/test_functionreferenceparser.rb
|
|
310
350
|
- test/test_include_graph.rb
|
|
311
351
|
- test/test_include_pruner.rb
|
|
352
|
+
- test/test_irb_plugin.rb
|
|
312
353
|
- test/test_libraryentry.rb
|
|
313
354
|
- test/test_link_checker.rb
|
|
314
355
|
- test/test_lookup_command.rb
|
|
315
356
|
- test/test_markdown_bridge.rb
|
|
357
|
+
- test/test_markdown_exporter.rb
|
|
316
358
|
- test/test_markdown_orchestrator.rb
|
|
317
359
|
- test/test_markdown_to_rrd.rb
|
|
318
360
|
- test/test_markdown_tree.rb
|
|
@@ -322,12 +364,19 @@ files:
|
|
|
322
364
|
- test/test_method_since_calculator.rb
|
|
323
365
|
- test/test_methoddatabase.rb
|
|
324
366
|
- test/test_methodentry.rb
|
|
367
|
+
- test/test_methods_command.rb
|
|
325
368
|
- test/test_methodsignature.rb
|
|
326
369
|
- test/test_methodsince_command.rb
|
|
327
370
|
- test/test_nameutils.rb
|
|
371
|
+
- test/test_opensearchdescription_screen.rb
|
|
328
372
|
- test/test_preprocessor.rb
|
|
373
|
+
- test/test_query_command.rb
|
|
374
|
+
- test/test_rbs_overload_matcher.rb
|
|
375
|
+
- test/test_rbs_sig_importer.rb
|
|
376
|
+
- test/test_rbssig_command.rb
|
|
329
377
|
- test/test_rdcompiler.rb
|
|
330
378
|
- test/test_refsdatabase.rb
|
|
379
|
+
- test/test_remote.rb
|
|
331
380
|
- test/test_rrd_to_markdown.rb
|
|
332
381
|
- test/test_rrdparser.rb
|
|
333
382
|
- test/test_run_ruby_wasm.rb
|
|
@@ -337,9 +386,12 @@ files:
|
|
|
337
386
|
- test/test_search_screen.rb
|
|
338
387
|
- test/test_searcher.rb
|
|
339
388
|
- test/test_searchpage_command.rb
|
|
389
|
+
- test/test_server_command.rb
|
|
390
|
+
- test/test_setup_command.rb
|
|
340
391
|
- test/test_simplesearcher.rb
|
|
341
392
|
- test/test_statichtml_command.rb
|
|
342
393
|
- test/test_syntax_highlighter.rb
|
|
394
|
+
- test/test_user_dirs.rb
|
|
343
395
|
- test/test_whole_file_gate.rb
|
|
344
396
|
- theme/default/images/external.png
|
|
345
397
|
- theme/default/js/NOTICE
|
|
@@ -350,6 +402,7 @@ files:
|
|
|
350
402
|
- theme/default/js/search_navigation.js
|
|
351
403
|
- theme/default/js/search_page.js
|
|
352
404
|
- theme/default/js/search_ranker.js
|
|
405
|
+
- theme/default/js/version_switcher.js
|
|
353
406
|
- theme/default/rurema.png
|
|
354
407
|
- theme/default/rurema.svg
|
|
355
408
|
- theme/default/script.js
|
|
@@ -390,20 +443,26 @@ test_files:
|
|
|
390
443
|
- test/test_app.rb
|
|
391
444
|
- test/test_bitclust.rb
|
|
392
445
|
- test/test_capi_converter.rb
|
|
446
|
+
- test/test_chm_command.rb
|
|
393
447
|
- test/test_class_screen.rb
|
|
394
448
|
- test/test_copy_doc_md.rb
|
|
395
449
|
- test/test_doc_converter.rb
|
|
396
450
|
- test/test_entity_splitter.rb
|
|
397
451
|
- test/test_entry.rb
|
|
398
452
|
- test/test_eol_warning.rb
|
|
453
|
+
- test/test_epub_command.rb
|
|
454
|
+
- test/test_epub_generator.rb
|
|
455
|
+
- test/test_extract_command.rb
|
|
399
456
|
- test/test_functiondatabase.rb
|
|
400
457
|
- test/test_functionreferenceparser.rb
|
|
401
458
|
- test/test_include_graph.rb
|
|
402
459
|
- test/test_include_pruner.rb
|
|
460
|
+
- test/test_irb_plugin.rb
|
|
403
461
|
- test/test_libraryentry.rb
|
|
404
462
|
- test/test_link_checker.rb
|
|
405
463
|
- test/test_lookup_command.rb
|
|
406
464
|
- test/test_markdown_bridge.rb
|
|
465
|
+
- test/test_markdown_exporter.rb
|
|
407
466
|
- test/test_markdown_orchestrator.rb
|
|
408
467
|
- test/test_markdown_to_rrd.rb
|
|
409
468
|
- test/test_markdown_tree.rb
|
|
@@ -413,12 +472,19 @@ test_files:
|
|
|
413
472
|
- test/test_method_since_calculator.rb
|
|
414
473
|
- test/test_methoddatabase.rb
|
|
415
474
|
- test/test_methodentry.rb
|
|
475
|
+
- test/test_methods_command.rb
|
|
416
476
|
- test/test_methodsignature.rb
|
|
417
477
|
- test/test_methodsince_command.rb
|
|
418
478
|
- test/test_nameutils.rb
|
|
479
|
+
- test/test_opensearchdescription_screen.rb
|
|
419
480
|
- test/test_preprocessor.rb
|
|
481
|
+
- test/test_query_command.rb
|
|
482
|
+
- test/test_rbs_overload_matcher.rb
|
|
483
|
+
- test/test_rbs_sig_importer.rb
|
|
484
|
+
- test/test_rbssig_command.rb
|
|
420
485
|
- test/test_rdcompiler.rb
|
|
421
486
|
- test/test_refsdatabase.rb
|
|
487
|
+
- test/test_remote.rb
|
|
422
488
|
- test/test_rrd_to_markdown.rb
|
|
423
489
|
- test/test_rrdparser.rb
|
|
424
490
|
- test/test_run_ruby_wasm.rb
|
|
@@ -428,7 +494,10 @@ test_files:
|
|
|
428
494
|
- test/test_search_screen.rb
|
|
429
495
|
- test/test_searcher.rb
|
|
430
496
|
- test/test_searchpage_command.rb
|
|
497
|
+
- test/test_server_command.rb
|
|
498
|
+
- test/test_setup_command.rb
|
|
431
499
|
- test/test_simplesearcher.rb
|
|
432
500
|
- test/test_statichtml_command.rb
|
|
433
501
|
- test/test_syntax_highlighter.rb
|
|
502
|
+
- test/test_user_dirs.rb
|
|
434
503
|
- test/test_whole_file_gate.rb
|