http_status_codes 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +8 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +48 -0
- data/Rakefile +12 -0
- data/lib/http_status_codes/version.rb +5 -0
- data/lib/http_status_codes.rb +77 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
- data/sorbet/rbi/gems/erubi@1.13.1.rbi +157 -0
- data/sorbet/rbi/gems/json@2.9.1.rbi +1944 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +9 -0
- data/sorbet/rbi/gems/minitest@5.25.4.rbi +1547 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
- data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
- data/sorbet/rbi/gems/parser@3.3.6.0.rbi +5519 -0
- data/sorbet/rbi/gems/prism@1.3.0.rbi +41403 -0
- data/sorbet/rbi/gems/racc@1.8.1.rbi +162 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
- data/sorbet/rbi/gems/rake@13.2.1.rbi +3022 -0
- data/sorbet/rbi/gems/rbi@0.2.2.rbi +4527 -0
- data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +3795 -0
- data/sorbet/rbi/gems/rubocop-ast@1.37.0.rbi +7608 -0
- data/sorbet/rbi/gems/rubocop@1.69.2.rbi +59462 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
- data/sorbet/rbi/gems/tapioca@0.16.5.rbi +3617 -0
- data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
- data/sorbet/rbi/gems/unicode-display_width@3.1.3.rbi +130 -0
- data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +251 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
- data/sorbet/rbi/gems/yard@0.9.37.rbi +18379 -0
- data/sorbet/rbi/shims/gems/minitest.rbi +3 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +100 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5aa9474e885ed7fffb56dc32ff6df3b18952f8696dc4ed6d84ae8d4e8b7d83b6
|
4
|
+
data.tar.gz: 66ca2cb3cc099fba99be2d26019fd2d17c4b9ae75d0005ad72496154a06f82e0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fac16f8c4a75912edafc9051c098fdd5c0a7684f20e881caabb9d09127c00ffad804f696b85b2c9d898a5a8dba9bd7f27452870449a2a28a2336a6f6f0ad1b8f
|
7
|
+
data.tar.gz: 90349e147369e2de76c36fa47d615d04a33aae01060e0a561923d53486dcc46416a3a721bb469964e94dfbbd47f323ca6c0b2ad3f95d2a7150e0a5167fdd66ee
|
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.1.6
|
data/CHANGELOG.md
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2024 Mateusz Drewniak
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# HttpStatusCodes
|
2
|
+
|
3
|
+
This library provides a simple hash map with all HTTP response status codes with their names.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install the gem and add to the application's Gemfile by executing:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
bundle add http_status_codes
|
11
|
+
```
|
12
|
+
|
13
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
14
|
+
|
15
|
+
```bash
|
16
|
+
gem install http_status_codes
|
17
|
+
```
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
```rb
|
22
|
+
HTTPStatusCodes::MAP
|
23
|
+
# =>
|
24
|
+
# {
|
25
|
+
# 100=>"Continue",
|
26
|
+
# 101=>"Switching Protocols",
|
27
|
+
# 102=>"Processing",
|
28
|
+
# 103=>"Early Hints",
|
29
|
+
# 200=>"OK",
|
30
|
+
# 201=>"Created",
|
31
|
+
# 202=>"Accepted",
|
32
|
+
# ...
|
33
|
+
# }
|
34
|
+
```
|
35
|
+
|
36
|
+
## Development
|
37
|
+
|
38
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
39
|
+
|
40
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
41
|
+
|
42
|
+
## Contributing
|
43
|
+
|
44
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Verseth/http_status_codes.
|
45
|
+
|
46
|
+
## License
|
47
|
+
|
48
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "http_status_codes/version"
|
4
|
+
|
5
|
+
require "sorbet-runtime"
|
6
|
+
|
7
|
+
module HTTPStatusCodes
|
8
|
+
# A hash map that maps HTTP response status codes as integers to their names as strings.
|
9
|
+
MAP = T.let(
|
10
|
+
{
|
11
|
+
100 => "Continue",
|
12
|
+
101 => "Switching Protocols",
|
13
|
+
102 => "Processing",
|
14
|
+
103 => "Early Hints",
|
15
|
+
200 => "OK",
|
16
|
+
201 => "Created",
|
17
|
+
202 => "Accepted",
|
18
|
+
203 => "Non-Authoritative Information",
|
19
|
+
204 => "No Content",
|
20
|
+
205 => "Reset Content",
|
21
|
+
206 => "Partial Content",
|
22
|
+
207 => "Multi-Status",
|
23
|
+
208 => "Already Reported",
|
24
|
+
226 => "IM Used",
|
25
|
+
300 => "Multiple Choices",
|
26
|
+
301 => "Moved Permanently",
|
27
|
+
302 => "Found",
|
28
|
+
303 => "See Other",
|
29
|
+
304 => "Not Modified",
|
30
|
+
305 => "Use Proxy",
|
31
|
+
306 => "Unused",
|
32
|
+
307 => "Temporary Redirect",
|
33
|
+
308 => "Permanent Redirect",
|
34
|
+
400 => "Bad Request",
|
35
|
+
401 => "Unauthorized",
|
36
|
+
402 => "Payment Required",
|
37
|
+
403 => "Forbidden",
|
38
|
+
404 => "Not Found",
|
39
|
+
405 => "Method Not Allowed",
|
40
|
+
406 => "Not Acceptable",
|
41
|
+
407 => "Proxy Authentication Required",
|
42
|
+
408 => "Request Timeout",
|
43
|
+
409 => "Conflict",
|
44
|
+
410 => "Gone",
|
45
|
+
411 => "Length Required",
|
46
|
+
412 => "Precondition Failed",
|
47
|
+
413 => "Content Too Large",
|
48
|
+
414 => "URI Too Long",
|
49
|
+
415 => "Unsupported Media Type",
|
50
|
+
416 => "Range Not Satisfiable",
|
51
|
+
417 => "Expectation Failed",
|
52
|
+
418 => "I'm a teapot",
|
53
|
+
421 => "Misdirected Request",
|
54
|
+
422 => "Unprocessable Content",
|
55
|
+
423 => "Locked",
|
56
|
+
424 => "Failed Dependency",
|
57
|
+
425 => "Too Early",
|
58
|
+
426 => "Upgrade Required",
|
59
|
+
428 => "Precondition Required",
|
60
|
+
429 => "Too Many Requests",
|
61
|
+
431 => "Request Header Fields Too Large",
|
62
|
+
451 => "Unavailable For Legal Reasons",
|
63
|
+
500 => "Internal Server Error",
|
64
|
+
501 => "Not Implemented",
|
65
|
+
502 => "Bad Gateway",
|
66
|
+
503 => "Service Unavailable",
|
67
|
+
504 => "Gateway Timeout",
|
68
|
+
505 => "HTTP Version Not Supported",
|
69
|
+
506 => "Variant Also Negotiates",
|
70
|
+
507 => "Insufficient Storage",
|
71
|
+
508 => "Loop Detected",
|
72
|
+
510 => "Not Extended",
|
73
|
+
511 => "Network Authentication Required"
|
74
|
+
},
|
75
|
+
T::Hash[Integer, String]
|
76
|
+
)
|
77
|
+
end
|
data/sorbet/config
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
**/*.rbi linguist-vendored=true
|
@@ -0,0 +1,119 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This file was pulled from a central RBI files repository.
|
5
|
+
# Please run `bin/tapioca annotations` to update it.
|
6
|
+
|
7
|
+
module Minitest::Assertions
|
8
|
+
sig { params(test: T.anything, msg: T.anything).returns(TrueClass) }
|
9
|
+
def assert(test, msg = nil); end
|
10
|
+
|
11
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
12
|
+
def assert_empty(obj, msg = nil); end
|
13
|
+
|
14
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
15
|
+
def assert_equal(exp, act, msg = nil); end
|
16
|
+
|
17
|
+
sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) }
|
18
|
+
def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end
|
19
|
+
|
20
|
+
sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) }
|
21
|
+
def assert_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end
|
22
|
+
|
23
|
+
sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
24
|
+
def assert_includes(collection, obj, msg = nil); end
|
25
|
+
|
26
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
27
|
+
def assert_instance_of(cls, obj, msg = nil); end
|
28
|
+
|
29
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
30
|
+
def assert_kind_of(cls, obj, msg = nil); end
|
31
|
+
|
32
|
+
sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(MatchData) }
|
33
|
+
def assert_match(matcher, obj, msg = nil); end
|
34
|
+
|
35
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
36
|
+
def assert_nil(obj, msg = nil); end
|
37
|
+
|
38
|
+
sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) }
|
39
|
+
def assert_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end
|
40
|
+
|
41
|
+
sig { params(stdout: T.nilable(T.any(String, Regexp)), stderr: T.nilable(T.any(String, Regexp)), block: T.proc.void).returns(T::Boolean) }
|
42
|
+
def assert_output(stdout = nil, stderr = nil, &block); end
|
43
|
+
|
44
|
+
sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) }
|
45
|
+
def assert_path_exists(path, msg = nil); end
|
46
|
+
|
47
|
+
sig { params(block: T.proc.void).returns(TrueClass) }
|
48
|
+
def assert_pattern(&block); end
|
49
|
+
|
50
|
+
sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) }
|
51
|
+
def assert_predicate(o1, op, msg = nil); end
|
52
|
+
|
53
|
+
sig { params(exp: NilClass, block: T.proc.void).returns(StandardError) }
|
54
|
+
sig { type_parameters(:T).params(exp: T.any(T::Class[T.type_parameter(:T)], Regexp, String), block: T.proc.void).returns(T.type_parameter(:T)) }
|
55
|
+
def assert_raises(*exp, &block); end
|
56
|
+
|
57
|
+
sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) }
|
58
|
+
def assert_respond_to(obj, meth, msg = nil, include_all: false); end
|
59
|
+
|
60
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
61
|
+
def assert_same(exp, act, msg = nil); end
|
62
|
+
|
63
|
+
sig { params(send_ary: T::Array[T.anything], m: T.anything).returns(T::Boolean) }
|
64
|
+
def assert_send(send_ary, m = nil); end
|
65
|
+
|
66
|
+
sig { params(block: T.proc.void).returns(T::Boolean) }
|
67
|
+
def assert_silent(&block); end
|
68
|
+
|
69
|
+
sig { params(sym: Symbol, msg: T.anything, block: T.proc.void).returns(T.anything) }
|
70
|
+
def assert_throws(sym, msg = nil, &block); end
|
71
|
+
|
72
|
+
sig { params(test: T.anything, msg: T.anything).returns(TrueClass) }
|
73
|
+
def refute(test, msg = nil); end
|
74
|
+
|
75
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
76
|
+
def refute_empty(obj, msg = nil); end
|
77
|
+
|
78
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
79
|
+
def refute_equal(exp, act, msg = nil); end
|
80
|
+
|
81
|
+
sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) }
|
82
|
+
def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end
|
83
|
+
|
84
|
+
sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) }
|
85
|
+
def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end
|
86
|
+
|
87
|
+
sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
88
|
+
def refute_includes(collection, obj, msg = nil); end
|
89
|
+
|
90
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
91
|
+
def refute_instance_of(cls, obj, msg = nil); end
|
92
|
+
|
93
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
94
|
+
def refute_kind_of(cls, obj, msg = nil); end
|
95
|
+
|
96
|
+
sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(TrueClass) }
|
97
|
+
def refute_match(matcher, obj, msg = nil); end
|
98
|
+
|
99
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
100
|
+
def refute_nil(obj, msg = nil); end
|
101
|
+
|
102
|
+
sig { params(block: T.proc.void).returns(TrueClass) }
|
103
|
+
def refute_pattern(&block); end
|
104
|
+
|
105
|
+
sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) }
|
106
|
+
def refute_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end
|
107
|
+
|
108
|
+
sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) }
|
109
|
+
def refute_path_exists(path, msg = nil); end
|
110
|
+
|
111
|
+
sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) }
|
112
|
+
def refute_predicate(o1, op, msg = nil); end
|
113
|
+
|
114
|
+
sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) }
|
115
|
+
def refute_respond_to(obj, meth, msg = nil, include_all: false); end
|
116
|
+
|
117
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
118
|
+
def refute_same(exp, act, msg = nil); end
|
119
|
+
end
|
@@ -0,0 +1,269 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This file was pulled from a central RBI files repository.
|
5
|
+
# Please run `bin/tapioca annotations` to update it.
|
6
|
+
|
7
|
+
module Rainbow
|
8
|
+
# @shim: https://github.com/sickill/rainbow/blob/master/lib/rainbow.rb#L10-L12
|
9
|
+
sig { returns(T::Boolean) }
|
10
|
+
attr_accessor :enabled
|
11
|
+
|
12
|
+
class Color
|
13
|
+
sig { returns(Symbol) }
|
14
|
+
attr_reader :ground
|
15
|
+
|
16
|
+
sig { params(ground: Symbol, values: T.any([Integer], [Integer, Integer, Integer])).returns(Color) }
|
17
|
+
def self.build(ground, values); end
|
18
|
+
|
19
|
+
sig { params(hex: String).returns([Integer, Integer, Integer]) }
|
20
|
+
def self.parse_hex_color(hex); end
|
21
|
+
|
22
|
+
class Indexed < Rainbow::Color
|
23
|
+
sig { returns(Integer) }
|
24
|
+
attr_reader :num
|
25
|
+
|
26
|
+
sig { params(ground: Symbol, num: Integer).void }
|
27
|
+
def initialize(ground, num); end
|
28
|
+
|
29
|
+
sig { returns(T::Array[Integer]) }
|
30
|
+
def codes; end
|
31
|
+
end
|
32
|
+
|
33
|
+
class Named < Rainbow::Color::Indexed
|
34
|
+
NAMES = T.let(nil, T::Hash[Symbol, Integer])
|
35
|
+
|
36
|
+
sig { params(ground: Symbol, name: Symbol).void }
|
37
|
+
def initialize(ground, name); end
|
38
|
+
|
39
|
+
sig { returns(T::Array[Symbol]) }
|
40
|
+
def self.color_names; end
|
41
|
+
|
42
|
+
sig { returns(String) }
|
43
|
+
def self.valid_names; end
|
44
|
+
end
|
45
|
+
|
46
|
+
class RGB < Rainbow::Color::Indexed
|
47
|
+
sig { returns(Integer) }
|
48
|
+
attr_reader :r, :g, :b
|
49
|
+
|
50
|
+
sig { params(ground: Symbol, values: Integer).void }
|
51
|
+
def initialize(ground, *values); end
|
52
|
+
|
53
|
+
sig { returns(T::Array[Integer]) }
|
54
|
+
def codes; end
|
55
|
+
|
56
|
+
sig { params(value: Numeric).returns(Integer) }
|
57
|
+
def self.to_ansi_domain(value); end
|
58
|
+
end
|
59
|
+
|
60
|
+
class X11Named < Rainbow::Color::RGB
|
61
|
+
include Rainbow::X11ColorNames
|
62
|
+
|
63
|
+
sig { params(ground: Symbol, name: Symbol).void }
|
64
|
+
def initialize(ground, name); end
|
65
|
+
|
66
|
+
sig { returns(T::Array[Symbol]) }
|
67
|
+
def self.color_names; end
|
68
|
+
|
69
|
+
sig { returns(String) }
|
70
|
+
def self.valid_names; end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
sig { returns(Wrapper) }
|
75
|
+
def self.global; end
|
76
|
+
|
77
|
+
sig { returns(T::Boolean) }
|
78
|
+
def self.enabled; end
|
79
|
+
|
80
|
+
sig { params(value: T::Boolean).returns(T::Boolean) }
|
81
|
+
def self.enabled=(value); end
|
82
|
+
|
83
|
+
sig { params(string: String).returns(String) }
|
84
|
+
def self.uncolor(string); end
|
85
|
+
|
86
|
+
class NullPresenter < String
|
87
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
|
88
|
+
def color(*values); end
|
89
|
+
|
90
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
|
91
|
+
def foreground(*values); end
|
92
|
+
|
93
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
|
94
|
+
def fg(*values); end
|
95
|
+
|
96
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
|
97
|
+
def background(*values); end
|
98
|
+
|
99
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) }
|
100
|
+
def bg(*values); end
|
101
|
+
|
102
|
+
sig { returns(NullPresenter) }
|
103
|
+
def reset; end
|
104
|
+
|
105
|
+
sig { returns(NullPresenter) }
|
106
|
+
def bright; end
|
107
|
+
|
108
|
+
sig { returns(NullPresenter) }
|
109
|
+
def faint; end
|
110
|
+
|
111
|
+
sig { returns(NullPresenter) }
|
112
|
+
def italic; end
|
113
|
+
|
114
|
+
sig { returns(NullPresenter) }
|
115
|
+
def underline; end
|
116
|
+
|
117
|
+
sig { returns(NullPresenter) }
|
118
|
+
def blink; end
|
119
|
+
|
120
|
+
sig { returns(NullPresenter) }
|
121
|
+
def inverse; end
|
122
|
+
|
123
|
+
sig { returns(NullPresenter) }
|
124
|
+
def hide; end
|
125
|
+
|
126
|
+
sig { returns(NullPresenter) }
|
127
|
+
def cross_out; end
|
128
|
+
|
129
|
+
sig { returns(NullPresenter) }
|
130
|
+
def black; end
|
131
|
+
|
132
|
+
sig { returns(NullPresenter) }
|
133
|
+
def red; end
|
134
|
+
|
135
|
+
sig { returns(NullPresenter) }
|
136
|
+
def green; end
|
137
|
+
|
138
|
+
sig { returns(NullPresenter) }
|
139
|
+
def yellow; end
|
140
|
+
|
141
|
+
sig { returns(NullPresenter) }
|
142
|
+
def blue; end
|
143
|
+
|
144
|
+
sig { returns(NullPresenter) }
|
145
|
+
def magenta; end
|
146
|
+
|
147
|
+
sig { returns(NullPresenter) }
|
148
|
+
def cyan; end
|
149
|
+
|
150
|
+
sig { returns(NullPresenter) }
|
151
|
+
def white; end
|
152
|
+
|
153
|
+
sig { returns(NullPresenter) }
|
154
|
+
def bold; end
|
155
|
+
|
156
|
+
sig { returns(NullPresenter) }
|
157
|
+
def dark; end
|
158
|
+
|
159
|
+
sig { returns(NullPresenter) }
|
160
|
+
def strike; end
|
161
|
+
end
|
162
|
+
|
163
|
+
class Presenter < String
|
164
|
+
TERM_EFFECTS = T.let(nil, T::Hash[Symbol, Integer])
|
165
|
+
|
166
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
|
167
|
+
def color(*values); end
|
168
|
+
|
169
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
|
170
|
+
def foreground(*values); end
|
171
|
+
|
172
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
|
173
|
+
def fg(*values); end
|
174
|
+
|
175
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
|
176
|
+
def background(*values); end
|
177
|
+
|
178
|
+
sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) }
|
179
|
+
def bg(*values); end
|
180
|
+
|
181
|
+
sig { returns(Presenter) }
|
182
|
+
def reset; end
|
183
|
+
|
184
|
+
sig { returns(Presenter) }
|
185
|
+
def bright; end
|
186
|
+
|
187
|
+
sig { returns(Presenter) }
|
188
|
+
def faint; end
|
189
|
+
|
190
|
+
sig { returns(Presenter) }
|
191
|
+
def italic; end
|
192
|
+
|
193
|
+
sig { returns(Presenter) }
|
194
|
+
def underline; end
|
195
|
+
|
196
|
+
sig { returns(Presenter) }
|
197
|
+
def blink; end
|
198
|
+
|
199
|
+
sig { returns(Presenter) }
|
200
|
+
def inverse; end
|
201
|
+
|
202
|
+
sig { returns(Presenter) }
|
203
|
+
def hide; end
|
204
|
+
|
205
|
+
sig { returns(Presenter) }
|
206
|
+
def cross_out; end
|
207
|
+
|
208
|
+
sig { returns(Presenter) }
|
209
|
+
def black; end
|
210
|
+
|
211
|
+
sig { returns(Presenter) }
|
212
|
+
def red; end
|
213
|
+
|
214
|
+
sig { returns(Presenter) }
|
215
|
+
def green; end
|
216
|
+
|
217
|
+
sig { returns(Presenter) }
|
218
|
+
def yellow; end
|
219
|
+
|
220
|
+
sig { returns(Presenter) }
|
221
|
+
def blue; end
|
222
|
+
|
223
|
+
sig { returns(Presenter) }
|
224
|
+
def magenta; end
|
225
|
+
|
226
|
+
sig { returns(Presenter) }
|
227
|
+
def cyan; end
|
228
|
+
|
229
|
+
sig { returns(Presenter) }
|
230
|
+
def white; end
|
231
|
+
|
232
|
+
sig { returns(Presenter) }
|
233
|
+
def bold; end
|
234
|
+
|
235
|
+
sig { returns(Presenter) }
|
236
|
+
def dark; end
|
237
|
+
|
238
|
+
sig { returns(Presenter) }
|
239
|
+
def strike; end
|
240
|
+
end
|
241
|
+
|
242
|
+
class StringUtils
|
243
|
+
sig { params(string: String, codes: T::Array[Integer]).returns(String) }
|
244
|
+
def self.wrap_with_sgr(string, codes); end
|
245
|
+
|
246
|
+
sig { params(string: String).returns(String) }
|
247
|
+
def self.uncolor(string); end
|
248
|
+
end
|
249
|
+
|
250
|
+
VERSION = T.let(nil, String)
|
251
|
+
|
252
|
+
class Wrapper
|
253
|
+
sig { returns(T::Boolean) }
|
254
|
+
attr_accessor :enabled
|
255
|
+
|
256
|
+
sig { params(enabled: T::Boolean).void }
|
257
|
+
def initialize(enabled = true); end
|
258
|
+
|
259
|
+
sig { params(string: String).returns(T.any(Rainbow::Presenter, Rainbow::NullPresenter)) }
|
260
|
+
def wrap(string); end
|
261
|
+
end
|
262
|
+
|
263
|
+
module X11ColorNames
|
264
|
+
NAMES = T.let(nil, T::Hash[Symbol, [Integer, Integer, Integer]])
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
sig { params(string: String).returns(Rainbow::Presenter) }
|
269
|
+
def Rainbow(string); end
|
@@ -0,0 +1 @@
|
|
1
|
+
**/*.rbi linguist-generated=true
|