checkoff 0.200.0 → 0.203.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +130 -28
  3. data/.git-hooks/pre_commit/solargraph_typecheck.rb +12 -11
  4. data/.overcommit.yml +27 -2
  5. data/.rubocop.yml +20 -2
  6. data/.rubocop_todo.yml +90 -0
  7. data/.solargraph.yml +10 -1
  8. data/DEVELOPMENT.md +1 -1
  9. data/Gemfile +11 -8
  10. data/Gemfile.lock +66 -42
  11. data/LICENSE +1 -1
  12. data/Makefile +14 -12
  13. data/bin/brakeman +27 -0
  14. data/bin/overcommit_branch +117 -0
  15. data/bin/spoom +27 -0
  16. data/bin/srb +27 -0
  17. data/bin/srb-rbi +27 -0
  18. data/bin/tapioca +27 -0
  19. data/config/annotations_misc.rb +35 -0
  20. data/docs/cookiecutter_input.json +1 -0
  21. data/fix.sh +14 -6
  22. data/lib/checkoff/custom_fields.rb +3 -2
  23. data/lib/checkoff/internal/search_url/simple_param_converter.rb +11 -0
  24. data/lib/checkoff/version.rb +1 -1
  25. data/requirements_dev.txt +1 -1
  26. data/sorbet/config +4 -0
  27. data/sorbet/rbi/annotations/.gitattributes +1 -0
  28. data/sorbet/rbi/annotations/activesupport.rbi +453 -0
  29. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  30. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  31. data/sorbet/rbi/annotations/mocha.rbi +34 -0
  32. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  33. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  34. data/sorbet/rbi/dsl/.gitattributes +1 -0
  35. data/sorbet/rbi/dsl/active_support/callbacks.rbi +23 -0
  36. data/sorbet/rbi/gems/.gitattributes +1 -0
  37. data/sorbet/rbi/gems/activesupport@7.1.3.rbi +18749 -0
  38. data/sorbet/rbi/gems/addressable@2.8.6.rbi +1994 -0
  39. data/sorbet/rbi/gems/ansi@1.5.0.rbi +688 -0
  40. data/sorbet/rbi/gems/asana@0.10.6-ab9393136d9ca59b75e42a661fdddc1c65c8f7c3.rbi +6142 -0
  41. data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
  42. data/sorbet/rbi/gems/backport@1.2.0.rbi +523 -0
  43. data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
  44. data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
  45. data/sorbet/rbi/gems/bigdecimal@3.1.5.rbi +78 -0
  46. data/sorbet/rbi/gems/builder@3.2.4.rbi +505 -0
  47. data/sorbet/rbi/gems/bump@0.10.0.rbi +169 -0
  48. data/sorbet/rbi/gems/cache@0.4.1.rbi +211 -0
  49. data/sorbet/rbi/gems/cache_method@0.2.7.rbi +293 -0
  50. data/sorbet/rbi/gems/chef-utils@18.3.0.rbi +9 -0
  51. data/sorbet/rbi/gems/childprocess@5.1.0.rbi +383 -0
  52. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3427 -0
  53. data/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +11591 -0
  54. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +9 -0
  55. data/sorbet/rbi/gems/crack@0.4.5.rbi +145 -0
  56. data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +969 -0
  57. data/sorbet/rbi/gems/docile@1.4.0.rbi +377 -0
  58. data/sorbet/rbi/gems/drb@2.2.0.rbi +1347 -0
  59. data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +9 -0
  60. data/sorbet/rbi/gems/erubi@1.13.0.rbi +152 -0
  61. data/sorbet/rbi/gems/faraday-em_http@1.0.0.rbi +222 -0
  62. data/sorbet/rbi/gems/faraday-em_synchrony@1.0.0.rbi +126 -0
  63. data/sorbet/rbi/gems/faraday-excon@1.1.0.rbi +136 -0
  64. data/sorbet/rbi/gems/faraday-httpclient@1.0.1.rbi +145 -0
  65. data/sorbet/rbi/gems/faraday-multipart@1.0.4.rbi +259 -0
  66. data/sorbet/rbi/gems/faraday-net_http@1.0.1.rbi +142 -0
  67. data/sorbet/rbi/gems/faraday-net_http_persistent@1.2.0.rbi +118 -0
  68. data/sorbet/rbi/gems/faraday-patron@1.0.0.rbi +125 -0
  69. data/sorbet/rbi/gems/faraday-rack@1.0.0.rbi +133 -0
  70. data/sorbet/rbi/gems/faraday-retry@1.0.3.rbi +198 -0
  71. data/sorbet/rbi/gems/faraday@1.10.3.rbi +2729 -0
  72. data/sorbet/rbi/gems/faraday_middleware-multi_json@0.0.6.rbi +29 -0
  73. data/sorbet/rbi/gems/faraday_middleware@1.2.0.rbi +1004 -0
  74. data/sorbet/rbi/gems/gli@2.21.1.rbi +9 -0
  75. data/sorbet/rbi/gems/hashdiff@1.0.1.rbi +351 -0
  76. data/sorbet/rbi/gems/i18n@1.14.1.rbi +2326 -0
  77. data/sorbet/rbi/gems/imagen@0.1.8.rbi +340 -0
  78. data/sorbet/rbi/gems/iniparse@1.5.0.rbi +899 -0
  79. data/sorbet/rbi/gems/jaro_winkler@1.6.0.rbi +22 -0
  80. data/sorbet/rbi/gems/json@2.7.1.rbi +1562 -0
  81. data/sorbet/rbi/gems/jwt@2.7.1.rbi +1405 -0
  82. data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +128 -0
  83. data/sorbet/rbi/gems/kramdown@2.4.0.rbi +3272 -0
  84. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
  85. data/sorbet/rbi/gems/logger@1.6.1.rbi +920 -0
  86. data/sorbet/rbi/gems/mdl@0.13.0.rbi +445 -0
  87. data/sorbet/rbi/gems/method_source@1.0.0.rbi +273 -0
  88. data/sorbet/rbi/gems/mime-types-data@3.2023.1205.rbi +127 -0
  89. data/sorbet/rbi/gems/mime-types@3.5.1.rbi +1252 -0
  90. data/sorbet/rbi/gems/minitest-profile@0.0.2.rbi +136 -0
  91. data/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +1014 -0
  92. data/sorbet/rbi/gems/minitest@5.21.1.rbi +1539 -0
  93. data/sorbet/rbi/gems/mixlib-cli@2.1.8.rbi +314 -0
  94. data/sorbet/rbi/gems/mixlib-config@3.0.27.rbi +581 -0
  95. data/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +629 -0
  96. data/sorbet/rbi/gems/mocha@2.1.0.rbi +12 -0
  97. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +268 -0
  98. data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +102 -0
  99. data/sorbet/rbi/gems/multipart-post@2.3.0.rbi +234 -0
  100. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +94 -0
  101. data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
  102. data/sorbet/rbi/gems/nokogiri@1.16.7.rbi +7311 -0
  103. data/sorbet/rbi/gems/oauth2@1.4.11.rbi +833 -0
  104. data/sorbet/rbi/gems/ostruct@0.6.1.rbi +354 -0
  105. data/sorbet/rbi/gems/overcommit@0.64.0.rbi +2400 -0
  106. data/sorbet/rbi/gems/parallel@1.23.0.rbi +274 -0
  107. data/sorbet/rbi/gems/parser@3.2.2.4.rbi +7253 -0
  108. data/sorbet/rbi/gems/prism@1.2.0.rbi +39085 -0
  109. data/sorbet/rbi/gems/pry@0.14.2.rbi +10070 -0
  110. data/sorbet/rbi/gems/public_suffix@5.0.4.rbi +936 -0
  111. data/sorbet/rbi/gems/punchlist@1.3.2.rbi +173 -0
  112. data/sorbet/rbi/gems/racc@1.7.3.rbi +162 -0
  113. data/sorbet/rbi/gems/rack@3.0.8.rbi +5184 -0
  114. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
  115. data/sorbet/rbi/gems/rake@13.1.0.rbi +3022 -0
  116. data/sorbet/rbi/gems/rbi@0.2.1.rbi +4535 -0
  117. data/sorbet/rbi/gems/rbs@2.8.4.rbi +5613 -0
  118. data/sorbet/rbi/gems/regexp_parser@2.8.3.rbi +3750 -0
  119. data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +390 -0
  120. data/sorbet/rbi/gems/rexml@3.2.6.rbi +4888 -0
  121. data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +7061 -0
  122. data/sorbet/rbi/gems/rubocop-minitest@0.34.5.rbi +2577 -0
  123. data/sorbet/rbi/gems/rubocop-performance@1.20.2.rbi +3262 -0
  124. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +329 -0
  125. data/sorbet/rbi/gems/rubocop@1.59.0.rbi +57238 -0
  126. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  127. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +9 -0
  128. data/sorbet/rbi/gems/rugged@1.6.3.rbi +1577 -0
  129. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +217 -0
  130. data/sorbet/rbi/gems/simplecov-lcov@0.8.0.rbi +256 -0
  131. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2149 -0
  132. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
  133. data/sorbet/rbi/gems/solargraph@0.50.1-904b9304770a59fac393c5cc3cad481e5bdf0fd8.rbi +9396 -0
  134. data/sorbet/rbi/gems/source_finder@3.2.1.rbi +317 -0
  135. data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
  136. data/sorbet/rbi/gems/tapioca@0.16.4.rbi +3604 -0
  137. data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
  138. data/sorbet/rbi/gems/tilt@2.4.0.rbi +933 -0
  139. data/sorbet/rbi/gems/tomlrb@2.0.3.rbi +9 -0
  140. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5918 -0
  141. data/sorbet/rbi/gems/undercover@0.5.0.rbi +433 -0
  142. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
  143. data/sorbet/rbi/gems/webmock@3.19.1.rbi +1769 -0
  144. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
  145. data/sorbet/rbi/gems/yard@0.9.34.rbi +18247 -0
  146. data/sorbet/rbi/todo.rbi +11 -0
  147. data/sorbet/tapioca/config.yml +13 -0
  148. data/sorbet/tapioca/require.rb +4 -0
  149. metadata +134 -3
