ruby-paseto 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +8 -0
  3. data/CODE_OF_CONDUCT.md +84 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +549 -0
  6. data/lib/paseto/asn1/algorithm_identifier.rb +17 -0
  7. data/lib/paseto/asn1/curve_private_key.rb +22 -0
  8. data/lib/paseto/asn1/ec_private_key.rb +27 -0
  9. data/lib/paseto/asn1/ecdsa_full_r.rb +26 -0
  10. data/lib/paseto/asn1/ecdsa_sig_value.rb +23 -0
  11. data/lib/paseto/asn1/ecdsa_signature.rb +49 -0
  12. data/lib/paseto/asn1/ed25519_identifier.rb +15 -0
  13. data/lib/paseto/asn1/named_curve.rb +17 -0
  14. data/lib/paseto/asn1/one_asymmetric_key.rb +32 -0
  15. data/lib/paseto/asn1/private_key.rb +17 -0
  16. data/lib/paseto/asn1/private_key_algorithm_identifier.rb +17 -0
  17. data/lib/paseto/asn1/public_key.rb +17 -0
  18. data/lib/paseto/asn1/subject_public_key_info.rb +28 -0
  19. data/lib/paseto/asn1.rb +101 -0
  20. data/lib/paseto/asymmetric_key.rb +100 -0
  21. data/lib/paseto/configuration/box.rb +23 -0
  22. data/lib/paseto/configuration/decode_configuration.rb +68 -0
  23. data/lib/paseto/configuration.rb +18 -0
  24. data/lib/paseto/interface/i_d.rb +23 -0
  25. data/lib/paseto/interface/key.rb +113 -0
  26. data/lib/paseto/interface/pbkd.rb +83 -0
  27. data/lib/paseto/interface/pie.rb +59 -0
  28. data/lib/paseto/interface/pke.rb +86 -0
  29. data/lib/paseto/interface/serializer.rb +19 -0
  30. data/lib/paseto/interface/version.rb +161 -0
  31. data/lib/paseto/interface/wrapper.rb +20 -0
  32. data/lib/paseto/operations/i_d.rb +48 -0
  33. data/lib/paseto/operations/id/i_dv3.rb +20 -0
  34. data/lib/paseto/operations/id/i_dv4.rb +20 -0
  35. data/lib/paseto/operations/pbkd/p_b_k_dv3.rb +85 -0
  36. data/lib/paseto/operations/pbkd/p_b_k_dv4.rb +94 -0
  37. data/lib/paseto/operations/pbkw.rb +73 -0
  38. data/lib/paseto/operations/pke/p_k_ev3.rb +97 -0
  39. data/lib/paseto/operations/pke/p_k_ev4.rb +95 -0
  40. data/lib/paseto/operations/pke.rb +57 -0
  41. data/lib/paseto/operations/wrap.rb +29 -0
  42. data/lib/paseto/paserk.rb +55 -0
  43. data/lib/paseto/paserk_types.rb +46 -0
  44. data/lib/paseto/protocol/version3.rb +100 -0
  45. data/lib/paseto/protocol/version4.rb +99 -0
  46. data/lib/paseto/result.rb +9 -0
  47. data/lib/paseto/serializer/optional_json.rb +30 -0
  48. data/lib/paseto/serializer/raw.rb +23 -0
  49. data/lib/paseto/sodium/curve_25519.rb +46 -0
  50. data/lib/paseto/sodium/safe_ed25519_loader.rb +19 -0
  51. data/lib/paseto/sodium/stream/base.rb +82 -0
  52. data/lib/paseto/sodium/stream/x_cha_cha20_xor.rb +31 -0
  53. data/lib/paseto/sodium.rb +5 -0
  54. data/lib/paseto/symmetric_key.rb +119 -0
  55. data/lib/paseto/token.rb +127 -0
  56. data/lib/paseto/token_types.rb +29 -0
  57. data/lib/paseto/util.rb +105 -0
  58. data/lib/paseto/v3/local.rb +63 -0
  59. data/lib/paseto/v3/public.rb +204 -0
  60. data/lib/paseto/v4/local.rb +56 -0
  61. data/lib/paseto/v4/public.rb +169 -0
  62. data/lib/paseto/validator.rb +154 -0
  63. data/lib/paseto/verifiers/footer.rb +30 -0
  64. data/lib/paseto/verifiers/payload.rb +42 -0
  65. data/lib/paseto/verify.rb +48 -0
  66. data/lib/paseto/version.rb +6 -0
  67. data/lib/paseto/versions.rb +25 -0
  68. data/lib/paseto/wrappers/pie/pie_v3.rb +72 -0
  69. data/lib/paseto/wrappers/pie/pie_v4.rb +72 -0
  70. data/lib/paseto/wrappers/pie.rb +71 -0
  71. data/lib/paseto.rb +99 -0
  72. data/paseto.gemspec +58 -0
  73. data/sorbet/config +3 -0
  74. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  75. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  76. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
  77. data/sorbet/rbi/gems/docile@1.4.0.rbi +376 -0
  78. data/sorbet/rbi/gems/ffi@1.15.5.rbi +1994 -0
  79. data/sorbet/rbi/gems/io-console@0.5.11.rbi +8 -0
  80. data/sorbet/rbi/gems/irb@1.5.1.rbi +342 -0
  81. data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
  82. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +267 -0
  83. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  84. data/sorbet/rbi/gems/oj@3.13.23.rbi +603 -0
  85. data/sorbet/rbi/gems/openssl@3.0.1.rbi +1735 -0
  86. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  87. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +407 -0
  88. data/sorbet/rbi/gems/rake@13.0.6.rbi +3021 -0
  89. data/sorbet/rbi/gems/rbnacl@7.1.1.rbi +3218 -0
  90. data/sorbet/rbi/gems/regexp_parser@2.6.1.rbi +3481 -0
  91. data/sorbet/rbi/gems/reline@0.3.1.rbi +8 -0
  92. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4717 -0
  93. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10887 -0
  94. data/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi +8090 -0
  95. data/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi +5300 -0
  96. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
  97. data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
  98. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1239 -0
  99. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +219 -0
  100. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +2135 -0
  101. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
  102. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  103. data/sorbet/rbi/gems/timecop@0.9.6.rbi +350 -0
  104. data/sorbet/rbi/gems/unicode-display_width@2.3.0.rbi +48 -0
  105. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2555 -0
  106. data/sorbet/rbi/gems/yard-sorbet@0.7.0.rbi +391 -0
  107. data/sorbet/rbi/gems/yard@0.9.28.rbi +17816 -0
  108. data/sorbet/rbi/gems/zeitwerk@2.6.6.rbi +950 -0
  109. data/sorbet/rbi/shims/multi_json.rbi +19 -0
  110. data/sorbet/rbi/shims/openssl.rbi +111 -0
  111. data/sorbet/rbi/shims/rbnacl.rbi +65 -0
  112. data/sorbet/rbi/shims/zeitwerk.rbi +6 -0
  113. data/sorbet/rbi/todo.rbi +7 -0
  114. data/sorbet/tapioca/config.yml +30 -0
  115. data/sorbet/tapioca/require.rb +12 -0
  116. metadata +376 -0
