decentworks-date-support 0.1.0
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.
- checksums.yaml +7 -0
- data/.gem_rbs_collection/actionpack/7.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/actionpack/7.2/actioncontroller-7.2.rbs +14 -0
- data/.gem_rbs_collection/actionpack/7.2/actioncontroller.rbs +290 -0
- data/.gem_rbs_collection/actionpack/7.2/actiondispatch.rbs +349 -0
- data/.gem_rbs_collection/actionpack/7.2/actionpack-generated.rbs +11497 -0
- data/.gem_rbs_collection/actionpack/7.2/patch.rbs +77 -0
- data/.gem_rbs_collection/actionview/6.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/actionview/6.0/actionview-generated.rbs +8976 -0
- data/.gem_rbs_collection/actionview/6.0/actionview.rbs +1940 -0
- data/.gem_rbs_collection/actionview/6.0/patch.rbs +57 -0
- data/.gem_rbs_collection/activesupport/7.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/activesupport/7.0/activesupport-7.0.rbs +381 -0
- data/.gem_rbs_collection/activesupport/7.0/activesupport-generated.rbs +11633 -0
- data/.gem_rbs_collection/activesupport/7.0/activesupport.rbs +724 -0
- data/.gem_rbs_collection/activesupport/7.0/manifest.yaml +15 -0
- data/.gem_rbs_collection/activesupport/7.0/patch.rbs +55 -0
- data/.gem_rbs_collection/ast/2.4/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/ast/2.4/ast.rbs +73 -0
- data/.gem_rbs_collection/cgi/0.5/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/cgi/0.5/core.rbs +925 -0
- data/.gem_rbs_collection/cgi/0.5/manifest.yaml +3 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/array.rbs +4 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/atomic_reference.rbs +16 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/executor.rbs +96 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/hash.rbs +4 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/map.rbs +68 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/promises.rbs +249 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/set.rbs +4 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/timer_task.rbs +47 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/utility/processor_counter.rbs +5 -0
- data/.gem_rbs_collection/connection_pool/2.4/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/connection_pool/2.4/connection_pool.rbs +34 -0
- data/.gem_rbs_collection/connection_pool/2.4/manifest.yaml +2 -0
- data/.gem_rbs_collection/diff-lcs/1.5/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/diff-lcs/1.5/diff-lcs.rbs +11 -0
- data/.gem_rbs_collection/faker/3.4.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/faker/3.4.2/faker-2.23.rbs +90 -0
- data/.gem_rbs_collection/faker/3.4.2/faker.rbs +18 -0
- data/.gem_rbs_collection/i18n/1.10/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/i18n/1.10/backend.rbs +274 -0
- data/.gem_rbs_collection/i18n/1.10/i18n.rbs +116 -0
- data/.gem_rbs_collection/lint_roller/1.1/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/lint_roller/1.1/lint_roller.rbs +48 -0
- data/.gem_rbs_collection/minitest/5.25/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/abstract_reporter.rbs +52 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/assertion.rbs +17 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/assertions.rbs +590 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/backtrace_filter.rbs +23 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/bench_spec.rbs +102 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/benchmark.rbs +259 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/composite_reporter.rbs +25 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/compress.rbs +13 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/error_on_warning.rbs +3 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/expectation.rbs +2 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/expectations.rbs +21 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/guard.rbs +64 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/mock.rbs +64 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel/executor.rbs +46 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel/test/class_methods.rbs +5 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel/test.rbs +3 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/parallel.rbs +2 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/pride_io.rbs +62 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/pride_lol.rbs +19 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/progress_reporter.rbs +11 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/reportable.rbs +53 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/reporter.rbs +5 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/result.rbs +28 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/runnable.rbs +163 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/skip.rbs +6 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/spec/dsl/instance_methods.rbs +48 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/spec/dsl.rbs +129 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/spec.rbs +11 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/statistics_reporter.rbs +81 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/summary_reporter.rbs +18 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/test/lifecycle_hooks.rbs +92 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/test.rbs +69 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/unexpected_error.rbs +12 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/unexpected_warning.rbs +6 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/unit/test_case.rbs +3 -0
- data/.gem_rbs_collection/minitest/5.25/minitest/unit.rbs +4 -0
- data/.gem_rbs_collection/minitest/5.25/minitest.rbs +115 -0
- data/.gem_rbs_collection/nokogiri/1.11/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/nokogiri/1.11/nokogiri.rbs +2332 -0
- data/.gem_rbs_collection/nokogiri/1.11/patch.rbs +4 -0
- data/.gem_rbs_collection/parallel/1.20/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/parallel/1.20/parallel.rbs +86 -0
- data/.gem_rbs_collection/parser/3.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/parser/3.2/manifest.yaml +7 -0
- data/.gem_rbs_collection/parser/3.2/parser.rbs +194 -0
- data/.gem_rbs_collection/parser/3.2/polyfill.rbs +4 -0
- data/.gem_rbs_collection/rack/2.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rack/2.2/manifest.yaml +3 -0
- data/.gem_rbs_collection/rack/2.2/rack.rbs +1480 -0
- data/.gem_rbs_collection/rails-dom-testing/2.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rails-dom-testing/2.0/rails-dom-testing.rbs +51 -0
- data/.gem_rbs_collection/rails-html-sanitizer/1.6/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rails-html-sanitizer/1.6/rails-html-sanitizer.rbs +53 -0
- data/.gem_rbs_collection/railties/6.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/railties/6.0/manifest.yaml +2 -0
- data/.gem_rbs_collection/railties/6.0/patch.rbs +17 -0
- data/.gem_rbs_collection/railties/6.0/railties-generated.rbs +4822 -0
- data/.gem_rbs_collection/railties/6.0/railties.rbs +44 -0
- data/.gem_rbs_collection/rainbow/3.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rainbow/3.0/global.rbs +7 -0
- data/.gem_rbs_collection/rainbow/3.0/presenter.rbs +209 -0
- data/.gem_rbs_collection/rainbow/3.0/rainbow.rbs +5 -0
- data/.gem_rbs_collection/rake/13.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rake/13.0/manifest.yaml +2 -0
- data/.gem_rbs_collection/rake/13.0/rake.rbs +39 -0
- data/.gem_rbs_collection/regexp_parser/2.8/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/regexp_parser/2.8/regexp_parser.rbs +17 -0
- data/.gem_rbs_collection/rubocop/1.57/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rubocop/1.57/rubocop.rbs +208 -0
- data/.gem_rbs_collection/rubocop-ast/1.46/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rubocop-ast/1.46/rubocop-ast.rbs +903 -0
- data/.gem_rbs_collection/thor/1.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/thor/1.2/thor.rbs +62 -0
- data/.gem_rbs_collection/tzinfo/2.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/tzinfo/2.0/manifest.yaml +7 -0
- data/.gem_rbs_collection/tzinfo/2.0/tzinfo.rbs +600 -0
- data/.rspec +3 -0
- data/.rubocop.yml +8 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +21 -0
- data/README.md +54 -0
- data/Rakefile +12 -0
- data/Steepfile +43 -0
- data/lib/decentworks/active_support/time_with_zone_support.rb +327 -0
- data/lib/decentworks/date/support/version.rb +9 -0
- data/lib/decentworks/date_support.rb +323 -0
- data/lib/decentworks_date_support.rb +4 -0
- data/rbs_collection.lock.yaml +288 -0
- data/rbs_collection.yaml +41 -0
- data/sig/decentworks/active_support/time_with_zone_support.rbs +109 -0
- data/sig/decentworks/date/support.rbs +8 -0
- data/sig/decentworks/date_support.rbs +107 -0
- metadata +197 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module Rails
|
|
2
|
+
module Configuration
|
|
3
|
+
class MiddlewareStackProxy
|
|
4
|
+
def delete: (*untyped args) ?{ () -> untyped } -> untyped
|
|
5
|
+
|
|
6
|
+
def insert_before: (*untyped args) ?{ () -> untyped } -> untyped
|
|
7
|
+
|
|
8
|
+
alias insert insert_before
|
|
9
|
+
|
|
10
|
+
def insert_after: (*untyped args) ?{ () -> untyped } -> untyped
|
|
11
|
+
|
|
12
|
+
def swap: (*untyped args) ?{ () -> untyped } -> untyped
|
|
13
|
+
|
|
14
|
+
def unshift: (*untyped args) ?{ () -> untyped } -> untyped
|
|
15
|
+
|
|
16
|
+
def use: (*untyped args) ?{ () -> untyped } -> untyped
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
module Rails
|
|
22
|
+
class Engine
|
|
23
|
+
# Defines the routes for this engine. If a block is given to
|
|
24
|
+
# routes, it is appended to the engine.
|
|
25
|
+
def routes: () ?{ () [self: ActionDispatch::Routing::Mapper] -> void } -> ActionDispatch::Routing::RouteSet
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
module Rails
|
|
30
|
+
module Generators
|
|
31
|
+
class PluginGenerator < AppBase
|
|
32
|
+
# It is necessary to satisfy alias target.
|
|
33
|
+
def app_path: () -> untyped
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
module Rails
|
|
39
|
+
def self.application: () -> Rails::Application
|
|
40
|
+
|
|
41
|
+
class Railties
|
|
42
|
+
extend Initializable::ClassMethods
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
module Rainbow
|
|
2
|
+
class Presenter < String
|
|
3
|
+
# Sets color of this text.
|
|
4
|
+
def color: (*Symbol values) -> instance
|
|
5
|
+
|
|
6
|
+
alias foreground color
|
|
7
|
+
|
|
8
|
+
alias fg color
|
|
9
|
+
|
|
10
|
+
# Sets background color of this text.
|
|
11
|
+
def background: (*Symbol values) -> instance
|
|
12
|
+
|
|
13
|
+
alias bg background
|
|
14
|
+
|
|
15
|
+
# Resets terminal to default colors/backgrounds.
|
|
16
|
+
#
|
|
17
|
+
# It shouldn't be needed to use this method because all methods
|
|
18
|
+
# append terminal reset code to end of string.
|
|
19
|
+
def reset: () -> instance
|
|
20
|
+
|
|
21
|
+
# Turns on bright/bold for this text.
|
|
22
|
+
def bright: () -> instance
|
|
23
|
+
|
|
24
|
+
alias bold bright
|
|
25
|
+
|
|
26
|
+
# Turns on faint/dark for this text (not well supported by terminal
|
|
27
|
+
# emulators).
|
|
28
|
+
def faint: () -> instance
|
|
29
|
+
|
|
30
|
+
# Turns on italic style for this text (not well supported by terminal
|
|
31
|
+
# emulators).
|
|
32
|
+
def italic: () -> instance
|
|
33
|
+
|
|
34
|
+
# Turns on underline decoration for this text.
|
|
35
|
+
def underline: () -> instance
|
|
36
|
+
|
|
37
|
+
# Turns on blinking attribute for this text (not well supported by terminal
|
|
38
|
+
# emulators).
|
|
39
|
+
def blink: () -> instance
|
|
40
|
+
|
|
41
|
+
# Inverses current foreground/background colors.
|
|
42
|
+
def inverse: () -> instance
|
|
43
|
+
|
|
44
|
+
# Hides this text (set its color to the same as background).
|
|
45
|
+
def hide: () -> instance
|
|
46
|
+
|
|
47
|
+
def black: () -> instance
|
|
48
|
+
|
|
49
|
+
def red: () -> instance
|
|
50
|
+
|
|
51
|
+
def green: () -> instance
|
|
52
|
+
|
|
53
|
+
def yellow: () -> instance
|
|
54
|
+
|
|
55
|
+
def blue: () -> instance
|
|
56
|
+
|
|
57
|
+
def magenta: () -> instance
|
|
58
|
+
|
|
59
|
+
def cyan: () -> instance
|
|
60
|
+
|
|
61
|
+
def white: () -> instance
|
|
62
|
+
|
|
63
|
+
# We take care of X11 color method call here.
|
|
64
|
+
# Such as #aqua, #ghostwhite.
|
|
65
|
+
def method_missing: (untyped method_name, *untyped args) -> untyped
|
|
66
|
+
|
|
67
|
+
def respond_to_missing?: (untyped method_name, *untyped args) -> bool
|
|
68
|
+
|
|
69
|
+
def wrap_with_sgr: (untyped codes) -> instance
|
|
70
|
+
|
|
71
|
+
def aliceblue: () -> instance
|
|
72
|
+
def antiquewhite: () -> instance
|
|
73
|
+
def aqua: () -> instance
|
|
74
|
+
def aquamarine: () -> instance
|
|
75
|
+
def azure: () -> instance
|
|
76
|
+
def beige: () -> instance
|
|
77
|
+
def bisque: () -> instance
|
|
78
|
+
def blanchedalmond: () -> instance
|
|
79
|
+
def blueviolet: () -> instance
|
|
80
|
+
def brown: () -> instance
|
|
81
|
+
def burlywood: () -> instance
|
|
82
|
+
def cadetblue: () -> instance
|
|
83
|
+
def chartreuse: () -> instance
|
|
84
|
+
def chocolate: () -> instance
|
|
85
|
+
def coral: () -> instance
|
|
86
|
+
def cornflower: () -> instance
|
|
87
|
+
def cornsilk: () -> instance
|
|
88
|
+
def crimson: () -> instance
|
|
89
|
+
def darkblue: () -> instance
|
|
90
|
+
def darkcyan: () -> instance
|
|
91
|
+
def darkgoldenrod: () -> instance
|
|
92
|
+
def darkgray: () -> instance
|
|
93
|
+
def darkgreen: () -> instance
|
|
94
|
+
def darkkhaki: () -> instance
|
|
95
|
+
def darkmagenta: () -> instance
|
|
96
|
+
def darkolivegreen: () -> instance
|
|
97
|
+
def darkorange: () -> instance
|
|
98
|
+
def darkorchid: () -> instance
|
|
99
|
+
def darkred: () -> instance
|
|
100
|
+
def darksalmon: () -> instance
|
|
101
|
+
def darkseagreen: () -> instance
|
|
102
|
+
def darkslateblue: () -> instance
|
|
103
|
+
def darkslategray: () -> instance
|
|
104
|
+
def darkturquoise: () -> instance
|
|
105
|
+
def darkviolet: () -> instance
|
|
106
|
+
def deeppink: () -> instance
|
|
107
|
+
def deepskyblue: () -> instance
|
|
108
|
+
def dimgray: () -> instance
|
|
109
|
+
def dodgerblue: () -> instance
|
|
110
|
+
def firebrick: () -> instance
|
|
111
|
+
def floralwhite: () -> instance
|
|
112
|
+
def forestgreen: () -> instance
|
|
113
|
+
def fuchsia: () -> instance
|
|
114
|
+
def gainsboro: () -> instance
|
|
115
|
+
def ghostwhite: () -> instance
|
|
116
|
+
def gold: () -> instance
|
|
117
|
+
def goldenrod: () -> instance
|
|
118
|
+
def gray: () -> instance
|
|
119
|
+
def greenyellow: () -> instance
|
|
120
|
+
def honeydew: () -> instance
|
|
121
|
+
def hotpink: () -> instance
|
|
122
|
+
def indianred: () -> instance
|
|
123
|
+
def indigo: () -> instance
|
|
124
|
+
def ivory: () -> instance
|
|
125
|
+
def khaki: () -> instance
|
|
126
|
+
def lavender: () -> instance
|
|
127
|
+
def lavenderblush: () -> instance
|
|
128
|
+
def lawngreen: () -> instance
|
|
129
|
+
def lemonchiffon: () -> instance
|
|
130
|
+
def lightblue: () -> instance
|
|
131
|
+
def lightcoral: () -> instance
|
|
132
|
+
def lightcyan: () -> instance
|
|
133
|
+
def lightgoldenrod: () -> instance
|
|
134
|
+
def lightgray: () -> instance
|
|
135
|
+
def lightgreen: () -> instance
|
|
136
|
+
def lightpink: () -> instance
|
|
137
|
+
def lightsalmon: () -> instance
|
|
138
|
+
def lightseagreen: () -> instance
|
|
139
|
+
def lightskyblue: () -> instance
|
|
140
|
+
def lightslategray: () -> instance
|
|
141
|
+
def lightsteelblue: () -> instance
|
|
142
|
+
def lightyellow: () -> instance
|
|
143
|
+
def lime: () -> instance
|
|
144
|
+
def limegreen: () -> instance
|
|
145
|
+
def linen: () -> instance
|
|
146
|
+
def maroon: () -> instance
|
|
147
|
+
def mediumaquamarine: () -> instance
|
|
148
|
+
def mediumblue: () -> instance
|
|
149
|
+
def mediumorchid: () -> instance
|
|
150
|
+
def mediumpurple: () -> instance
|
|
151
|
+
def mediumseagreen: () -> instance
|
|
152
|
+
def mediumslateblue: () -> instance
|
|
153
|
+
def mediumspringgreen: () -> instance
|
|
154
|
+
def mediumturquoise: () -> instance
|
|
155
|
+
def mediumvioletred: () -> instance
|
|
156
|
+
def midnightblue: () -> instance
|
|
157
|
+
def mintcream: () -> instance
|
|
158
|
+
def mistyrose: () -> instance
|
|
159
|
+
def moccasin: () -> instance
|
|
160
|
+
def navajowhite: () -> instance
|
|
161
|
+
def navyblue: () -> instance
|
|
162
|
+
def oldlace: () -> instance
|
|
163
|
+
def olive: () -> instance
|
|
164
|
+
def olivedrab: () -> instance
|
|
165
|
+
def orange: () -> instance
|
|
166
|
+
def orangered: () -> instance
|
|
167
|
+
def orchid: () -> instance
|
|
168
|
+
def palegoldenrod: () -> instance
|
|
169
|
+
def palegreen: () -> instance
|
|
170
|
+
def paleturquoise: () -> instance
|
|
171
|
+
def palevioletred: () -> instance
|
|
172
|
+
def papayawhip: () -> instance
|
|
173
|
+
def peachpuff: () -> instance
|
|
174
|
+
def peru: () -> instance
|
|
175
|
+
def pink: () -> instance
|
|
176
|
+
def plum: () -> instance
|
|
177
|
+
def powderblue: () -> instance
|
|
178
|
+
def purple: () -> instance
|
|
179
|
+
def rebeccapurple: () -> instance
|
|
180
|
+
def rosybrown: () -> instance
|
|
181
|
+
def royalblue: () -> instance
|
|
182
|
+
def saddlebrown: () -> instance
|
|
183
|
+
def salmon: () -> instance
|
|
184
|
+
def sandybrown: () -> instance
|
|
185
|
+
def seagreen: () -> instance
|
|
186
|
+
def seashell: () -> instance
|
|
187
|
+
def sienna: () -> instance
|
|
188
|
+
def silver: () -> instance
|
|
189
|
+
def skyblue: () -> instance
|
|
190
|
+
def slateblue: () -> instance
|
|
191
|
+
def slategray: () -> instance
|
|
192
|
+
def snow: () -> instance
|
|
193
|
+
def springgreen: () -> instance
|
|
194
|
+
def steelblue: () -> instance
|
|
195
|
+
def tan: () -> instance
|
|
196
|
+
def teal: () -> instance
|
|
197
|
+
def thistle: () -> instance
|
|
198
|
+
def tomato: () -> instance
|
|
199
|
+
def turquoise: () -> instance
|
|
200
|
+
def violet: () -> instance
|
|
201
|
+
def webgray: () -> instance
|
|
202
|
+
def webgreen: () -> instance
|
|
203
|
+
def webmaroon: () -> instance
|
|
204
|
+
def webpurple: () -> instance
|
|
205
|
+
def wheat: () -> instance
|
|
206
|
+
def whitesmoke: () -> instance
|
|
207
|
+
def yellowgreen: () -> instance
|
|
208
|
+
end
|
|
209
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module Rake
|
|
2
|
+
class TaskLib
|
|
3
|
+
include Rake::DSL
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
class Task
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
class TaskArguments
|
|
10
|
+
include Enumerable[untyped]
|
|
11
|
+
|
|
12
|
+
def []: (untyped index) -> untyped
|
|
13
|
+
def each: () ?{ (untyped, untyped) -> void } -> void
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
module DSL
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
include FileUtils
|
|
20
|
+
|
|
21
|
+
def desc: (String description) -> void
|
|
22
|
+
def directory: (*untyped args) ?{ () -> void } -> void
|
|
23
|
+
def file: (*untyped args) ?{ () -> void } -> void
|
|
24
|
+
def file_create: (*untyped args) ?{ () -> void } -> void
|
|
25
|
+
def import: (*String fns) -> void
|
|
26
|
+
def multitask: (*untyped args) ?{ () -> void } -> void
|
|
27
|
+
def namespace: (?untyped name) ?{ () -> void } -> void
|
|
28
|
+
def rule: (*untyped args) ?{ () -> void } -> void
|
|
29
|
+
def task: (*untyped args) ?{ (Rake::Task, Rake::TaskArguments) -> void } -> void
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
module FileUtils
|
|
34
|
+
def sh: (*String cmd, **untyped options) ?{ (bool, Process::Status) -> void } -> void
|
|
35
|
+
| (Hash[String, String] env, *String cmd, **untyped options) ?{ (bool, Process::Status) -> void } -> void
|
|
36
|
+
def ruby: (*String args, **untyped options) ?{ (bool, Process::Status) -> void } -> void
|
|
37
|
+
def safe_ln: (*untyped args, **untyped options) -> void
|
|
38
|
+
def split_all: (String path) -> Array[String]
|
|
39
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
class Regexp::Parser
|
|
2
|
+
def parse: [T] (Regexp | String input, ?String? syntax, ?options: Integer?) { (Regexp::Expression::Root) -> T } -> T
|
|
3
|
+
| (Regexp | String input, ?String? syntax, ?options: Integer?) -> Regexp::Expression::Root
|
|
4
|
+
def self.parse: [T] (Regexp | String input, ?String? syntax, ?options: Integer?) { (Regexp::Expression::Root) -> T } -> T
|
|
5
|
+
| (Regexp | String input, ?String? syntax, ?options: Integer?) -> Regexp::Expression::Root
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
module Regexp::Expression
|
|
9
|
+
class Root < Subexpression
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
class Subexpression < Base
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
class Base
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
module RuboCop
|
|
2
|
+
class CommentConfig
|
|
3
|
+
attr_reader processed_source: ProcessedSource
|
|
4
|
+
|
|
5
|
+
def initialize: (ProcessedSource processed_source) -> void
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ConfigLoader
|
|
9
|
+
def self.debug?: () -> boolish
|
|
10
|
+
def self.merge_with_default: (Config, String) -> Config
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
class Config
|
|
14
|
+
def initialize: (?Hash[untyped, untyped] hash, ?String loaded_path) -> void
|
|
15
|
+
def for_cop: (String cop) -> Hash[String, untyped]
|
|
16
|
+
def for_enabled_cop: (String cop) -> Hash[String, untyped]
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
class ConfigStore
|
|
20
|
+
def options_config=: (String options_config) -> void
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
module Cop
|
|
24
|
+
class Base
|
|
25
|
+
extend AST::NodePattern::Macros
|
|
26
|
+
include Util
|
|
27
|
+
include IgnoredNode
|
|
28
|
+
include AutocorrectLogic
|
|
29
|
+
|
|
30
|
+
def self.exclude_from_registry: () -> void
|
|
31
|
+
def self.department: () -> Symbol
|
|
32
|
+
def self.cop_name: () -> String
|
|
33
|
+
def self.documentation_url: (?Config?) -> String
|
|
34
|
+
def self.requires_gem: (String gem_name, *String version_requirements) -> void
|
|
35
|
+
|
|
36
|
+
attr_reader config: Config
|
|
37
|
+
|
|
38
|
+
def on_new_investigation: () -> void
|
|
39
|
+
def on_investigation_end: () -> void
|
|
40
|
+
def on_other_file: () -> void
|
|
41
|
+
def add_offense: (untyped node, ?message: String, ?severity: Symbol) -> void
|
|
42
|
+
| (untyped node, ?message: String, ?severity: Symbol) { (Corrector) -> void } -> void
|
|
43
|
+
def cop_config: () -> Hash[String, untyped]
|
|
44
|
+
def target_ruby_version: () -> Float
|
|
45
|
+
def processed_source: () -> AST::ProcessedSource
|
|
46
|
+
def target_gem_version: (String gem_name) -> Gem::Version
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
module AutocorrectLogic
|
|
50
|
+
def autocorrect?: () -> bool
|
|
51
|
+
def autocorrect_with_disable_uncorrectable?: () -> bool
|
|
52
|
+
def autocorrect_requested?: () -> bool
|
|
53
|
+
def correctable?: () -> bool
|
|
54
|
+
def disable_uncorrectable?: () -> bool
|
|
55
|
+
def safe_autocorrect?: () -> bool
|
|
56
|
+
def autocorrect_enabled?: () -> bool
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
class Corrector < Parser::Source::TreeRewriter
|
|
60
|
+
def replace: ((Parser::Source::Range | RuboCop::AST::Node) range, String content) -> self
|
|
61
|
+
def wrap: ((Parser::Source::Range | RuboCop::AST::Node) range, String? insert_before, String? insert_after) -> self
|
|
62
|
+
def remove: ((Parser::Source::Range | RuboCop::AST::Node) range) -> self
|
|
63
|
+
def insert_before: ((Parser::Source::Range | RuboCop::AST::Node) range, String content) -> self
|
|
64
|
+
def insert_after: ((Parser::Source::Range | RuboCop::AST::Node) range, String content) -> self
|
|
65
|
+
def remove_preceding: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range, Integer size) -> self
|
|
66
|
+
def remove_leading: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range, Integer size) -> self
|
|
67
|
+
def remove_trailing: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range, Integer size) -> self
|
|
68
|
+
def swap: ((Parser::Source::Range | RuboCop::AST::Node) node_or_range1, (Parser::Source::Range | RuboCop::AST::Node) node_or_range2) -> self
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
module Alignment
|
|
72
|
+
def configured_indentation_width: () -> Integer
|
|
73
|
+
def indentation: (RuboCop::AST::Node node) -> String
|
|
74
|
+
def offset: (RuboCop::AST::Node node) -> String
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
module ConfigurableEnforcedStyle
|
|
78
|
+
def opposite_style_detected: () -> void
|
|
79
|
+
def correct_style_detected: () -> void
|
|
80
|
+
def unexpected_style_detected: (Symbol unexpected) -> void
|
|
81
|
+
def ambiguous_style_detected: (*Symbol possibilities) -> void
|
|
82
|
+
def style_detected: (Symbol detected) -> void
|
|
83
|
+
def style: () -> Symbol
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
module CommentsHelp
|
|
87
|
+
def source_range_with_comment: (RuboCop::AST::Node node) -> Parser::Source::Range
|
|
88
|
+
def contains_comments?: (RuboCop::AST::Node node) -> bool
|
|
89
|
+
def comments_in_range: (RuboCop::AST::Node node) -> Array[Parser::Source::Comment]
|
|
90
|
+
def comments_contain_disables?: (RuboCop::AST::Node node, String cop_name) -> bool
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
class Offense
|
|
94
|
+
attr_reader severity: Severity
|
|
95
|
+
attr_reader location: Parser::Source::Range
|
|
96
|
+
attr_reader message: String
|
|
97
|
+
attr_reader cop_name: String
|
|
98
|
+
|
|
99
|
+
def line: () -> Integer
|
|
100
|
+
def column: () -> Integer
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
module RangeHelp
|
|
104
|
+
def source_range: (Parser::Source::Buffer source_buffer, Integer line_number, Integer column, ?Integer length) -> Parser::Source::Range
|
|
105
|
+
def range_between: (Integer start_pos, Integer end_pos) -> Parser::Source::Range
|
|
106
|
+
def range_with_surrounding_space: (?Parser::Source::Range range_positional,
|
|
107
|
+
?range: Parser::Source::Range, ?side: Symbol, ?newlines: bool,
|
|
108
|
+
?whitespace: bool, ?continuations: bool,
|
|
109
|
+
?buffer: Parser::Source::Buffer) -> Parser::Source::Range
|
|
110
|
+
def range_by_whole_lines: (Parser::Source::Range range,
|
|
111
|
+
?include_final_newline: bool,
|
|
112
|
+
?buffer: Parser::Source::Buffer) -> Parser::Source::Range
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
class Registry
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
module IgnoredNode
|
|
119
|
+
def ignore_node: (RuboCop::AST::Node node) -> void
|
|
120
|
+
def part_of_ignored_node?: (RuboCop::AST::Node node) -> bool
|
|
121
|
+
def ignored_node?: (RuboCop::AST::Node node) -> bool
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
class Severity
|
|
125
|
+
type t = :info | :refactor | :convention | :warning | :error | :fatal
|
|
126
|
+
|
|
127
|
+
attr_reader name: t
|
|
128
|
+
|
|
129
|
+
def code: () -> String
|
|
130
|
+
def level: () -> Integer
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
module TargetRubyVersion
|
|
134
|
+
def minimum_target_ruby_version: (Float) -> void
|
|
135
|
+
def maximum_target_ruby_version: (Float) -> void
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
module Util
|
|
139
|
+
include PathUtil
|
|
140
|
+
def line_range: (RuboCop::AST::Node node) -> ::Range[Integer]
|
|
141
|
+
def parentheses?: (RuboCop::AST::Node node) -> bool
|
|
142
|
+
def add_parentheses: (RuboCop::AST::Node node, Corrector corrector) -> void
|
|
143
|
+
def any_descendant?: (RuboCop::AST::Node node, *Symbol types) -> bool
|
|
144
|
+
def args_begin: (RuboCop::AST::Node node) -> Parser::Source::Range
|
|
145
|
+
def args_end: (RuboCop::AST::Node node) -> Parser::Source::Range
|
|
146
|
+
def begins_its_line?: (Parser::Source::Range range) -> bool
|
|
147
|
+
def first_part_of_call_chain: (RuboCop::AST::Node node) -> RuboCop::AST::Node
|
|
148
|
+
def double_quotes_required?: (String string) -> bool
|
|
149
|
+
def needs_escaping?: (String string) -> bool
|
|
150
|
+
def escape_string: (String string) -> String
|
|
151
|
+
def to_string_literal: (String string) -> String
|
|
152
|
+
def trim_string_interpolation_escape_character: (String str) -> String
|
|
153
|
+
def interpret_string_escapes: (String string) -> String
|
|
154
|
+
def line: ((RuboCop::AST::Node | Parser::Source::Range) node_or_range) -> Integer
|
|
155
|
+
def same_line?: ((RuboCop::AST::Node | Parser::Source::Range) node1, (RuboCop::AST::Node | Parser::Source::Range) node2) -> bool
|
|
156
|
+
def indent: (RuboCop::AST::Node node, ?offset: Integer) -> String
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
module Ext
|
|
161
|
+
module Comment
|
|
162
|
+
def source: () -> String
|
|
163
|
+
def source_range: () -> Parser::Source::Range
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
module ProcessedSource
|
|
167
|
+
attr_accessor registry: Cop::Registry
|
|
168
|
+
attr_accessor config: Config
|
|
169
|
+
|
|
170
|
+
def comment_config: () -> CommentConfig
|
|
171
|
+
def disabled_line_ranges: () -> Hash[untyped, untyped]
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
class ProcessedSource = AST::ProcessedSource
|
|
176
|
+
|
|
177
|
+
class Runner
|
|
178
|
+
type extractorResult = Array[{ offset: Integer, processed_source: ProcessedSource}]?
|
|
179
|
+
|
|
180
|
+
interface _Extractor
|
|
181
|
+
def call: (ProcessedSource) -> extractorResult
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
def self.ruby_extractors: () -> Array[_Extractor]
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
module AutoCorrector
|
|
188
|
+
def support_autocorrect?: () -> true
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
module PathUtil
|
|
192
|
+
def smart_path: (String path) -> String
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Patch to RuboCop::AST::*
|
|
197
|
+
|
|
198
|
+
module RuboCop
|
|
199
|
+
module AST
|
|
200
|
+
class Comment
|
|
201
|
+
include Ext::Comment
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
class ProcessedSource
|
|
205
|
+
include Ext::ProcessedSource
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
end
|