@@ -0,0 +1,933 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `tilt` gem.
5
+ # Please instead update this file by running `bin/tapioca gem tilt`.
6
+
7
+
8
+ # Namespace for Tilt. This module is not intended to be included anywhere.
9
+ #
10
+ # source://tilt//lib/tilt/template.rb#2
11
+ module Tilt
12
+ class << self
13
+ # @see Tilt::Mapping#[]
14
+ #
15
+ # source://tilt//lib/tilt.rb#71
16
+ def [](file); end
17
+
18
+ # @return [Tilt::Mapping] the main mapping object
19
+ #
20
+ # source://tilt//lib/tilt.rb#87
21
+ def default_mapping; end
22
+
23
+ # Replace the default mapping with a finalized version of the default
24
+ # mapping. This can be done to improve performance after the template
25
+ # libraries you desire to use have already been loaded. Once this is
26
+ # is called, all attempts to modify the default mapping will fail.
27
+ # This also freezes Tilt itself.
28
+ #
29
+ # source://tilt//lib/tilt.rb#20
30
+ def finalize!; end
31
+
32
+ # @private
33
+ #
34
+ # source://tilt//lib/tilt.rb#41
35
+ def lazy_map; end
36
+
37
+ # @see Tilt::Mapping#new
38
+ #
39
+ # source://tilt//lib/tilt.rb#66
40
+ def new(file, line = T.unsafe(nil), options = T.unsafe(nil), &block); end
41
+
42
+ # Alias register as prefer for Tilt 1.x compatibility.
43
+ #
44
+ # @see Tilt::Mapping#register
45
+ #
46
+ # source://tilt//lib/tilt.rb#46
47
+ def prefer(template_class, *extensions); end
48
+
49
+ # @see Tilt::Mapping#register
50
+ #
51
+ # source://tilt//lib/tilt.rb#46
52
+ def register(template_class, *extensions); end
53
+
54
+ # @see Tilt::Mapping#register_lazy
55
+ #
56
+ # source://tilt//lib/tilt.rb#51
57
+ def register_lazy(class_name, file, *extensions); end
58
+
59
+ # @see Tilt::Mapping#register_pipeline
60
+ #
61
+ # source://tilt//lib/tilt.rb#56
62
+ def register_pipeline(ext, options = T.unsafe(nil)); end
63
+
64
+ # @return [Boolean]
65
+ # @see Tilt::Mapping#registered?
66
+ #
67
+ # source://tilt//lib/tilt.rb#61
68
+ def registered?(ext); end
69
+
70
+ # @see Tilt::Mapping#template_for
71
+ #
72
+ # source://tilt//lib/tilt.rb#76
73
+ def template_for(file); end
74
+
75
+ # @see Tilt::Mapping#templates_for
76
+ #
77
+ # source://tilt//lib/tilt.rb#81
78
+ def templates_for(file); end
79
+ end
80
+ end
81
+
82
+ # Private internal base class for both Mapping and FinalizedMapping, for the shared methods.
83
+ #
84
+ # source://tilt//lib/tilt/mapping.rb#6
85
+ class Tilt::BaseMapping
86
+ # Looks up a template class based on file name and/or extension.
87
+ #
88
+ # @example
89
+ # mapping['views/hello.erb'] # => Tilt::ERBTemplate
90
+ # mapping['hello.erb'] # => Tilt::ERBTemplate
91
+ # mapping['erb'] # => Tilt::ERBTemplate
92
+ # @return [template class]
93
+ #
94
+ # source://tilt//lib/tilt/mapping.rb#32
95
+ def [](file); end
96
+
97
+ # Instantiates a new template class based on the file.
98
+ #
99
+ # @example
100
+ # mapping.new('index.mt') # => instance of MyEngine::Template
101
+ # @raise [RuntimeError] if there is no template class registered for the
102
+ # file name.
103
+ # @see Tilt::Template.new
104
+ #
105
+ # source://tilt//lib/tilt/mapping.rb#16
106
+ def new(file, line = T.unsafe(nil), options = T.unsafe(nil), &block); end
107
+
108
+ # Looks up a template class based on file name and/or extension.
109
+ #
110
+ # @example
111
+ # mapping['views/hello.erb'] # => Tilt::ERBTemplate
112
+ # mapping['hello.erb'] # => Tilt::ERBTemplate
113
+ # mapping['erb'] # => Tilt::ERBTemplate
114
+ # @return [template class]
115
+ #
116
+ # source://tilt//lib/tilt/mapping.rb#32
117
+ def template_for(file); end
118
+
119
+ # Looks up a list of template classes based on file name. If the file name
120
+ # has multiple extensions, it will return all template classes matching the
121
+ # extensions from the end.
122
+ #
123
+ # @example
124
+ # mapping.templates_for('views/index.haml.erb')
125
+ # # => [Tilt::ERBTemplate, Tilt::HamlTemplate]
126
+ # @return [Array<template class>]
127
+ #
128
+ # source://tilt//lib/tilt/mapping.rb#48
129
+ def templates_for(file); end
130
+
131
+ private
132
+
133
+ # source://tilt//lib/tilt/mapping.rb#63
134
+ def split(file); end
135
+ end
136
+
137
+ # Builder template implementation.
138
+ #
139
+ # source://tilt//lib/tilt/builder.rb#7
140
+ class Tilt::BuilderTemplate < ::Tilt::Template
141
+ # source://tilt//lib/tilt/builder.rb#14
142
+ def evaluate(scope, locals, &block); end
143
+
144
+ # source://tilt//lib/tilt/builder.rb#28
145
+ def precompiled_postamble(locals); end
146
+
147
+ # source://tilt//lib/tilt/builder.rb#32
148
+ def precompiled_template(locals); end
149
+
150
+ # source://tilt//lib/tilt/builder.rb#10
151
+ def prepare; end
152
+
153
+ private
154
+
155
+ # source://tilt//lib/tilt/builder.rb#38
156
+ def xml_builder; end
157
+ end
158
+
159
+ # CSV Template implementation. See:
160
+ # http://ruby-doc.org/stdlib/libdoc/csv/rdoc/CSV.html
161
+ #
162
+ # == Example
163
+ #
164
+ # # Example of csv template
165
+ # tpl = <<-EOS
166
+ # # header
167
+ # csv << ['NAME', 'ID']
168
+ #
169
+ # # data rows
170
+ # @people.each do |person|
171
+ # csv << [person[:name], person[:id]]
172
+ # end
173
+ # EOS
174
+ #
175
+ # @people = [
176
+ # {:name => "Joshua Peek", :id => 1},
177
+ # {:name => "Ryan Tomayko", :id => 2},
178
+ # {:name => "Simone Carletti", :id => 3}
179
+ # ]
180
+ #
181
+ # template = Tilt::CSVTemplate.new { tpl }
182
+ # template.render(self)
183
+ #
184
+ # source://tilt//lib/tilt/csv.rb#32
185
+ class Tilt::CSVTemplate < ::Tilt::Template
186
+ # source://tilt//lib/tilt/csv.rb#47
187
+ def precompiled(locals); end
188
+
189
+ # source://tilt//lib/tilt/csv.rb#39
190
+ def precompiled_template(locals); end
191
+
192
+ # source://tilt//lib/tilt/csv.rb#35
193
+ def prepare; end
194
+ end
195
+
196
+ # Extremely simple template cache implementation. Calling applications
197
+ # create a Tilt::Cache instance and use #fetch with any set of hashable
198
+ # arguments (such as those to Tilt.new):
199
+ #
200
+ # cache = Tilt::Cache.new
201
+ # cache.fetch(path, line, options) { Tilt.new(path, line, options) }
202
+ #
203
+ # Subsequent invocations return the already loaded template object.
204
+ #
205
+ # @note Tilt::Cache is a thin wrapper around Hash. It has the following
206
+ # limitations:
207
+ # * Not thread-safe.
208
+ # * Size is unbounded.
209
+ # * Keys are not copied defensively, and should not be modified after
210
+ # being passed to #fetch. More specifically, the values returned by
211
+ # key#hash and key#eql? should not change.
212
+ # If this is too limiting for you, use a different cache implementation.
213
+ #
214
+ # source://tilt//lib/tilt.rb#111
215
+ class Tilt::Cache
216
+ # @return [Cache] a new instance of Cache
217
+ #
218
+ # source://tilt//lib/tilt.rb#112
219
+ def initialize; end
220
+
221
+ # Clears the cache.
222
+ #
223
+ # source://tilt//lib/tilt.rb#129
224
+ def clear; end
225
+
226
+ # Caches a value for key, or returns the previously cached value.
227
+ # If a value has been previously cached for key then it is
228
+ # returned. Otherwise, block is yielded to and its return value
229
+ # which may be nil, is cached under key and returned.
230
+ #
231
+ # @yield
232
+ # @yieldreturn the value to cache for key
233
+ #
234
+ # source://tilt//lib/tilt.rb#122
235
+ def fetch(*key); end
236
+ end
237
+
238
+ # @private
239
+ #
240
+ # source://tilt//lib/tilt/template.rb#4
241
+ module Tilt::CompiledTemplates; end
242
+
243
+ # source://tilt//lib/tilt.rb#10
244
+ Tilt::EMPTY_HASH = T.let(T.unsafe(nil), Hash)
245
+
246
+ # ERB template implementation. See:
247
+ # http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html
248
+ #
249
+ # source://tilt//lib/tilt/erb.rb#8
250
+ class Tilt::ERBTemplate < ::Tilt::Template
251
+ # @return [Boolean]
252
+ #
253
+ # source://tilt//lib/tilt/erb.rb#60
254
+ def freeze_string_literals?; end
255
+
256
+ # ERB generates a line to specify the character coding of the generated
257
+ # source in 1.9. Account for this in the line offset.
258
+ #
259
+ # source://tilt//lib/tilt/erb.rb#55
260
+ def precompiled(locals); end
261
+
262
+ # source://tilt//lib/tilt/erb.rb#44
263
+ def precompiled_postamble(locals); end
264
+
265
+ # source://tilt//lib/tilt/erb.rb#36
266
+ def precompiled_preamble(locals); end
267
+
268
+ # source://tilt//lib/tilt/erb.rb#31
269
+ def precompiled_template(locals); end
270
+
271
+ # source://tilt//lib/tilt/erb.rb#11
272
+ def prepare; end
273
+ end
274
+
275
+ # source://tilt//lib/tilt/erb.rb#9
276
+ Tilt::ERBTemplate::SUPPORTS_KVARGS = T.let(T.unsafe(nil), Array)
277
+
278
+ # Erubi (a simplified version of Erubis) template implementation.
279
+ # See https://github.com/jeremyevans/erubi
280
+ #
281
+ # ErubiTemplate supports the following additional options, in addition
282
+ # to the options supported by the Erubi engine:
283
+ #
284
+ # :engine_class :: allows you to specify a custom engine class to use
285
+ # instead of the default (which is ::Erubi::Engine).
286
+ #
287
+ # source://tilt//lib/tilt/erubi.rb#14
288
+ class Tilt::ErubiTemplate < ::Tilt::Template
289
+ # @return [Boolean]
290
+ #
291
+ # source://tilt//lib/tilt/erubi.rb#51
292
+ def freeze_string_literals?; end
293
+
294
+ # source://tilt//lib/tilt/erubi.rb#47
295
+ def precompiled_template(locals); end
296
+
297
+ # source://tilt//lib/tilt/erubi.rb#15
298
+ def prepare; end
299
+ end
300
+
301
+ # source://tilt//lib/tilt/etanni.rb#5
302
+ class Tilt::EtanniTemplate < ::Tilt::Template
303
+ # source://tilt//lib/tilt/etanni.rb#23
304
+ def precompiled(locals); end
305
+
306
+ # source://tilt//lib/tilt/etanni.rb#19
307
+ def precompiled_template(locals); end
308
+
309
+ # source://tilt//lib/tilt/etanni.rb#6
310
+ def prepare; end
311
+ end
312
+
313
+ # Private internal class for finalized mappings, which are frozen and
314
+ # cannot be modified.
315
+ #
316
+ # source://tilt//lib/tilt/mapping.rb#373
317
+ class Tilt::FinalizedMapping < ::Tilt::BaseMapping
318
+ # Set the template map to use. The template map should already
319
+ # be frozen, but this is an internal class, so it does not
320
+ # explicitly check for that.
321
+ #
322
+ # @return [FinalizedMapping] a new instance of FinalizedMapping
323
+ #
324
+ # source://tilt//lib/tilt/mapping.rb#374
325
+ def initialize(template_map); end
326
+
327
+ # Returns receiver, since instances are always frozen.
328
+ #
329
+ # source://tilt//lib/tilt/mapping.rb#385
330
+ def clone(freeze: T.unsafe(nil)); end
331
+
332
+ # Returns receiver, since instances are always frozen.
333
+ #
334
+ # source://tilt//lib/tilt/mapping.rb#380
335
+ def dup; end
336
+
337
+ # Returns an aarry of all extensions the template class will
338
+ # be used for.
339
+ #
340
+ # source://tilt//lib/tilt/mapping.rb#396
341
+ def extensions_for(template_class); end
342
+
343
+ # Return whether the given file extension has been registered.
344
+ #
345
+ # @return [Boolean]
346
+ #
347
+ # source://tilt//lib/tilt/mapping.rb#390
348
+ def registered?(ext); end
349
+
350
+ private
351
+
352
+ # source://tilt//lib/tilt/mapping.rb#407
353
+ def lookup(ext); end
354
+ end
355
+
356
+ # Kramdown Markdown implementation. See: https://kramdown.gettalong.org/
357
+ #
358
+ # source://tilt//lib/tilt/kramdown.rb#0
359
+ class Tilt::KramdownTemplate < ::Tilt::StaticTemplate
360
+ private
361
+
362
+ # source://tilt//lib/tilt/kramdown.rb#8
363
+ def _prepare_output; end
364
+ end
365
+
366
+ # @private
367
+ #
368
+ # source://tilt//lib/tilt/template.rb#11
369
+ Tilt::LOCK = T.let(T.unsafe(nil), Thread::Mutex)
370
+
371
+ # Tilt::Mapping associates file extensions with template implementations.
372
+ #
373
+ # mapping = Tilt::Mapping.new
374
+ # mapping.register(Tilt::RDocTemplate, 'rdoc')
375
+ # mapping['index.rdoc'] # => Tilt::RDocTemplate
376
+ # mapping.new('index.rdoc').render
377
+ #
378
+ # You can use {#register} to register a template class by file
379
+ # extension, {#registered?} to see if a file extension is mapped,
380
+ # {#[]} to lookup template classes, and {#new} to instantiate template
381
+ # objects.
382
+ #
383
+ # Mapping also supports *lazy* template implementations. Note that regularly
384
+ # registered template implementations *always* have preference over lazily
385
+ # registered template implementations. You should use {#register} if you
386
+ # depend on a specific template implementation and {#register_lazy} if there
387
+ # are multiple alternatives.
388
+ #
389
+ # mapping = Tilt::Mapping.new
390
+ # mapping.register_lazy('RDiscount::Template', 'rdiscount/template', 'md')
391
+ # mapping['index.md']
392
+ # # => RDiscount::Template
393
+ #
394
+ # {#register_lazy} takes a class name, a filename, and a list of file
395
+ # extensions. When you try to lookup a template name that matches the
396
+ # file extension, Tilt will automatically try to require the filename and
397
+ # constantize the class name.
398
+ #
399
+ # Unlike {#register}, there can be multiple template implementations
400
+ # registered lazily to the same file extension. Tilt will attempt to load the
401
+ # template implementations in order (registered *last* would be tried first),
402
+ # returning the first which doesn't raise LoadError.
403
+ #
404
+ # If all of the registered template implementations fails, Tilt will raise
405
+ # the exception of the first, since that was the most preferred one.
406
+ #
407
+ # mapping = Tilt::Mapping.new
408
+ # mapping.register_lazy('Maruku::Template', 'maruku/template', 'md')
409
+ # mapping.register_lazy('RDiscount::Template', 'rdiscount/template', 'md')
410
+ # mapping['index.md']
411
+ # # => RDiscount::Template
412
+ #
413
+ # In the previous example we say that RDiscount has a *higher priority* than
414
+ # Maruku. Tilt will first try to `require "rdiscount/template"`, falling
415
+ # back to `require "maruku/template"`. If none of these are successful,
416
+ # the first error will be raised.
417
+ #
418
+ # source://tilt//lib/tilt/mapping.rb#125
419
+ class Tilt::Mapping < ::Tilt::BaseMapping
420
+ # @return [Mapping] a new instance of Mapping
421
+ #
422
+ # source://tilt//lib/tilt/mapping.rb#131
423
+ def initialize; end
424
+
425
+ # Finds the extensions the template class has been registered under.
426
+ #
427
+ # @param template_class [template class]
428
+ #
429
+ # source://tilt//lib/tilt/mapping.rb#287
430
+ def extensions_for(template_class); end
431
+
432
+ # Return a finalized mapping. A finalized mapping will only include
433
+ # support for template libraries already loaded, and will not
434
+ # allow registering new template libraries or lazy loading template
435
+ # libraries not yet loaded. Finalized mappings improve performance
436
+ # by not requiring synchronization and ensure that the mapping will
437
+ # not attempt to load additional files (useful when restricting
438
+ # file system access after template libraries in use are loaded).
439
+ #
440
+ # source://tilt//lib/tilt/mapping.rb#151
441
+ def finalized; end
442
+
443
+ # @private
444
+ #
445
+ # source://tilt//lib/tilt/mapping.rb#129
446
+ def lazy_map; end
447
+
448
+ # Registers a template implementation by file extension. There can only be
449
+ # one template implementation per file extension, and this method will
450
+ # override any existing mapping.
451
+ #
452
+ # @example
453
+ # mapping.register MyEngine::Template, 'mt'
454
+ # mapping['index.mt'] # => MyEngine::Template
455
+ # @param template_class
456
+ # @param extensions [Array<String>] List of extensions.
457
+ # @return [void]
458
+ #
459
+ # source://tilt//lib/tilt/mapping.rb#200
460
+ def register(template_class, *extensions); end
461
+
462
+ # Registers a lazy template implementation by file extension. You
463
+ # can have multiple lazy template implementations defined on the
464
+ # same file extension, in which case the template implementation
465
+ # defined *last* will be attempted loaded *first*.
466
+ #
467
+ # @example
468
+ # mapping.register_lazy 'MyEngine::Template', 'my_engine/template', 'mt'
469
+ #
470
+ # defined?(MyEngine::Template) # => false
471
+ # mapping['index.mt'] # => MyEngine::Template
472
+ # defined?(MyEngine::Template) # => true
473
+ # @param class_name [String] Class name of a template class.
474
+ # @param file [String] Filename where the template class is defined.
475
+ # @param extensions [Array<String>] List of extensions.
476
+ # @return [void]
477
+ #
478
+ # source://tilt//lib/tilt/mapping.rb#176
479
+ def register_lazy(class_name, file, *extensions); end
480
+
481
+ # Register a new template class using the given extension that
482
+ # represents a pipeline of multiple existing template, where the
483
+ # output from the previous template is used as input to the next
484
+ # template.
485
+ #
486
+ # This will register a template class that processes the input
487
+ # with the *erb* template processor, and takes the output of
488
+ # that and feeds it to the *scss* template processor, returning
489
+ # the output of the *scss* template processor as the result of
490
+ # the pipeline.
491
+ #
492
+ # @example
493
+ # mapping.register_pipeline('scss.erb')
494
+ # mapping.register_pipeline('scss.erb', 'erb'=>{:outvar=>'@foo'})
495
+ # mapping.register_pipeline('scsserb', :extra_exts => 'scss.erb',
496
+ # :templates=>['erb', 'scss'])
497
+ # @option :templates
498
+ # @option :extra_exts
499
+ # @option String
500
+ # @param ext [String] Primary extension to register
501
+ # @param :templates [Hash] a customizable set of options
502
+ # @param :extra_exts [Hash] a customizable set of options
503
+ # @param String [Hash] a customizable set of options
504
+ # @return [void]
505
+ #
506
+ # source://tilt//lib/tilt/mapping.rb#238
507
+ def register_pipeline(ext, options = T.unsafe(nil)); end
508
+
509
+ # Checks if a file extension is registered (either eagerly or
510
+ # lazily) in this mapping.
511
+ #
512
+ # @example
513
+ # mapping.registered?('erb') # => true
514
+ # mapping.registered?('nope') # => false
515
+ # @param ext [String] File extension.
516
+ # @return [Boolean]
517
+ #
518
+ # source://tilt//lib/tilt/mapping.rb#280
519
+ def registered?(ext); end
520
+
521
+ # @private
522
+ #
523
+ # source://tilt//lib/tilt/mapping.rb#129
524
+ def template_map; end
525
+
526
+ # Unregisters an extension. This removes the both normal registrations
527
+ # and lazy registrations.
528
+ #
529
+ # @example
530
+ # mapping.register MyEngine::Template, 'mt'
531
+ # mapping['index.mt'] # => MyEngine::Template
532
+ # mapping.unregister('mt')
533
+ # mapping['index.mt'] # => nil
534
+ # @param extensions [Array<String>] List of extensions.
535
+ # @return nil
536
+ #
537
+ # source://tilt//lib/tilt/mapping.rb#260
538
+ def unregister(*extensions); end
539
+
540
+ private
541
+
542
+ # The proper behavior (in MRI) for autoload? is to
543
+ # return `false` when the constant/file has been
544
+ # explicitly required.
545
+ #
546
+ # However, in JRuby it returns `true` even after it's
547
+ # been required. In that case it turns out that `defined?`
548
+ # returns `"constant"` if it exists and `nil` when it doesn't.
549
+ # This is actually a second bug: `defined?` should resolve
550
+ # autoload (aka. actually try to require the file).
551
+ #
552
+ # We use the second bug in order to resolve the first bug.
553
+ #
554
+ # @return [Boolean]
555
+ #
556
+ # source://tilt//lib/tilt/mapping.rb#360
557
+ def constant_defined?(name); end
558
+
559
+ # @private
560
+ #
561
+ # source://tilt//lib/tilt/mapping.rb#137
562
+ def initialize_copy(other); end
563
+
564
+ # @return [Boolean]
565
+ #
566
+ # source://tilt//lib/tilt/mapping.rb#301
567
+ def lazy?(ext); end
568
+
569
+ # source://tilt//lib/tilt/mapping.rb#320
570
+ def lazy_load(pattern); end
571
+
572
+ # source://tilt//lib/tilt/mapping.rb#306
573
+ def lookup(ext); end
574
+
575
+ # source://tilt//lib/tilt/mapping.rb#310
576
+ def register_defined_classes(class_names, pattern); end
577
+ end
578
+
579
+ # source://tilt//lib/tilt/mapping.rb#126
580
+ Tilt::Mapping::LOCK = T.let(T.unsafe(nil), Thread::Mutex)
581
+
582
+ # Nokogiri template implementation. See:
583
+ # http://nokogiri.org/
584
+ #
585
+ # source://tilt//lib/tilt/nokogiri.rb#8
586
+ class Tilt::NokogiriTemplate < ::Tilt::Template
587
+ # source://tilt//lib/tilt/nokogiri.rb#12
588
+ def evaluate(scope, locals); end
589
+
590
+ # source://tilt//lib/tilt/nokogiri.rb#29
591
+ def precompiled_postamble(locals); end
592
+
593
+ # source://tilt//lib/tilt/nokogiri.rb#24
594
+ def precompiled_preamble(locals); end
595
+
596
+ # source://tilt//lib/tilt/nokogiri.rb#33
597
+ def precompiled_template(locals); end
598
+ end
599
+
600
+ # source://tilt//lib/tilt/nokogiri.rb#9
601
+ Tilt::NokogiriTemplate::DOCUMENT_HEADER = T.let(T.unsafe(nil), Regexp)
602
+
603
+ # Superclass used for pipeline templates. Should not be used directly.
604
+ #
605
+ # source://tilt//lib/tilt/pipeline.rb#6
606
+ class Tilt::Pipeline < ::Tilt::Template
607
+ # source://tilt//lib/tilt/pipeline.rb#15
608
+ def evaluate(scope, locals, &block); end
609
+
610
+ # source://tilt//lib/tilt/pipeline.rb#7
611
+ def prepare; end
612
+ end
613
+
614
+ # Raw text (no template functionality).
615
+ #
616
+ # source://tilt//lib/tilt/plain.rb#0
617
+ class Tilt::PlainTemplate < ::Tilt::StaticTemplate
618
+ private
619
+
620
+ # source://tilt//lib/tilt/plain.rb#5
621
+ def _prepare_output; end
622
+ end
623
+
624
+ # RDoc template. See: https://github.com/ruby/rdoc
625
+ #
626
+ # It's suggested that your program run the following at load time when
627
+ # using this templae engine in a threaded environment:
628
+ #
629
+ # require 'rdoc'
630
+ # require 'rdoc/markup'
631
+ # require 'rdoc/markup/to_html'
632
+ # require 'rdoc/options'
633
+ #
634
+ # source://tilt//lib/tilt/rdoc.rb#0
635
+ class Tilt::RDocTemplate < ::Tilt::StaticTemplate
636
+ private
637
+
638
+ # source://tilt//lib/tilt/rdoc.rb#17
639
+ def _prepare_output; end
640
+ end
641
+
642
+ # source://tilt//lib/tilt/template.rb#416
643
+ class Tilt::StaticTemplate < ::Tilt::Template
644
+ # Static templates never allow script.
645
+ #
646
+ # @return [Boolean]
647
+ #
648
+ # source://tilt//lib/tilt/template.rb#439
649
+ def allows_script?; end
650
+
651
+ # Raise NotImplementedError, since static templates
652
+ # do not support compiled methods.
653
+ #
654
+ # @raise [NotImplementedError]
655
+ #
656
+ # source://tilt//lib/tilt/template.rb#434
657
+ def compiled_method(locals_keys, scope_class = T.unsafe(nil)); end
658
+
659
+ # Static templates always return the prepared output.
660
+ #
661
+ # source://tilt//lib/tilt/template.rb#428
662
+ def render(scope = T.unsafe(nil), locals = T.unsafe(nil)); end
663
+
664
+ protected
665
+
666
+ # source://tilt//lib/tilt/template.rb#445
667
+ def prepare; end
668
+
669
+ private
670
+
671
+ # Do nothing, since compiled method cache is not used.
672
+ #
673
+ # source://tilt//lib/tilt/template.rb#452
674
+ def set_compiled_method_cache; end
675
+
676
+ class << self
677
+ # source://tilt//lib/tilt/template.rb#417
678
+ def subclass(mime_type: T.unsafe(nil), &block); end
679
+ end
680
+ end
681
+
682
+ # The template source is evaluated as a Ruby string. The #{} interpolation
683
+ # syntax can be used to generated dynamic output.
684
+ #
685
+ # source://tilt//lib/tilt/string.rb#7
686
+ class Tilt::StringTemplate < ::Tilt::Template
687
+ # @return [Boolean]
688
+ #
689
+ # source://tilt//lib/tilt/string.rb#23
690
+ def freeze_string_literals?; end
691
+
692
+ # source://tilt//lib/tilt/string.rb#18
693
+ def precompiled(locals); end
694
+
695
+ # source://tilt//lib/tilt/string.rb#14
696
+ def precompiled_template(locals); end
697
+
698
+ # source://tilt//lib/tilt/string.rb#8
699
+ def prepare; end
700
+ end
701
+
702
+ # @private
703
+ #
704
+ # source://tilt//lib/tilt/template.rb#8
705
+ Tilt::TOPOBJECT = Tilt::CompiledTemplates
706
+
707
+ # Base class for template implementations. Subclasses must implement
708
+ # the #prepare method and one of the #evaluate or #precompiled_template
709
+ # methods.
710
+ #
711
+ # source://tilt//lib/tilt/template.rb#16
712
+ class Tilt::Template
713
+ # Create a new template with the file, line, and options specified. By
714
+ # default, template data is read from the file. When a block is given,
715
+ # it should read template data and return as a String. When file is nil,
716
+ # a block is required.
717
+ #
718
+ # All arguments are optional.
719
+ #
720
+ # @raise [ArgumentError]
721
+ # @return [Template] a new instance of Template
722
+ #
723
+ # source://tilt//lib/tilt/template.rb#61
724
+ def initialize(file = T.unsafe(nil), line = T.unsafe(nil), options = T.unsafe(nil)); end
725
+
726
+ # The basename of the template file.
727
+ #
728
+ # source://tilt//lib/tilt/template.rb#106
729
+ def basename(suffix = T.unsafe(nil)); end
730
+
731
+ # The compiled method for the locals keys and scope_class provided.
732
+ # Returns an UnboundMethod, which can be used to define methods
733
+ # directly on the scope class, which are much faster to call than
734
+ # Tilt's normal rendering.
735
+ #
736
+ # source://tilt//lib/tilt/template.rb#147
737
+ def compiled_method(locals_keys, scope_class = T.unsafe(nil)); end
738
+
739
+ # A path ending in .rb that the template code will be written to, then
740
+ # required, instead of being evaled. This is useful for determining
741
+ # coverage of compiled template code, or to use static analysis tools
742
+ # on the compiled template code.
743
+ #
744
+ # source://tilt//lib/tilt/template.rb#35
745
+ def compiled_path; end
746
+
747
+ # Set the prefix to use for compiled paths.
748
+ #
749
+ # source://tilt//lib/tilt/template.rb#133
750
+ def compiled_path=(path); end
751
+
752
+ # Template source; loaded from a file or given directly.
753
+ #
754
+ # source://tilt//lib/tilt/template.rb#18
755
+ def data; end
756
+
757
+ # The filename used in backtraces to describe the template.
758
+ #
759
+ # source://tilt//lib/tilt/template.rb#118
760
+ def eval_file; end
761
+
762
+ # The name of the file where the template data was loaded from.
763
+ #
764
+ # source://tilt//lib/tilt/template.rb#21
765
+ def file; end
766
+
767
+ # The line number in #file where template data was loaded from.
768
+ #
769
+ # source://tilt//lib/tilt/template.rb#24
770
+ def line; end
771
+
772
+ # An empty Hash that the template engine can populate with various
773
+ # metadata.
774
+ #
775
+ # source://tilt//lib/tilt/template.rb#124
776
+ def metadata; end
777
+
778
+ # The template file's basename with all extensions chomped off.
779
+ #
780
+ # source://tilt//lib/tilt/template.rb#111
781
+ def name; end
782
+
783
+ # A Hash of template engine specific options. This is passed directly
784
+ # to the underlying engine and is not used by the generic template
785
+ # interface.
786
+ #
787
+ # source://tilt//lib/tilt/template.rb#29
788
+ def options; end
789
+
790
+ # Render the template in the given scope with the locals specified. If a
791
+ # block is given, it is typically available within the template via
792
+ # +yield+.
793
+ #
794
+ # source://tilt//lib/tilt/template.rb#101
795
+ def render(scope = T.unsafe(nil), locals = T.unsafe(nil), &block); end
796
+
797
+ protected
798
+
799
+ # The encoding of the source data. Defaults to the
800
+ # default_encoding-option if present. You may override this method
801
+ # in your template class if you have a better hint of the data's
802
+ # encoding.
803
+ #
804
+ # source://tilt//lib/tilt/template.rb#169
805
+ def default_encoding; end
806
+
807
+ # Execute the compiled template and return the result string. Template
808
+ # evaluation is guaranteed to be performed in the scope object with the
809
+ # locals specified and with support for yielding to the block.
810
+ #
811
+ # This method is only used by source generating templates. Subclasses that
812
+ # override render() may not support all features.
813
+ #
814
+ # source://tilt//lib/tilt/template.rb#192
815
+ def evaluate(scope, locals, &block); end
816
+
817
+ # Generates all template source by combining the preamble, template, and
818
+ # postamble and returns a two-tuple of the form: [source, offset], where
819
+ # source is the string containing (Ruby) source code for the template and
820
+ # offset is the integer line offset where line reporting should begin.
821
+ #
822
+ # Template subclasses may override this method when they need complete
823
+ # control over source generation or want to adjust the default line
824
+ # offset. In most cases, overriding the #precompiled_template method is
825
+ # easier and more appropriate.
826
+ #
827
+ # source://tilt//lib/tilt/template.rb#224
828
+ def precompiled(local_keys); end
829
+
830
+ # source://tilt//lib/tilt/template.rb#262
831
+ def precompiled_postamble(local_keys); end
832
+
833
+ # source://tilt//lib/tilt/template.rb#258
834
+ def precompiled_preamble(local_keys); end
835
+
836
+ # A string containing the (Ruby) source code for the template. The
837
+ # default Template#evaluate implementation requires either this
838
+ # method or the #precompiled method be overridden. When defined,
839
+ # the base Template guarantees correct file/line handling, locals
840
+ # support, custom scopes, proper encoding, and support for template
841
+ # compilation.
842
+ #
843
+ # @raise [NotImplementedError]
844
+ #
845
+ # source://tilt//lib/tilt/template.rb#254
846
+ def precompiled_template(local_keys); end
847
+
848
+ # Do whatever preparation is necessary to setup the underlying template
849
+ # engine. Called immediately after template data is loaded. Instance
850
+ # variables set in this method are available when #evaluate is called.
851
+ #
852
+ # Empty by default as some subclasses do not need separate preparation.
853
+ #
854
+ # source://tilt//lib/tilt/template.rb#180
855
+ def prepare; end
856
+
857
+ # @return [Boolean]
858
+ #
859
+ # source://tilt//lib/tilt/template.rb#171
860
+ def skip_compiled_encoding_detection?; end
861
+
862
+ private
863
+
864
+ # source://tilt//lib/tilt/template.rb#407
865
+ def binary(string); end
866
+
867
+ # source://tilt//lib/tilt/template.rb#341
868
+ def bind_compiled_method(method_source, offset, scope_class); end
869
+
870
+ # source://tilt//lib/tilt/template.rb#318
871
+ def compile_template_method(local_keys, scope_class = T.unsafe(nil)); end
872
+
873
+ # source://tilt//lib/tilt/template.rb#370
874
+ def eval_compiled_method(method_source, offset, scope_class); end
875
+
876
+ # source://tilt//lib/tilt/template.rb#388
877
+ def extract_encoding(script, &block); end
878
+
879
+ # source://tilt//lib/tilt/template.rb#392
880
+ def extract_magic_comment(script); end
881
+
882
+ # @return [Boolean]
883
+ #
884
+ # source://tilt//lib/tilt/template.rb#403
885
+ def freeze_string_literals?; end
886
+
887
+ # source://tilt//lib/tilt/template.rb#374
888
+ def load_compiled_method(path, method_source); end
889
+
890
+ # source://tilt//lib/tilt/template.rb#297
891
+ def local_extraction(local_keys); end
892
+
893
+ # source://tilt//lib/tilt/template.rb#270
894
+ def process_arg(arg); end
895
+
896
+ # source://tilt//lib/tilt/template.rb#284
897
+ def read_template_file; end
898
+
899
+ # source://tilt//lib/tilt/template.rb#293
900
+ def set_compiled_method_cache; end
901
+
902
+ # source://tilt//lib/tilt/template.rb#382
903
+ def unbind_compiled_method(method_name); end
904
+
905
+ class << self
906
+ # Use `.metadata[:mime_type]` instead.
907
+ #
908
+ # source://tilt//lib/tilt/template.rb#45
909
+ def default_mime_type; end
910
+
911
+ # Use `.metadata[:mime_type] = val` instead.
912
+ #
913
+ # source://tilt//lib/tilt/template.rb#50
914
+ def default_mime_type=(value); end
915
+
916
+ # An empty Hash that the template engine can populate with various
917
+ # metadata.
918
+ #
919
+ # source://tilt//lib/tilt/template.rb#40
920
+ def metadata; end
921
+ end
922
+ end
923
+
924
+ # source://tilt//lib/tilt/template.rb#183
925
+ Tilt::Template::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
926
+
927
+ # source://tilt//lib/tilt/template.rb#184
928
+ Tilt::Template::USE_BIND_CALL = T.let(T.unsafe(nil), TrueClass)
929
+
930
+ # Current version.
931
+ #
932
+ # source://tilt//lib/tilt.rb#8
933
+ Tilt::VERSION = T.let(T.unsafe(nil), String)