@@ -0,0 +1,277 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `parallel` gem.
5
+ # Please instead update this file by running `bin/tapioca gem parallel`.
6
+
7
+ # source://parallel//lib/parallel/version.rb#2
8
+ module Parallel
9
+ extend ::Parallel::ProcessorCount
10
+
11
+ class << self
12
+ # @return [Boolean]
13
+ #
14
+ # source://parallel//lib/parallel.rb#246
15
+ def all?(*args, &block); end
16
+
17
+ # @return [Boolean]
18
+ #
19
+ # source://parallel//lib/parallel.rb#241
20
+ def any?(*args, &block); end
21
+
22
+ # source://parallel//lib/parallel.rb#237
23
+ def each(array, options = T.unsafe(nil), &block); end
24
+
25
+ # source://parallel//lib/parallel.rb#251
26
+ def each_with_index(array, options = T.unsafe(nil), &block); end
27
+
28
+ # source://parallel//lib/parallel.rb#306
29
+ def flat_map(*args, &block); end
30
+
31
+ # source://parallel//lib/parallel.rb#231
32
+ def in_processes(options = T.unsafe(nil), &block); end
33
+
34
+ # source://parallel//lib/parallel.rb#215
35
+ def in_threads(options = T.unsafe(nil)); end
36
+
37
+ # source://parallel//lib/parallel.rb#255
38
+ def map(source, options = T.unsafe(nil), &block); end
39
+
40
+ # source://parallel//lib/parallel.rb#302
41
+ def map_with_index(array, options = T.unsafe(nil), &block); end
42
+
43
+ # source://parallel//lib/parallel.rb#310
44
+ def worker_number; end
45
+
46
+ # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed
47
+ #
48
+ # source://parallel//lib/parallel.rb#315
49
+ def worker_number=(worker_num); end
50
+
51
+ private
52
+
53
+ # source://parallel//lib/parallel.rb#321
54
+ def add_progress_bar!(job_factory, options); end
55
+
56
+ # source://parallel//lib/parallel.rb#584
57
+ def call_with_index(item, index, options, &block); end
58
+
59
+ # source://parallel//lib/parallel.rb#516
60
+ def create_workers(job_factory, options, &block); end
61
+
62
+ # options is either a Integer or a Hash with :count
63
+ #
64
+ # source://parallel//lib/parallel.rb#574
65
+ def extract_count_from_options(options); end
66
+
67
+ # source://parallel//lib/parallel.rb#602
68
+ def instrument_finish(item, index, result, options); end
69
+
70
+ # source://parallel//lib/parallel.rb#607
71
+ def instrument_start(item, index, options); end
72
+
73
+ # source://parallel//lib/parallel.rb#550
74
+ def process_incoming_jobs(read, write, job_factory, options, &block); end
75
+
76
+ # source://parallel//lib/parallel.rb#504
77
+ def replace_worker(job_factory, workers, index, options, blk); end
78
+
79
+ # source://parallel//lib/parallel.rb#595
80
+ def with_instrumentation(item, index, options); end
81
+
82
+ # source://parallel//lib/parallel.rb#346
83
+ def work_direct(job_factory, options, &block); end
84
+
85
+ # source://parallel//lib/parallel.rb#456
86
+ def work_in_processes(job_factory, options, &blk); end
87
+
88
+ # source://parallel//lib/parallel.rb#390
89
+ def work_in_ractors(job_factory, options); end
90
+
91
+ # source://parallel//lib/parallel.rb#365
92
+ def work_in_threads(job_factory, options, &block); end
93
+
94
+ # source://parallel//lib/parallel.rb#524
95
+ def worker(job_factory, options, &block); end
96
+ end
97
+ end
98
+
99
+ # source://parallel//lib/parallel.rb#14
100
+ class Parallel::Break < ::StandardError
101
+ # @return [Break] a new instance of Break
102
+ #
103
+ # source://parallel//lib/parallel.rb#17
104
+ def initialize(value = T.unsafe(nil)); end
105
+
106
+ # Returns the value of attribute value.
107
+ #
108
+ # source://parallel//lib/parallel.rb#15
109
+ def value; end
110
+ end
111
+
112
+ # source://parallel//lib/parallel.rb#11
113
+ class Parallel::DeadWorker < ::StandardError; end
114
+
115
+ # source://parallel//lib/parallel.rb#35
116
+ class Parallel::ExceptionWrapper
117
+ # @return [ExceptionWrapper] a new instance of ExceptionWrapper
118
+ #
119
+ # source://parallel//lib/parallel.rb#38
120
+ def initialize(exception); end
121
+
122
+ # Returns the value of attribute exception.
123
+ #
124
+ # source://parallel//lib/parallel.rb#36
125
+ def exception; end
126
+ end
127
+
128
+ # source://parallel//lib/parallel.rb#101
129
+ class Parallel::JobFactory
130
+ # @return [JobFactory] a new instance of JobFactory
131
+ #
132
+ # source://parallel//lib/parallel.rb#102
133
+ def initialize(source, mutex); end
134
+
135
+ # source://parallel//lib/parallel.rb#110
136
+ def next; end
137
+
138
+ # generate item that is sent to workers
139
+ # just index is faster + less likely to blow up with unserializable errors
140
+ #
141
+ # source://parallel//lib/parallel.rb#139
142
+ def pack(item, index); end
143
+
144
+ # source://parallel//lib/parallel.rb#129
145
+ def size; end
146
+
147
+ # unpack item that is sent to workers
148
+ #
149
+ # source://parallel//lib/parallel.rb#144
150
+ def unpack(data); end
151
+
152
+ private
153
+
154
+ # @return [Boolean]
155
+ #
156
+ # source://parallel//lib/parallel.rb#150
157
+ def producer?; end
158
+
159
+ # source://parallel//lib/parallel.rb#154
160
+ def queue_wrapper(array); end
161
+ end
162
+
163
+ # source://parallel//lib/parallel.rb#23
164
+ class Parallel::Kill < ::Parallel::Break; end
165
+
166
+ # TODO: inline this method into parallel.rb and kill physical_processor_count in next major release
167
+ #
168
+ # source://parallel//lib/parallel/processor_count.rb#4
169
+ module Parallel::ProcessorCount
170
+ # Number of physical processor cores on the current system.
171
+ #
172
+ # source://parallel//lib/parallel/processor_count.rb#12
173
+ def physical_processor_count; end
174
+
175
+ # Number of processors seen by the OS, used for process scheduling
176
+ #
177
+ # source://parallel//lib/parallel/processor_count.rb#6
178
+ def processor_count; end
179
+ end
180
+
181
+ # source://parallel//lib/parallel.rb#9
182
+ Parallel::Stop = T.let(T.unsafe(nil), Object)
183
+
184
+ # source://parallel//lib/parallel.rb#26
185
+ class Parallel::UndumpableException < ::StandardError
186
+ # @return [UndumpableException] a new instance of UndumpableException
187
+ #
188
+ # source://parallel//lib/parallel.rb#29
189
+ def initialize(original); end
190
+
191
+ # Returns the value of attribute backtrace.
192
+ #
193
+ # source://parallel//lib/parallel.rb#27
194
+ def backtrace; end
195
+ end
196
+
197
+ # source://parallel//lib/parallel.rb#159
198
+ class Parallel::UserInterruptHandler
199
+ class << self
200
+ # source://parallel//lib/parallel.rb#184
201
+ def kill(thing); end
202
+
203
+ # kill all these pids or threads if user presses Ctrl+c
204
+ #
205
+ # source://parallel//lib/parallel.rb#164
206
+ def kill_on_ctrl_c(pids, options); end
207
+
208
+ private
209
+
210
+ # source://parallel//lib/parallel.rb#208
211
+ def restore_interrupt(old, signal); end
212
+
213
+ # source://parallel//lib/parallel.rb#193
214
+ def trap_interrupt(signal); end
215
+ end
216
+ end
217
+
218
+ # source://parallel//lib/parallel.rb#160
219
+ Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol)
220
+
221
+ # source://parallel//lib/parallel/version.rb#3
222
+ Parallel::VERSION = T.let(T.unsafe(nil), String)
223
+
224
+ # source://parallel//lib/parallel/version.rb#3
225
+ Parallel::Version = T.let(T.unsafe(nil), String)
226
+
227
+ # source://parallel//lib/parallel.rb#54
228
+ class Parallel::Worker
229
+ # @return [Worker] a new instance of Worker
230
+ #
231
+ # source://parallel//lib/parallel.rb#58
232
+ def initialize(read, write, pid); end
233
+
234
+ # might be passed to started_processes and simultaneously closed by another thread
235
+ # when running in isolation mode, so we have to check if it is closed before closing
236
+ #
237
+ # source://parallel//lib/parallel.rb#71
238
+ def close_pipes; end
239
+
240
+ # Returns the value of attribute pid.
241
+ #
242
+ # source://parallel//lib/parallel.rb#55
243
+ def pid; end
244
+
245
+ # Returns the value of attribute read.
246
+ #
247
+ # source://parallel//lib/parallel.rb#55
248
+ def read; end
249
+
250
+ # source://parallel//lib/parallel.rb#64
251
+ def stop; end
252
+
253
+ # Returns the value of attribute thread.
254
+ #
255
+ # source://parallel//lib/parallel.rb#56
256
+ def thread; end
257
+
258
+ # Sets the attribute thread
259
+ #
260
+ # @param value the value to set the attribute thread to.
261
+ #
262
+ # source://parallel//lib/parallel.rb#56
263
+ def thread=(_arg0); end
264
+
265
+ # source://parallel//lib/parallel.rb#76
266
+ def work(data); end
267
+
268
+ # Returns the value of attribute write.
269
+ #
270
+ # source://parallel//lib/parallel.rb#55
271
+ def write; end
272
+
273
+ private
274
+
275
+ # source://parallel//lib/parallel.rb#94
276
+ def wait; end
277
+ end
@@ -0,0 +1,407 @@
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
+
16
+ private
17
+
18
+ # source://rainbow//lib/rainbow/global.rb#23
19
+ def Rainbow(string); end
20
+ end
21
+
22
+ # source://rainbow//lib/rainbow/string_utils.rb#3
23
+ module Rainbow
24
+ class << self
25
+ # source://rainbow//lib/rainbow/global.rb#10
26
+ def enabled; end
27
+
28
+ # source://rainbow//lib/rainbow/global.rb#14
29
+ def enabled=(value); end
30
+
31
+ # source://rainbow//lib/rainbow/global.rb#6
32
+ def global; end
33
+
34
+ # source://rainbow//lib/rainbow.rb#6
35
+ def new; end
36
+
37
+ # source://rainbow//lib/rainbow/global.rb#18
38
+ def uncolor(string); end
39
+ end
40
+ end
41
+
42
+ # source://rainbow//lib/rainbow/color.rb#4
43
+ class Rainbow::Color
44
+ # Returns the value of attribute ground.
45
+ #
46
+ # source://rainbow//lib/rainbow/color.rb#5
47
+ def ground; end
48
+
49
+ class << self
50
+ # source://rainbow//lib/rainbow/color.rb#7
51
+ def build(ground, values); end
52
+
53
+ # source://rainbow//lib/rainbow/color.rb#40
54
+ def parse_hex_color(hex); end
55
+ end
56
+ end
57
+
58
+ # source://rainbow//lib/rainbow/color.rb#54
59
+ class Rainbow::Color::Indexed < ::Rainbow::Color
60
+ # @return [Indexed] a new instance of Indexed
61
+ #
62
+ # source://rainbow//lib/rainbow/color.rb#57
63
+ def initialize(ground, num); end
64
+
65
+ # source://rainbow//lib/rainbow/color.rb#62
66
+ def codes; end
67
+
68
+ # Returns the value of attribute num.
69
+ #
70
+ # source://rainbow//lib/rainbow/color.rb#55
71
+ def num; end
72
+ end
73
+
74
+ # source://rainbow//lib/rainbow/color.rb#69
75
+ class Rainbow::Color::Named < ::Rainbow::Color::Indexed
76
+ # @return [Named] a new instance of Named
77
+ #
78
+ # source://rainbow//lib/rainbow/color.rb#90
79
+ def initialize(ground, name); end
80
+
81
+ class << self
82
+ # source://rainbow//lib/rainbow/color.rb#82
83
+ def color_names; end
84
+
85
+ # source://rainbow//lib/rainbow/color.rb#86
86
+ def valid_names; end
87
+ end
88
+ end
89
+
90
+ # source://rainbow//lib/rainbow/color.rb#70
91
+ Rainbow::Color::Named::NAMES = T.let(T.unsafe(nil), Hash)
92
+
93
+ # source://rainbow//lib/rainbow/color.rb#100
94
+ class Rainbow::Color::RGB < ::Rainbow::Color::Indexed
95
+ # @return [RGB] a new instance of RGB
96
+ #
97
+ # source://rainbow//lib/rainbow/color.rb#107
98
+ def initialize(ground, *values); end
99
+
100
+ # Returns the value of attribute b.
101
+ #
102
+ # source://rainbow//lib/rainbow/color.rb#101
103
+ def b; end
104
+
105
+ # source://rainbow//lib/rainbow/color.rb#116
106
+ def codes; end
107
+
108
+ # Returns the value of attribute g.
109
+ #
110
+ # source://rainbow//lib/rainbow/color.rb#101
111
+ def g; end
112
+
113
+ # Returns the value of attribute r.
114
+ #
115
+ # source://rainbow//lib/rainbow/color.rb#101
116
+ def r; end
117
+
118
+ private
119
+
120
+ # source://rainbow//lib/rainbow/color.rb#122
121
+ def code_from_rgb; end
122
+
123
+ class << self
124
+ # source://rainbow//lib/rainbow/color.rb#103
125
+ def to_ansi_domain(value); end
126
+ end
127
+ end
128
+
129
+ # source://rainbow//lib/rainbow/color.rb#129
130
+ class Rainbow::Color::X11Named < ::Rainbow::Color::RGB
131
+ include ::Rainbow::X11ColorNames
132
+
133
+ # @return [X11Named] a new instance of X11Named
134
+ #
135
+ # source://rainbow//lib/rainbow/color.rb#140
136
+ def initialize(ground, name); end
137
+
138
+ class << self
139
+ # source://rainbow//lib/rainbow/color.rb#132
140
+ def color_names; end
141
+
142
+ # source://rainbow//lib/rainbow/color.rb#136
143
+ def valid_names; end
144
+ end
145
+ end
146
+
147
+ # source://rainbow//lib/rainbow/null_presenter.rb#4
148
+ class Rainbow::NullPresenter < ::String
149
+ # source://rainbow//lib/rainbow/null_presenter.rb#9
150
+ def background(*_values); end
151
+
152
+ # source://rainbow//lib/rainbow/null_presenter.rb#9
153
+ def bg(*_values); end
154
+
155
+ # source://rainbow//lib/rainbow/null_presenter.rb#49
156
+ def black; end
157
+
158
+ # source://rainbow//lib/rainbow/null_presenter.rb#33
159
+ def blink; end
160
+
161
+ # source://rainbow//lib/rainbow/null_presenter.rb#65
162
+ def blue; end
163
+
164
+ # source://rainbow//lib/rainbow/null_presenter.rb#17
165
+ def bold; end
166
+
167
+ # source://rainbow//lib/rainbow/null_presenter.rb#17
168
+ def bright; end
169
+
170
+ # source://rainbow//lib/rainbow/null_presenter.rb#5
171
+ def color(*_values); end
172
+
173
+ # source://rainbow//lib/rainbow/null_presenter.rb#45
174
+ def cross_out; end
175
+
176
+ # source://rainbow//lib/rainbow/null_presenter.rb#73
177
+ def cyan; end
178
+
179
+ # source://rainbow//lib/rainbow/null_presenter.rb#21
180
+ def dark; end
181
+
182
+ # source://rainbow//lib/rainbow/null_presenter.rb#21
183
+ def faint; end
184
+
185
+ # source://rainbow//lib/rainbow/null_presenter.rb#5
186
+ def fg(*_values); end
187
+
188
+ # source://rainbow//lib/rainbow/null_presenter.rb#5
189
+ def foreground(*_values); end
190
+
191
+ # source://rainbow//lib/rainbow/null_presenter.rb#57
192
+ def green; end
193
+
194
+ # source://rainbow//lib/rainbow/null_presenter.rb#41
195
+ def hide; end
196
+
197
+ # source://rainbow//lib/rainbow/null_presenter.rb#37
198
+ def inverse; end
199
+
200
+ # source://rainbow//lib/rainbow/null_presenter.rb#25
201
+ def italic; end
202
+
203
+ # source://rainbow//lib/rainbow/null_presenter.rb#69
204
+ def magenta; end
205
+
206
+ # source://rainbow//lib/rainbow/null_presenter.rb#81
207
+ def method_missing(method_name, *args); end
208
+
209
+ # source://rainbow//lib/rainbow/null_presenter.rb#53
210
+ def red; end
211
+
212
+ # source://rainbow//lib/rainbow/null_presenter.rb#13
213
+ def reset; end
214
+
215
+ # source://rainbow//lib/rainbow/null_presenter.rb#45
216
+ def strike; end
217
+
218
+ # source://rainbow//lib/rainbow/null_presenter.rb#29
219
+ def underline; end
220
+
221
+ # source://rainbow//lib/rainbow/null_presenter.rb#77
222
+ def white; end
223
+
224
+ # source://rainbow//lib/rainbow/null_presenter.rb#61
225
+ def yellow; end
226
+
227
+ private
228
+
229
+ # @return [Boolean]
230
+ #
231
+ # source://rainbow//lib/rainbow/null_presenter.rb#89
232
+ def respond_to_missing?(method_name, *args); end
233
+ end
234
+
235
+ # source://rainbow//lib/rainbow/presenter.rb#8
236
+ class Rainbow::Presenter < ::String
237
+ # Sets background color of this text.
238
+ #
239
+ # source://rainbow//lib/rainbow/presenter.rb#30
240
+ def background(*values); end
241
+
242
+ # Sets background color of this text.
243
+ #
244
+ # source://rainbow//lib/rainbow/presenter.rb#30
245
+ def bg(*values); end
246
+
247
+ # source://rainbow//lib/rainbow/presenter.rb#92
248
+ def black; end
249
+
250
+ # Turns on blinking attribute for this text (not well supported by terminal
251
+ # emulators).
252
+ #
253
+ # source://rainbow//lib/rainbow/presenter.rb#72
254
+ def blink; end
255
+
256
+ # source://rainbow//lib/rainbow/presenter.rb#108
257
+ def blue; end
258
+
259
+ # Turns on bright/bold for this text.
260
+ #
261
+ # source://rainbow//lib/rainbow/presenter.rb#45
262
+ def bold; end
263
+
264
+ # Turns on bright/bold for this text.
265
+ #
266
+ # source://rainbow//lib/rainbow/presenter.rb#45
267
+ def bright; end
268
+
269
+ # Sets color of this text.
270
+ #
271
+ # source://rainbow//lib/rainbow/presenter.rb#22
272
+ def color(*values); end
273
+
274
+ # source://rainbow//lib/rainbow/presenter.rb#86
275
+ def cross_out; end
276
+
277
+ # source://rainbow//lib/rainbow/presenter.rb#116
278
+ def cyan; end
279
+
280
+ # Turns on faint/dark for this text (not well supported by terminal
281
+ # emulators).
282
+ #
283
+ # source://rainbow//lib/rainbow/presenter.rb#53
284
+ def dark; end
285
+
286
+ # Turns on faint/dark for this text (not well supported by terminal
287
+ # emulators).
288
+ #
289
+ # source://rainbow//lib/rainbow/presenter.rb#53
290
+ def faint; end
291
+
292
+ # Sets color of this text.
293
+ #
294
+ # source://rainbow//lib/rainbow/presenter.rb#22
295
+ def fg(*values); end
296
+
297
+ # Sets color of this text.
298
+ #
299
+ # source://rainbow//lib/rainbow/presenter.rb#22
300
+ def foreground(*values); end
301
+
302
+ # source://rainbow//lib/rainbow/presenter.rb#100
303
+ def green; end
304
+
305
+ # Hides this text (set its color to the same as background).
306
+ #
307
+ # source://rainbow//lib/rainbow/presenter.rb#82
308
+ def hide; end
309
+
310
+ # Inverses current foreground/background colors.
311
+ #
312
+ # source://rainbow//lib/rainbow/presenter.rb#77
313
+ def inverse; end
314
+
315
+ # Turns on italic style for this text (not well supported by terminal
316
+ # emulators).
317
+ #
318
+ # source://rainbow//lib/rainbow/presenter.rb#61
319
+ def italic; end
320
+
321
+ # source://rainbow//lib/rainbow/presenter.rb#112
322
+ def magenta; end
323
+
324
+ # We take care of X11 color method call here.
325
+ # Such as #aqua, #ghostwhite.
326
+ #
327
+ # source://rainbow//lib/rainbow/presenter.rb#126
328
+ def method_missing(method_name, *args); end
329
+
330
+ # source://rainbow//lib/rainbow/presenter.rb#96
331
+ def red; end
332
+
333
+ # Resets terminal to default colors/backgrounds.
334
+ #
335
+ # It shouldn't be needed to use this method because all methods
336
+ # append terminal reset code to end of string.
337
+ #
338
+ # source://rainbow//lib/rainbow/presenter.rb#40
339
+ def reset; end
340
+
341
+ # source://rainbow//lib/rainbow/presenter.rb#86
342
+ def strike; end
343
+
344
+ # Turns on underline decoration for this text.
345
+ #
346
+ # source://rainbow//lib/rainbow/presenter.rb#66
347
+ def underline; end
348
+
349
+ # source://rainbow//lib/rainbow/presenter.rb#120
350
+ def white; end
351
+
352
+ # source://rainbow//lib/rainbow/presenter.rb#104
353
+ def yellow; end
354
+
355
+ private
356
+
357
+ # @return [Boolean]
358
+ #
359
+ # source://rainbow//lib/rainbow/presenter.rb#134
360
+ def respond_to_missing?(method_name, *args); end
361
+
362
+ # source://rainbow//lib/rainbow/presenter.rb#140
363
+ def wrap_with_sgr(codes); end
364
+ end
365
+
366
+ # source://rainbow//lib/rainbow/presenter.rb#9
367
+ Rainbow::Presenter::TERM_EFFECTS = T.let(T.unsafe(nil), Hash)
368
+
369
+ # source://rainbow//lib/rainbow/string_utils.rb#4
370
+ class Rainbow::StringUtils
371
+ class << self
372
+ # source://rainbow//lib/rainbow/string_utils.rb#17
373
+ def uncolor(string); end
374
+
375
+ # source://rainbow//lib/rainbow/string_utils.rb#5
376
+ def wrap_with_sgr(string, codes); end
377
+ end
378
+ end
379
+
380
+ # source://rainbow//lib/rainbow/wrapper.rb#7
381
+ class Rainbow::Wrapper
382
+ # @return [Wrapper] a new instance of Wrapper
383
+ #
384
+ # source://rainbow//lib/rainbow/wrapper.rb#10
385
+ def initialize(enabled = T.unsafe(nil)); end
386
+
387
+ # Returns the value of attribute enabled.
388
+ #
389
+ # source://rainbow//lib/rainbow/wrapper.rb#8
390
+ def enabled; end
391
+
392
+ # Sets the attribute enabled
393
+ #
394
+ # @param value the value to set the attribute enabled to.
395
+ #
396
+ # source://rainbow//lib/rainbow/wrapper.rb#8
397
+ def enabled=(_arg0); end
398
+
399
+ # source://rainbow//lib/rainbow/wrapper.rb#14
400
+ def wrap(string); end
401
+ end
402
+
403
+ # source://rainbow//lib/rainbow/x11_color_names.rb#4
404
+ module Rainbow::X11ColorNames; end
405
+
406
+ # source://rainbow//lib/rainbow/x11_color_names.rb#5
407
+ Rainbow::X11ColorNames::NAMES = T.let(T.unsafe(nil), Hash)