shopify-ruby-definitions 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +7 -0
  2. data/.rubocop.yml +22 -0
  3. data/Gemfile +12 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +0 -0
  6. data/Rakefile +16 -0
  7. data/lib/shopify_ruby_definitions/ruby_build.rb +10 -0
  8. data/lib/shopify_ruby_definitions/ruby_versions.rb +49 -0
  9. data/lib/shopify_ruby_definitions/version.rb +6 -0
  10. data/lib/shopify_ruby_definitions.rb +12 -0
  11. data/sorbet/config +4 -0
  12. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  13. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  14. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
  15. data/sorbet/rbi/gems/json@2.6.3.rbi +1533 -0
  16. data/sorbet/rbi/gems/minitest@5.18.0.rbi +1491 -0
  17. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  18. data/sorbet/rbi/gems/parallel@1.23.0.rbi +273 -0
  19. data/sorbet/rbi/gems/parser@3.2.2.1.rbi +7253 -0
  20. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +402 -0
  21. data/sorbet/rbi/gems/rake@13.0.6.rbi +3024 -0
  22. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3049 -0
  23. data/sorbet/rbi/gems/regexp_parser@2.8.0.rbi +3748 -0
  24. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4717 -0
  25. data/sorbet/rbi/gems/rubocop-ast@1.28.1.rbi +6969 -0
  26. data/sorbet/rbi/gems/rubocop-minitest@0.31.0.rbi +2528 -0
  27. data/sorbet/rbi/gems/rubocop-shopify@2.13.0.rbi +8 -0
  28. data/sorbet/rbi/gems/rubocop@1.51.0.rbi +55313 -0
  29. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1317 -0
  30. data/sorbet/rbi/gems/spoom@1.2.1.rbi +2536 -0
  31. data/sorbet/rbi/gems/tapioca@0.11.6.rbi +3301 -0
  32. data/sorbet/rbi/gems/thor@1.2.2.rbi +3965 -0
  33. data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +65 -0
  34. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4524 -0
  35. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
  36. data/sorbet/rbi/gems/yard@0.9.34.rbi +18219 -0
  37. data/sorbet/tapioca/config.yml +13 -0
  38. data/sorbet/tapioca/require.rb +4 -0
  39. data/vendor/ruby-build/LICENSE +19 -0
  40. data/vendor/ruby-build/bin/ruby-build +1572 -0
  41. data/vendor/ruby-build/share/ruby-build/2.6.0 +2 -0
  42. data/vendor/ruby-build/share/ruby-build/2.6.0-dev +2 -0
  43. data/vendor/ruby-build/share/ruby-build/2.6.0-preview1 +2 -0
  44. data/vendor/ruby-build/share/ruby-build/2.6.0-preview2 +2 -0
  45. data/vendor/ruby-build/share/ruby-build/2.6.0-preview3 +2 -0
  46. data/vendor/ruby-build/share/ruby-build/2.6.0-rc1 +2 -0
  47. data/vendor/ruby-build/share/ruby-build/2.6.0-rc2 +2 -0
  48. data/vendor/ruby-build/share/ruby-build/2.6.1 +2 -0
  49. data/vendor/ruby-build/share/ruby-build/2.6.10 +2 -0
  50. data/vendor/ruby-build/share/ruby-build/2.6.2 +2 -0
  51. data/vendor/ruby-build/share/ruby-build/2.6.3 +2 -0
  52. data/vendor/ruby-build/share/ruby-build/2.6.4 +2 -0
  53. data/vendor/ruby-build/share/ruby-build/2.6.5 +2 -0
  54. data/vendor/ruby-build/share/ruby-build/2.6.6 +2 -0
  55. data/vendor/ruby-build/share/ruby-build/2.6.7 +2 -0
  56. data/vendor/ruby-build/share/ruby-build/2.6.8 +2 -0
  57. data/vendor/ruby-build/share/ruby-build/2.6.9 +2 -0
  58. data/vendor/ruby-build/share/ruby-build/2.7.0 +2 -0
  59. data/vendor/ruby-build/share/ruby-build/2.7.0-dev +2 -0
  60. data/vendor/ruby-build/share/ruby-build/2.7.0-preview1 +2 -0
  61. data/vendor/ruby-build/share/ruby-build/2.7.0-preview2 +2 -0
  62. data/vendor/ruby-build/share/ruby-build/2.7.0-preview3 +2 -0
  63. data/vendor/ruby-build/share/ruby-build/2.7.0-rc1 +2 -0
  64. data/vendor/ruby-build/share/ruby-build/2.7.0-rc2 +2 -0
  65. data/vendor/ruby-build/share/ruby-build/2.7.1 +2 -0
  66. data/vendor/ruby-build/share/ruby-build/2.7.2 +2 -0
  67. data/vendor/ruby-build/share/ruby-build/2.7.3 +2 -0
  68. data/vendor/ruby-build/share/ruby-build/2.7.4 +2 -0
  69. data/vendor/ruby-build/share/ruby-build/2.7.5 +2 -0
  70. data/vendor/ruby-build/share/ruby-build/2.7.6 +2 -0
  71. data/vendor/ruby-build/share/ruby-build/2.7.7 +2 -0
  72. data/vendor/ruby-build/share/ruby-build/2.7.8 +2 -0
  73. data/vendor/ruby-build/share/ruby-build/3.0.0 +2 -0
  74. data/vendor/ruby-build/share/ruby-build/3.0.0-dev +2 -0
  75. data/vendor/ruby-build/share/ruby-build/3.0.0-preview1 +2 -0
  76. data/vendor/ruby-build/share/ruby-build/3.0.0-preview2 +2 -0
  77. data/vendor/ruby-build/share/ruby-build/3.0.0-pshopify9 +9 -0
  78. data/vendor/ruby-build/share/ruby-build/3.0.0-rc1 +2 -0
  79. data/vendor/ruby-build/share/ruby-build/3.0.1 +2 -0
  80. data/vendor/ruby-build/share/ruby-build/3.0.1-pshopify2 +7 -0
  81. data/vendor/ruby-build/share/ruby-build/3.0.2 +2 -0
  82. data/vendor/ruby-build/share/ruby-build/3.0.2-pshopify3 +11 -0
  83. data/vendor/ruby-build/share/ruby-build/3.0.3 +2 -0
  84. data/vendor/ruby-build/share/ruby-build/3.0.4 +2 -0
  85. data/vendor/ruby-build/share/ruby-build/3.0.5 +2 -0
  86. data/vendor/ruby-build/share/ruby-build/3.0.6 +2 -0
  87. data/vendor/ruby-build/share/ruby-build/3.1.0 +2 -0
  88. data/vendor/ruby-build/share/ruby-build/3.1.0-dev +2 -0
  89. data/vendor/ruby-build/share/ruby-build/3.1.0-preview1 +2 -0
  90. data/vendor/ruby-build/share/ruby-build/3.1.0-pshopify1 +9 -0
  91. data/vendor/ruby-build/share/ruby-build/3.1.1 +2 -0
  92. data/vendor/ruby-build/share/ruby-build/3.1.1-pshopify2 +8 -0
  93. data/vendor/ruby-build/share/ruby-build/3.1.2 +2 -0
  94. data/vendor/ruby-build/share/ruby-build/3.1.2-pshopify2 +10 -0
  95. data/vendor/ruby-build/share/ruby-build/3.1.3 +2 -0
  96. data/vendor/ruby-build/share/ruby-build/3.1.3-pshopify1 +9 -0
  97. data/vendor/ruby-build/share/ruby-build/3.1.4 +2 -0
  98. data/vendor/ruby-build/share/ruby-build/3.1.4-pshopify1 +8 -0
  99. data/vendor/ruby-build/share/ruby-build/3.2.0 +2 -0
  100. data/vendor/ruby-build/share/ruby-build/3.2.0-dev +2 -0
  101. data/vendor/ruby-build/share/ruby-build/3.2.0-preview1 +2 -0
  102. data/vendor/ruby-build/share/ruby-build/3.2.0-preview2 +2 -0
  103. data/vendor/ruby-build/share/ruby-build/3.2.0-preview3 +2 -0
  104. data/vendor/ruby-build/share/ruby-build/3.2.0-pshopify2 +12 -0
  105. data/vendor/ruby-build/share/ruby-build/3.2.0-rc1 +2 -0
  106. data/vendor/ruby-build/share/ruby-build/3.2.1 +2 -0
  107. data/vendor/ruby-build/share/ruby-build/3.2.1-pshopify5 +29 -0
  108. data/vendor/ruby-build/share/ruby-build/3.2.2 +2 -0
  109. data/vendor/ruby-build/share/ruby-build/3.2.2-pshopify3 +33 -0
  110. data/vendor/ruby-build/share/ruby-build/3.3.0-dev +2 -0
  111. data/vendor/ruby-build/share/ruby-build/3.3.0-preview1 +2 -0
  112. data/vendor/ruby-build/share/ruby-build/truffleruby-21.0.0 +13 -0
  113. data/vendor/ruby-build/share/ruby-build/truffleruby-21.1.0 +13 -0
  114. data/vendor/ruby-build/share/ruby-build/truffleruby-21.2.0 +17 -0
  115. data/vendor/ruby-build/share/ruby-build/truffleruby-21.2.0.1 +17 -0
  116. data/vendor/ruby-build/share/ruby-build/truffleruby-21.3.0 +17 -0
  117. data/vendor/ruby-build/share/ruby-build/truffleruby-22.0.0.2 +17 -0
  118. data/vendor/ruby-build/share/ruby-build/truffleruby-22.1.0 +17 -0
  119. data/vendor/ruby-build/share/ruby-build/truffleruby-22.2.0 +21 -0
  120. data/vendor/ruby-build/share/ruby-build/truffleruby-22.3.0 +21 -0
  121. data/vendor/ruby-build/share/ruby-build/truffleruby-22.3.1 +21 -0
  122. data/vendor/ruby-build/share/ruby-build/truffleruby-23.0.0-preview1 +21 -0
  123. data/vendor/ruby-build/share/ruby-build/truffleruby-dev +21 -0
  124. data/vendor/ruby-build/share/ruby-build/yjit-3.1.0-dev +2 -0
  125. metadata +252 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5067296d614e5c63925e48e05e2b3829f3d9fb9f6dda555c501b8e25fb764b8a
