paperback 0.0.3 → 0.0.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.
Files changed (56) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/tests.yml +46 -0
  3. data/.rubocop-disables.yml +26 -12
  4. data/CHANGELOG.md +21 -0
  5. data/README.md +27 -6
  6. data/bin/paperback +4 -0
  7. data/lib/paperback/cli.rb +38 -2
  8. data/lib/paperback/document.rb +134 -17
  9. data/lib/paperback/preparer.rb +107 -29
  10. data/lib/paperback/version.rb +2 -1
  11. data/lib/paperback.rb +12 -0
  12. data/paperback.gemspec +10 -7
  13. data/sorbet/config +3 -0
  14. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  15. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  16. data/sorbet/rbi/gems/chunky_png@1.4.0.rbi +4498 -0
  17. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  18. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
  19. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  20. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  21. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  22. data/sorbet/rbi/gems/parser@3.2.0.0.rbi +6963 -0
  23. data/sorbet/rbi/gems/pdf-core@0.4.0.rbi +1682 -0
  24. data/sorbet/rbi/gems/prawn@1.3.0.rbi +5567 -0
  25. data/sorbet/rbi/gems/pry@0.14.1.rbi +9990 -0
  26. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +408 -0
  27. data/sorbet/rbi/gems/rake@13.0.6.rbi +3023 -0
  28. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  29. data/sorbet/rbi/gems/regexp_parser@2.6.1.rbi +3481 -0
  30. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4717 -0
  31. data/sorbet/rbi/gems/rqrcode@0.10.1.rbi +617 -0
  32. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10791 -0
  33. data/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi +8106 -0
  34. data/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi +5305 -0
  35. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
  36. data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
  37. data/sorbet/rbi/gems/rubocop-ast@1.24.1.rbi +6617 -0
  38. data/sorbet/rbi/gems/rubocop@0.93.1.rbi +40848 -0
  39. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1234 -0
  40. data/sorbet/rbi/gems/sixword@0.4.0.rbi +536 -0
  41. data/sorbet/rbi/gems/spoom@1.1.15.rbi +2383 -0
  42. data/sorbet/rbi/gems/subprocess@1.5.6.rbi +391 -0
  43. data/sorbet/rbi/gems/tapioca@0.10.5.rbi +3207 -0
  44. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  45. data/sorbet/rbi/gems/ttfunk@1.4.0.rbi +1951 -0
  46. data/sorbet/rbi/gems/unicode-display_width@1.8.0.rbi +40 -0
  47. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4524 -0
  48. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2555 -0
  49. data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +441 -0
  50. data/sorbet/rbi/gems/yard@0.9.28.rbi +17816 -0
  51. data/sorbet/tapioca/config.yml +13 -0
  52. data/sorbet/tapioca/require.rb +4 -0
  53. data/spec/functional/paperback/cli_spec.rb +195 -0
  54. data/spec/spec_helper.rb +1 -0
  55. data/spec/unit/paperback_spec.rb +1 -0
  56. metadata +91 -7
