bitclust-core 1.2.1 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/data/bitclust/catalog/ja_JP.UTF-8 +4 -0
  3. data/data/bitclust/template.lillia/layout +1 -1
  4. data/data/bitclust/template.offline/class +127 -34
  5. data/data/bitclust/template.offline/class-index +33 -6
  6. data/data/bitclust/template.offline/doc +41 -8
  7. data/data/bitclust/template.offline/function +42 -9
  8. data/data/bitclust/template.offline/function-index +33 -7
  9. data/data/bitclust/template.offline/layout +21 -14
  10. data/data/bitclust/template.offline/library +48 -12
  11. data/data/bitclust/template.offline/library-index +33 -6
  12. data/data/bitclust/template.offline/method +56 -11
  13. data/lib/bitclust/classentry.rb +13 -2
  14. data/lib/bitclust/compat.rb +8 -0
  15. data/lib/bitclust/completion.rb +1 -0
  16. data/lib/bitclust/docentry.rb +4 -2
  17. data/lib/bitclust/entry.rb +3 -0
  18. data/lib/bitclust/functionentry.rb +8 -7
  19. data/lib/bitclust/functionreferenceparser.rb +2 -0
  20. data/lib/bitclust/libraryentry.rb +4 -1
  21. data/lib/bitclust/lineinput.rb +6 -2
  22. data/lib/bitclust/methoddatabase.rb +3 -0
  23. data/lib/bitclust/methodentry.rb +10 -8
  24. data/lib/bitclust/methodid.rb +1 -0
  25. data/lib/bitclust/nameutils.rb +15 -11
  26. data/lib/bitclust/preprocessor.rb +26 -21
  27. data/lib/bitclust/rdcompiler.rb +29 -19
  28. data/lib/bitclust/requesthandler.rb +3 -3
  29. data/lib/bitclust/ridatabase.rb +2 -1
  30. data/lib/bitclust/rrdparser.rb +19 -20
  31. data/lib/bitclust/screen.rb +39 -4
  32. data/lib/bitclust/silent_progress_bar.rb +8 -4
  33. data/lib/bitclust/simplesearcher.rb +1 -1
  34. data/lib/bitclust/subcommand.rb +9 -0
  35. data/lib/bitclust/subcommands/chm_command.rb +3 -3
  36. data/lib/bitclust/subcommands/methods_command.rb +1 -1
  37. data/lib/bitclust/subcommands/server_command.rb +6 -1
  38. data/lib/bitclust/subcommands/setup_command.rb +2 -2
  39. data/lib/bitclust/subcommands/statichtml_command.rb +44 -21
  40. data/lib/bitclust/syntax_highlighter.rb +5 -3
  41. data/lib/bitclust/version.rb +1 -1
  42. data/test/test_bitclust.rb +1 -1
  43. data/test/test_entry.rb +14 -1
  44. data/test/test_functionreferenceparser.rb +4 -4
  45. data/test/test_preprocessor.rb +21 -0
  46. data/test/test_rdcompiler.rb +240 -0
  47. data/test/test_rrdparser.rb +16 -0
  48. data/test/test_syntax_highlighter.rb +22 -4
  49. data/theme/default/rurema.png +0 -0
  50. data/theme/default/rurema.svg +31 -0
  51. data/theme/default/script.js +34 -0
  52. data/theme/default/style.css +112 -8
  53. metadata +32 -19
@@ -0,0 +1,34 @@
1
+ (function() {
2
+ window.onload = function() {
3
+ const elems = document.getElementsByClassName('highlight')
4
+
5
+ let tempDiv = document.createElement('div')
6
+
7
+ Array.prototype.forEach.call(elems,
8
+ function(elem) {
9
+ // sample code without caption
10
+ tempDiv.innerHTML = elem.innerHTML
11
+ const caption = tempDiv.getElementsByClassName("caption")[0]
12
+ if (caption) tempDiv.removeChild(caption)
13
+
14
+ // textarea for preserving the copy text
15
+ const copyText = document.createElement('textarea')
16
+ copyText.setAttribute('class', 'highlight__copy-text')
17
+ copyText.innerHTML = tempDiv.textContent.replace(/^\n+/, "").replace(/\n{2,}$/, "\n")
18
+ elem.appendChild(copyText)
19
+
20
+ // COPY button
21
+ const btn = document.createElement('span')
22
+ btn.setAttribute('class', 'highlight__copy-button')
23
+ elem.insertBefore(btn, elem.firstChild)
24
+
25
+ btn.onclick = function(){
26
+ copyText.select()
27
+ document.execCommand("copy")
28
+ btn.classList.add("copied")
29
+ window.setTimeout(function() { btn.classList.remove("copied") }, 1000)
30
+ }
31
+ }
32
+ )
33
+ }
34
+ })()
@@ -113,21 +113,55 @@ span.compileerror {
113
113
  font-weight: bold;
114
114
  }