4
+ data.tar.gz: a2139541d35fd111e3d2d60d050ddfe10f15ba7a5602c0699009c2f2b34526ec
5
+ SHA512:
6
+ metadata.gz: b130cb636ff8890333784aa974ed9769e53ccb05a8b02a290b1e9f0551482abcb3ad05011e6706b0f91b3c686f971a9ebefe482652a05a83d251dd54ea2215c6
7
+ data.tar.gz: 7632aa4f7e2a9690e478064952b5898ba38c1cb0de7dab44d78fa8b29ee8d40cfbc54a3d0d0c7e2b006d2a65e5dd8f940f1a4b0da832bcd117b6b35ec77adb56
data/.rubocop.yml ADDED
@@ -0,0 +1,22 @@
1
+ inherit_gem:
2
+ rubocop-shopify: rubocop.yml
3
+
4
+ require:
5
+ - rubocop-minitest
6
+ - rubocop-sorbet
7
+
8
+ AllCops:
9
+ NewCops: enable
10
+ SuggestExtensions: false
11
+ TargetRubyVersion: 2.6
12
+
13
+ Style/StringLiterals:
14
+ Enabled: true
15
+ EnforcedStyle: double_quotes
16
+
17
+ Style/StringLiteralsInInterpolation:
18
+ Enabled: true
19
+ EnforcedStyle: double_quotes
20
+
21
+ Layout/LineLength:
22
+ Max: 120
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in shopfiy_ruby_definitions.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "minitest", "~> 5.0"
11
+
12
+ gem "rubocop", "~> 1.21"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Peter Zhu
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
File without changes
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << "test"
8
+ t.libs << "lib"
9
+ t.test_files = FileList["test/**/test_*.rb"]
10
+ end
11
+
12
+ require "rubocop/rake_task"
13
+
14
+ RuboCop::RakeTask.new
15
+
16
+ task default: [:test, :rubocop]
@@ -0,0 +1,10 @@
1
+ # typed: strong
2
+ # frozen_string_literal: true
3
+
4
+ module ShopifyRubyDefinitions
5
+ module RubyBuild
6
+ extend T::Sig
7
+
8
+ RUBY_BUILD_DIRECTORY = T.let(File.expand_path("../../../vendor/ruby-build", __FILE__), String)
9
+ end
10
+ end
@@ -0,0 +1,49 @@
1
+ # typed: strong
2
+ # frozen_string_literal: true
3
+
4
+ module ShopifyRubyDefinitions
5
+ module RubyVersions
6
+ extend T::Sig
7
+
8
+ VERSIONS_DIRECTORY = T.let(File.join(RubyBuild::RUBY_BUILD_DIRECTORY, "share/ruby-build"), String)
9
+ ALL_VERSIONS = T.let(Dir["#{VERSIONS_DIRECTORY}/*"].map { |f| File.basename(f) }, T::Array[String])
10
+
11
+ sig { returns(T::Hash[String, String]) }
12
+ def version_overrides
13
+ {
14
+ "head" => ruby_head_version,
15
+ "ruby-head" => ruby_head_version,
16
+ "3.0.0" => "3.0.0-pshopify9",
17
+ "3.0.1" => "3.0.1-pshopify2",
18
+ "3.0.2" => "3.0.2-pshopify3",
19
+ "3.1.0" => "3.1.0-pshopify1",
20
+ "3.1.1" => "3.1.1-pshopify2",
21
+ "3.1.2" => "3.1.2-pshopify2",
22
+ "3.1.3" => "3.1.3-pshopify1",
23
+ "3.1.4" => "3.1.4-pshopify1",
24
+ "3.2.0" => "3.2.0-pshopify2",
25
+ "3.2.1" => "3.2.1-pshopify5",
26
+ "3.2.2" => "3.2.2-pshopify3",
27
+ }.freeze
28
+ end
29
+
30
+ sig { params(version: String).returns(String) }
31
+ def resolve_version(version)
32
+ if version.match?(/\A\d+\.\d+\z/)
33
+ pattern = /\A#{Regexp.escape(version)}\.(\d+)\z/
34
+ versions = ALL_VERSIONS.grep(pattern)
35
+ unless versions.empty?
36
+ version = T.must(versions.max_by { |v| T.must(v.match(pattern))[1].to_i })
37
+ end
38
+ end
39
+ version_overrides.fetch(version, version)
40
+ end
41
+
42
+ private
43
+
44
+ sig { returns(String) }
45
+ def ruby_head_version
46
+ T.must(ALL_VERSIONS.grep(/\A[\d\.]+-dev\z/).max)
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,6 @@
1
+ # typed: strong
2
+ # frozen_string_literal: true
3
+
4
+ module ShopifyRubyDefinitions
5
+ VERSION = "0.0.1"
6
+ end
@@ -0,0 +1,12 @@
1
+ # typed: strong
2
+ # frozen_string_literal: true
3
+
4
+ require "sorbet-runtime"
5
+
6
+ require_relative "shopify_ruby_definitions/ruby_build"
7
+ require_relative "shopify_ruby_definitions/ruby_versions"
8
+ require_relative "shopify_ruby_definitions/version"
9
+
10
+ module ShopifyRubyDefinitions
11
+ extend RubyVersions
12
+ end
data/sorbet/config ADDED
@@ -0,0 +1,4 @@
1
+ --dir
2
+ .
3
+ --ignore=tmp/
4
+ --ignore=vendor/
@@ -0,0 +1,269 @@
1
+ # typed: strict
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 { returns(T::Array[Symbol]) }
64
+ def self.color_names; end
65
+
66
+ sig { returns(String) }
67
+ def self.valid_names; end
68
+
69
+ sig { params(ground: Symbol, name: Symbol).void }
70
+ def initialize(ground, name); 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