@@ -0,0 +1,408 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rainbow` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rainbow`.
6
+
7
+ # source://yard/0.9.28/lib/yard.rb#61
8
+ ::RUBY18 = T.let(T.unsafe(nil), FalseClass)
9
+
10
+ # source://yard/0.9.28/lib/yard.rb#62
11
+ ::RUBY19 = T.let(T.unsafe(nil), TrueClass)
12
+
13
+ class Object < ::BasicObject
14
+ include ::Kernel
15
+ include ::PP::ObjectMixin
16
+
17
+ private
18
+
19
+ # source://rainbow//lib/rainbow/global.rb#23
20
+ def Rainbow(string); end
21
+ end
22
+
23
+ # source://rainbow//lib/rainbow/string_utils.rb#3
24
+ module Rainbow
25
+ class << self
26
+ # source://rainbow//lib/rainbow/global.rb#10
27
+ def enabled; end
28
+
29
+ # source://rainbow//lib/rainbow/global.rb#14
30
+ def enabled=(value); end
31
+
32
+ # source://rainbow//lib/rainbow/global.rb#6
33
+ def global; end
34
+
35
+ # source://rainbow//lib/rainbow.rb#6
36
+ def new; end
37
+
38
+ # source://rainbow//lib/rainbow/global.rb#18
39
+ def uncolor(string); end
40
+ end
41
+ end
42
+
43
+ # source://rainbow//lib/rainbow/color.rb#4
44
+ class Rainbow::Color
45
+ # Returns the value of attribute ground.
46
+ #
47
+ # source://rainbow//lib/rainbow/color.rb#5
48
+ def ground; end
49
+
50
+ class << self
51
+ # source://rainbow//lib/rainbow/color.rb#7
52
+ def build(ground, values); end
53
+
54
+ # source://rainbow//lib/rainbow/color.rb#40
55
+ def parse_hex_color(hex); end
56
+ end
57
+ end
58
+
59
+ # source://rainbow//lib/rainbow/color.rb#54
60
+ class Rainbow::Color::Indexed < ::Rainbow::Color
61
+ # @return [Indexed] a new instance of Indexed
62
+ #
63
+ # source://rainbow//lib/rainbow/color.rb#57
64
+ def initialize(ground, num); end
65
+
66
+ # source://rainbow//lib/rainbow/color.rb#62
67
+ def codes; end
68
+
69
+ # Returns the value of attribute num.
70
+ #
71
+ # source://rainbow//lib/rainbow/color.rb#55
72
+ def num; end
73
+ end
74
+
75
+ # source://rainbow//lib/rainbow/color.rb#69
76
+ class Rainbow::Color::Named < ::Rainbow::Color::Indexed
77
+ # @return [Named] a new instance of Named
78
+ #
79
+ # source://rainbow//lib/rainbow/color.rb#90
80
+ def initialize(ground, name); end
81
+
82
+ class << self
83
+ # source://rainbow//lib/rainbow/color.rb#82
84
+ def color_names; end
85
+
86
+ # source://rainbow//lib/rainbow/color.rb#86
87
+ def valid_names; end
88
+ end
89
+ end
90
+
91
+ # source://rainbow//lib/rainbow/color.rb#70
92
+ Rainbow::Color::Named::NAMES = T.let(T.unsafe(nil), Hash)
93
+
94
+ # source://rainbow//lib/rainbow/color.rb#100
95
+ class Rainbow::Color::RGB < ::Rainbow::Color::Indexed
96
+ # @return [RGB] a new instance of RGB
97
+ #
98
+ # source://rainbow//lib/rainbow/color.rb#107
99
+ def initialize(ground, *values); end
100
+
101
+ # Returns the value of attribute b.
102
+ #
103
+ # source://rainbow//lib/rainbow/color.rb#101
104
+ def b; end
105
+
106
+ # source://rainbow//lib/rainbow/color.rb#116
107
+ def codes; end
108
+
109
+ # Returns the value of attribute g.
110
+ #
111
+ # source://rainbow//lib/rainbow/color.rb#101
112
+ def g; end
113
+
114
+ # Returns the value of attribute r.
115
+ #
116
+ # source://rainbow//lib/rainbow/color.rb#101
117
+ def r; end
118
+
119
+ private
120
+
121
+ # source://rainbow//lib/rainbow/color.rb#122
122
+ def code_from_rgb; end
123
+
124
+ class << self
125
+ # source://rainbow//lib/rainbow/color.rb#103
126
+ def to_ansi_domain(value); end
127
+ end
128
+ end
129
+
130
+ # source://rainbow//lib/rainbow/color.rb#129
131
+ class Rainbow::Color::X11Named < ::Rainbow::Color::RGB
132
+ include ::Rainbow::X11ColorNames
133
+
134
+ # @return [X11Named] a new instance of X11Named
135
+ #
136
+ # source://rainbow//lib/rainbow/color.rb#140
137
+ def initialize(ground, name); end
138
+
139
+ class << self
140
+ # source://rainbow//lib/rainbow/color.rb#132
141
+ def color_names; end
142
+
143
+ # source://rainbow//lib/rainbow/color.rb#136
144
+ def valid_names; end
145
+ end
146
+ end
147
+
148
+ # source://rainbow//lib/rainbow/null_presenter.rb#4
149
+ class Rainbow::NullPresenter < ::String
150
+ # source://rainbow//lib/rainbow/null_presenter.rb#9
151
+ def background(*_values); end
152
+
153
+ # source://rainbow//lib/rainbow/null_presenter.rb#9
154
+ def bg(*_values); end
155
+
156
+ # source://rainbow//lib/rainbow/null_presenter.rb#49
157
+ def black; end
158
+
159
+ # source://rainbow//lib/rainbow/null_presenter.rb#33
160
+ def blink; end
161
+
162
+ # source://rainbow//lib/rainbow/null_presenter.rb#65
163
+ def blue; end
164
+
165
+ # source://rainbow//lib/rainbow/null_presenter.rb#17
166
+ def bold; end
167
+
168
+ # source://rainbow//lib/rainbow/null_presenter.rb#17
169
+ def bright; end
170
+
171
+ # source://rainbow//lib/rainbow/null_presenter.rb#5
172
+ def color(*_values); end
173
+
174
+ # source://rainbow//lib/rainbow/null_presenter.rb#45
175
+ def cross_out; end
176
+
177
+ # source://rainbow//lib/rainbow/null_presenter.rb#73
178
+ def cyan; end
179
+
180
+ # source://rainbow//lib/rainbow/null_presenter.rb#21
181
+ def dark; end
182
+
183
+ # source://rainbow//lib/rainbow/null_presenter.rb#21
184
+ def faint; end
185
+
186
+ # source://rainbow//lib/rainbow/null_presenter.rb#5
187
+ def fg(*_values); end
188
+
189
+ # source://rainbow//lib/rainbow/null_presenter.rb#5
190
+ def foreground(*_values); end
191
+
192
+ # source://rainbow//lib/rainbow/null_presenter.rb#57
193
+ def green; end
194
+
195
+ # source://rainbow//lib/rainbow/null_presenter.rb#41
196
+ def hide; end
197
+
198
+ # source://rainbow//lib/rainbow/null_presenter.rb#37
199
+ def inverse; end
200
+
201
+ # source://rainbow//lib/rainbow/null_presenter.rb#25
202
+ def italic; end
203
+
204
+ # source://rainbow//lib/rainbow/null_presenter.rb#69
205
+ def magenta; end
206
+
207
+ # source://rainbow//lib/rainbow/null_presenter.rb#81
208
+ def method_missing(method_name, *args); end
209
+
210
+ # source://rainbow//lib/rainbow/null_presenter.rb#53
211
+ def red; end
212
+
213
+ # source://rainbow//lib/rainbow/null_presenter.rb#13
214
+ def reset; end
215
+
216
+ # source://rainbow//lib/rainbow/null_presenter.rb#45
217
+ def strike; end
218
+
219
+ # source://rainbow//lib/rainbow/null_presenter.rb#29
220
+ def underline; end
221
+
222
+ # source://rainbow//lib/rainbow/null_presenter.rb#77
223
+ def white; end
224
+
225
+ # source://rainbow//lib/rainbow/null_presenter.rb#61
226
+ def yellow; end
227
+
228
+ private
229
+
230
+ # @return [Boolean]
231
+ #
232
+ # source://rainbow//lib/rainbow/null_presenter.rb#89
233
+ def respond_to_missing?(method_name, *args); end
234
+ end
235
+
236
+ # source://rainbow//lib/rainbow/presenter.rb#8
237
+ class Rainbow::Presenter < ::String
238
+ # Sets background color of this text.
239
+ #
240
+ # source://rainbow//lib/rainbow/presenter.rb#30
241
+ def background(*values); end
242
+
243
+ # Sets background color of this text.
244
+ #
245
+ # source://rainbow//lib/rainbow/presenter.rb#30
246
+ def bg(*values); end
247
+
248
+ # source://rainbow//lib/rainbow/presenter.rb#92
249
+ def black; end
250
+
251
+ # Turns on blinking attribute for this text (not well supported by terminal
252
+ # emulators).
253
+ #
254
+ # source://rainbow//lib/rainbow/presenter.rb#72
255
+ def blink; end
256
+
257
+ # source://rainbow//lib/rainbow/presenter.rb#108
258
+ def blue; end
259
+
260
+ # Turns on bright/bold for this text.
261
+ #
262
+ # source://rainbow//lib/rainbow/presenter.rb#45
263
+ def bold; end
264
+
265
+ # Turns on bright/bold for this text.
266
+ #
267
+ # source://rainbow//lib/rainbow/presenter.rb#45
268
+ def bright; end
269
+
270
+ # Sets color of this text.
271
+ #
272
+ # source://rainbow//lib/rainbow/presenter.rb#22
273
+ def color(*values); end
274
+
275
+ # source://rainbow//lib/rainbow/presenter.rb#86
276
+ def cross_out; end
277
+
278
+ # source://rainbow//lib/rainbow/presenter.rb#116
279
+ def cyan; end
280
+
281
+ # Turns on faint/dark for this text (not well supported by terminal
282
+ # emulators).
283
+ #
284
+ # source://rainbow//lib/rainbow/presenter.rb#53
285
+ def dark; end
286
+
287
+ # Turns on faint/dark for this text (not well supported by terminal
288
+ # emulators).
289
+ #
290
+ # source://rainbow//lib/rainbow/presenter.rb#53
291
+ def faint; end
292
+
293
+ # Sets color of this text.
294
+ #
295
+ # source://rainbow//lib/rainbow/presenter.rb#22
296
+ def fg(*values); end
297
+
298
+ # Sets color of this text.
299
+ #
300
+ # source://rainbow//lib/rainbow/presenter.rb#22
301
+ def foreground(*values); end
302
+
303
+ # source://rainbow//lib/rainbow/presenter.rb#100
304
+ def green; end
305
+
306
+ # Hides this text (set its color to the same as background).
307
+ #
308
+ # source://rainbow//lib/rainbow/presenter.rb#82
309
+ def hide; end
310
+
311
+ # Inverses current foreground/background colors.
312
+ #
313
+ # source://rainbow//lib/rainbow/presenter.rb#77
314
+ def inverse; end
315
+
316
+ # Turns on italic style for this text (not well supported by terminal
317
+ # emulators).
318
+ #
319
+ # source://rainbow//lib/rainbow/presenter.rb#61
320
+ def italic; end
321
+
322
+ # source://rainbow//lib/rainbow/presenter.rb#112
323
+ def magenta; end
324
+
325
+ # We take care of X11 color method call here.
326
+ # Such as #aqua, #ghostwhite.
327
+ #
328
+ # source://rainbow//lib/rainbow/presenter.rb#126
329
+ def method_missing(method_name, *args); end
330
+
331
+ # source://rainbow//lib/rainbow/presenter.rb#96
332
+ def red; end
333
+
334
+ # Resets terminal to default colors/backgrounds.
335
+ #
336
+ # It shouldn't be needed to use this method because all methods
337
+ # append terminal reset code to end of string.
338
+ #
339
+ # source://rainbow//lib/rainbow/presenter.rb#40
340
+ def reset; end
341
+
342
+ # source://rainbow//lib/rainbow/presenter.rb#86
343
+ def strike; end
344
+
345
+ # Turns on underline decoration for this text.
346
+ #
347
+ # source://rainbow//lib/rainbow/presenter.rb#66
348
+ def underline; end
349
+
350
+ # source://rainbow//lib/rainbow/presenter.rb#120
351
+ def white; end
352
+
353
+ # source://rainbow//lib/rainbow/presenter.rb#104
354
+ def yellow; end
355
+
356
+ private
357
+
358
+ # @return [Boolean]
359
+ #
360
+ # source://rainbow//lib/rainbow/presenter.rb#134
361
+ def respond_to_missing?(method_name, *args); end
362
+
363
+ # source://rainbow//lib/rainbow/presenter.rb#140
364
+ def wrap_with_sgr(codes); end
365
+ end
366
+
367
+ # source://rainbow//lib/rainbow/presenter.rb#9
368
+ Rainbow::Presenter::TERM_EFFECTS = T.let(T.unsafe(nil), Hash)
369
+
370
+ # source://rainbow//lib/rainbow/string_utils.rb#4
371
+ class Rainbow::StringUtils
372
+ class << self
373
+ # source://rainbow//lib/rainbow/string_utils.rb#17
374
+ def uncolor(string); end
375
+
376
+ # source://rainbow//lib/rainbow/string_utils.rb#5
377
+ def wrap_with_sgr(string, codes); end
378
+ end
379
+ end
380
+
381
+ # source://rainbow//lib/rainbow/wrapper.rb#7
382
+ class Rainbow::Wrapper
383
+ # @return [Wrapper] a new instance of Wrapper
384
+ #
385
+ # source://rainbow//lib/rainbow/wrapper.rb#10
386
+ def initialize(enabled = T.unsafe(nil)); end
387
+
388
+ # Returns the value of attribute enabled.
389
+ #
390
+ # source://rainbow//lib/rainbow/wrapper.rb#8
391
+ def enabled; end
392
+
393
+ # Sets the attribute enabled
394
+ #
395
+ # @param value the value to set the attribute enabled to.
396
+ #
397
+ # source://rainbow//lib/rainbow/wrapper.rb#8
398
+ def enabled=(_arg0); end
399
+
400
+ # source://rainbow//lib/rainbow/wrapper.rb#14
401
+ def wrap(string); end
402
+ end
403
+
404
+ # source://rainbow//lib/rainbow/x11_color_names.rb#4
405
+ module Rainbow::X11ColorNames; end
406
+
407
+ # source://rainbow//lib/rainbow/x11_color_names.rb#5
408
+ Rainbow::X11ColorNames::NAMES = T.let(T.unsafe(nil), Hash)