115
115
 
116
+ code, pre, tt {
117
+ font-size: 90%;
118
+ font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
119
+ }
120
+
116
121
  pre {
117
122
  line-height: 1.1;
118
123
  background-color: #f2f2f2;
119
- padding: 10px;
124
+ padding: 1.1em;
120
125
  font-weight: normal;
126
+ overflow: auto;
121
127
  }
122
128
 
123
129
  pre.highlight {
124
130
  line-height: 1.1;
125
131
  background-color: #f2f2f2;
126
- padding: 0px 10px 10px 10px;
132
+ padding: 0px 1.1em 1.1em 1.1em;
127
133
  font-weight: normal;
128
134
  position: relative;
129
135
  }
130
136
 
137
+ /* for COPY */
138
+ .highlight__copy-button {
139
+ float: right;
140
+ margin: 0 -1.1em 0.25em 0.5em;
141
+ padding: 0.25em 0.5em;
142
+ background: #DDD;
143
+ opacity: 0.75;
144
+ cursor: pointer;
145
+ }
146
+ .highlight__copy-button:hover {
147
+ background: #EE8;
148
+ opacity: 1;
149
+ }
150
+ .highlight__copy-button::after {
151
+ content: "COPY"
152
+ }
153
+ .highlight__copy-button.copied {
154
+ background: #070;
155
+ color: white;
156
+ }
157
+ .highlight__copy-button.copied::after {
158
+ content: "COPIED"
159
+ }
160
+ .highlight__copy-text {
161
+ position: fixed;
162
+ left: -1000px;
163
+ }
164
+
131
165
  pre .caption {
132
166
  position: absolute;
133
167
  top: 0;
@@ -215,6 +249,7 @@ td.signature a {
215
249
  display: block;
216
250
  padding: 0.3em;
217
251
  height: 100%;
252
+ box-sizing: border-box;
218
253
  }
219
254
 
220
255
  td.description {
@@ -230,10 +265,6 @@ td.library {
230
265
  border: 3px solid white;
231
266
  }
232
267
 
233
- code {
234
- font-family: monospace;
235
- }
236
-
237
268
  a {
238
269
  font-weight: bold;
239
270
  text-decoration: none;
@@ -282,6 +313,59 @@ hr {
282
313
  height: 1px;
283
314
  }
284
315
 
316
+ .inline-breadcrumb-list {
317
+ display: inline-block;
318
+ list-style-type: none;
319
+ margin-bottom: 0;
320
+ margin-top: 0;
321
+ padding-left: 0;
322
+ }
323
+
324
+ .inline-breadcrumb-list li {
325
+ display: inline-block;
326
+ margin-bottom: 0;
327
+ }
328
+
329
+ .inline-breadcrumb-list li + li::before {
330
+ content: ">";
331
+ padding-left: 0.1rem;
332
+ padding-right: 0.1rem;
333
+ }
334
+
335
+ .inline-ancestors-list {
336
+ display: inline-flex;
337
+ flex-direction: row-reverse;
338
+ list-style-type: none;
339
+ margin-bottom: 0;
340
+ margin-top: 0;
341
+ padding-left: 0;
342
+ }
343
+
344
+ .inline-ancestors-list li {
345
+ margin-bottom: 0;
346
+ }
347
+
348
+ .inline-ancestors-list li + li::after {
349
+ content: "<";
350
+ padding-right: 0.3rem;
351
+ }
352
+
353
+ .class-toc {
354
+ list-style: none;
355
+ margin: 0.5em 0;
356
+ padding: 0;
357
+ column-gap: 1em;
358
+ column-width: 10em;
359
+ column-rule: 1px dotted #BBB;
360
+ }
361
+
362
+ .class-toc > li {
363
+ padding-left: 1em;
364
+ text-indent: -1em;
365
+ word-break: break-all;
366
+ break-inside: avoid;
367
+ }
368
+
285
369
  @media print {
286
370
  body {
287
371
  font-family: osaka,'MS Mincho',serif;
@@ -307,6 +391,26 @@ hr {
307
391
 
308
392
  #top_search {
309
393
  position: absolute;
310
- top: 15px;
311
- right: 10px;
394
+ top: 15px;
395
+ right: 10px;
396
+ }
397
+
398
+ @media only screen and (max-width:425px) {
399
+ table.entries tr {
400
+ display: block;
401
+ }
402
+ td.signature {
403
+ display: block;
404
+ width: inherit;
405
+ text-indent: 0em !important;
406
+ }
407
+ td.description {
408
+ display: block;
409
+ }
410
+ dd {
411
+ margin: 0.3em 0em 1em 1em;
412
+ }
413
+ p {
414
+ overflow-wrap: break-word;
415
+ }
312
416
  }
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.1
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: 2018-08-15 00:00:00.000000000 Z
11
+ date: 2020-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
@@ -70,16 +70,22 @@ dependencies:
70
70
  name: progressbar
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '='
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 1.9.0
76
+ - - "<"
74
77
  - !ruby/object:Gem::Version
75
- version: 0.21.0
78
+ version: '2.0'
76
79
  type: :runtime
77
80
  prerelease: false
78
81
  version_requirements: !ruby/object:Gem::Requirement
79
82
  requirements:
80
- - - '='
83
+ - - ">="
81
84
  - !ruby/object:Gem::Version
82
- version: 0.21.0
85
+ version: 1.9.0
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '2.0'
83
89
  description: |
84
90
  Rurema is a Japanese ruby documentation project, and
85
91
  bitclust is a rurema document processor.
@@ -216,6 +222,8 @@ files:
216
222
  - test/test_syntax_highlighter.rb
217
223
  - theme/default/images/external.png
218
224
  - theme/default/rurema.png
225
+ - theme/default/rurema.svg
226
+ - theme/default/script.js
219
227
  - theme/default/style.css
220
228
  - theme/default/syntax-highlight.css
221
229
  - theme/default/test.css
@@ -224,7 +232,13 @@ files:
224
232
  - theme/lillia/test.css
225
233
  homepage: https://docs.ruby-lang.org/ja/
226
234
  licenses: []
227
- metadata: {}
235
+ metadata:
236
+ bug_tracker_uri: https://github.com/rurema/bitclust/issues
237
+ documentation_uri: https://github.com/rurema/doctree/wiki
238
+ homepage_uri: https://docs.ruby-lang.org/ja/
239
+ source_code_uri: https://github.com/rurema/bitclust
240
+ github_repo: https://github.com/rurema/bitclust
241
+ wiki_uri: https://github.com/rurema/doctree/wiki
228
242
  post_install_message:
229
243
  rdoc_options: []
230
244
  require_paths:
@@ -240,25 +254,24 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
254
  - !ruby/object:Gem::Version
241
255
  version: '0'
242
256
  requirements: []
243
- rubyforge_project: ''
244
- rubygems_version: 2.7.6
257
+ rubygems_version: 3.1.2
245
258
  signing_key:
246
259
  specification_version: 4
247
260
  summary: BitClust is a rurema document processor.
248
261
  test_files:
249
- - test/test_rdcompiler.rb
250
- - test/test_libraryentry.rb
251
- - test/test_runner.rb
252
262
  - test/test_syntax_highlighter.rb
253
- - test/test_bitclust.rb
254
- - test/test_refsdatabase.rb
255
263
  - test/test_methodsignature.rb
264
+ - test/test_functiondatabase.rb
256
265
  - test/test_preprocessor.rb
257
- - test/test_rrdparser.rb
266
+ - test/test_refsdatabase.rb
267
+ - test/test_nameutils.rb
268
+ - test/test_bitclust.rb
258
269
  - test/test_simplesearcher.rb
259
- - test/run_test.rb
260
- - test/test_entry.rb
270
+ - test/test_rdcompiler.rb
271
+ - test/test_libraryentry.rb
272
+ - test/test_runner.rb
273
+ - test/test_rrdparser.rb
261
274
  - test/test_methoddatabase.rb
262
- - test/test_functiondatabase.rb
263
- - test/test_nameutils.rb
264
275
  - test/test_functionreferenceparser.rb
276
+ - test/run_test.rb
277
+ - test/test_entry.rb