frontman-ssg 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -0
  3. data/CHANGELOG.md +13 -2
  4. data/Rakefile +5 -2
  5. data/frontman-ssg.gemspec +1 -0
  6. data/lib/frontman.rb +0 -5
  7. data/lib/frontman/app.rb +1 -3
  8. data/lib/frontman/builder/file.rb +1 -3
  9. data/lib/frontman/commands/init.rb +2 -3
  10. data/lib/frontman/commands/serve.rb +29 -28
  11. data/lib/frontman/concerns/forward_calls_to_app.rb +1 -1
  12. data/lib/frontman/context.rb +68 -57
  13. data/lib/frontman/data_store.rb +1 -3
  14. data/lib/frontman/iterator.rb +1 -3
  15. data/lib/frontman/renderers/erb_renderer.rb +19 -1
  16. data/lib/frontman/renderers/haml_renderer.rb +29 -1
  17. data/lib/frontman/renderers/renderer_resolver.rb +18 -5
  18. data/lib/frontman/renderers/slim_renderer.rb +30 -0
  19. data/lib/frontman/resource.rb +9 -13
  20. data/lib/frontman/sitemap_tree.rb +1 -3
  21. data/lib/frontman/version.rb +1 -1
  22. data/project-templates/webpack/helpers/assets_helper.rb +1 -3
  23. data/sorbet/rbi/gems/ast.rbi +48 -0
  24. data/sorbet/rbi/gems/better_errors.rbi +180 -0
  25. data/sorbet/rbi/gems/binding_of_caller.rbi +23 -0
  26. data/sorbet/rbi/gems/coderay.rbi +24 -0
  27. data/sorbet/rbi/gems/debug_inspector.rbi +19 -0
  28. data/sorbet/rbi/gems/docile.rbi +32 -0
  29. data/sorbet/rbi/gems/dotenv.rbi +68 -0
  30. data/sorbet/rbi/gems/erubi.rbi +27 -0
  31. data/sorbet/rbi/gems/erubis.rbi +280 -0
  32. data/sorbet/rbi/gems/haml.rbi +521 -0
  33. data/sorbet/rbi/gems/htmlentities.rbi +46 -0
  34. data/sorbet/rbi/gems/jaro_winkler.rbi +15 -0
  35. data/sorbet/rbi/gems/kramdown-parser-gfm.rbi +29 -0
  36. data/sorbet/rbi/gems/kramdown.rbi +338 -0
  37. data/sorbet/rbi/gems/listen.rbi +301 -0
  38. data/sorbet/rbi/gems/mustermann.rbi +481 -0
  39. data/sorbet/rbi/gems/nokogiri.rbi +1011 -0
  40. data/sorbet/rbi/gems/parallel.rbi +82 -0
  41. data/sorbet/rbi/gems/parser.rbi +1405 -0
  42. data/sorbet/rbi/gems/rack-protection.rbi +16 -0
  43. data/sorbet/rbi/gems/rack.rbi +507 -0
  44. data/sorbet/rbi/gems/rainbow.rbi +118 -0
  45. data/sorbet/rbi/gems/rake.rbi +641 -0
  46. data/sorbet/rbi/gems/rexml.rbi +93 -0
  47. data/sorbet/rbi/gems/rouge.rbi +1551 -0
  48. data/sorbet/rbi/gems/rspec-core.rbi +1893 -0
  49. data/sorbet/rbi/gems/rspec-expectations.rbi +1125 -0
  50. data/sorbet/rbi/gems/rspec-mocks.rbi +1099 -0
  51. data/sorbet/rbi/gems/rspec-support.rbi +280 -0
  52. data/sorbet/rbi/gems/rspec.rbi +15 -0
  53. data/sorbet/rbi/gems/rubocop-performance.rbi +274 -0
  54. data/sorbet/rbi/gems/rubocop.rbi +7403 -0
  55. data/sorbet/rbi/gems/ruby-progressbar.rbi +305 -0
  56. data/sorbet/rbi/gems/ruby2_keywords.rbi +17 -0
  57. data/sorbet/rbi/gems/simplecov-html.rbi +35 -0
  58. data/sorbet/rbi/gems/simplecov.rbi +405 -0
  59. data/sorbet/rbi/gems/sinatra.rbi +488 -0
  60. data/sorbet/rbi/gems/slim.rbi +144 -0
  61. data/sorbet/rbi/gems/temple.rbi +281 -0
  62. data/sorbet/rbi/gems/thor.rbi +522 -0
  63. data/sorbet/rbi/gems/tilt.rbi +82 -0
  64. data/sorbet/rbi/gems/unicode-display_width.rbi +17 -0
  65. data/sorbet/rbi/gems/yaml-front-matter.rbi +16 -0
  66. data/sorbet/rbi/hidden-definitions/errors.txt +2859 -24228
  67. data/sorbet/rbi/hidden-definitions/hidden.rbi +7111 -40830
  68. data/sorbet/rbi/sorbet-typed/lib/nokogiri/1.10.10/nokogiri.rbi +1615 -0
  69. data/sorbet/rbi/sorbet-typed/lib/thor/all/thor.rbi +905 -0
  70. data/sorbet/rbi/todo.rbi +6 -0
  71. data/spec/frontman/bootstrapper_spec.rb +1 -1
  72. data/spec/frontman/context_spec.rb +45 -6
  73. data/spec/frontman/mocks/context.haml +18 -0
  74. data/spec/frontman/renderers/slim_renderer_spec.rb +12 -0
  75. metadata +66 -4
@@ -0,0 +1,481 @@
1
+ # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
+ # srb rbi gems
3
+
4
+ # typed: true
5
+ #
6
+ # If you would like to make changes to this file, great! Please create the gem's shim here:
7
+ #
8
+ # https://github.com/sorbet/sorbet-typed/new/master?filename=lib/mustermann/all/mustermann.rbi
9
+ #
10
+ # mustermann-1.1.1
11
+
12
+ module Mustermann
13
+ def self.[](name); end
14
+ def self.extend_object(object); end
15
+ def self.new(*input, type: nil, operator: nil, **options); end
16
+ def self.normalized_type(type); end
17
+ def self.register(name, type); end
18
+ def self.try_require(path); end
19
+ end
20
+ class Mustermann::Error < StandardError
21
+ end
22
+ class Mustermann::CompileError < Mustermann::Error
23
+ end
24
+ class Mustermann::ParseError < Mustermann::Error
25
+ end
26
+ class Mustermann::ExpandError < Mustermann::Error
27
+ end
28
+ class Mustermann::SimpleMatch
29
+ def +(other); end
30
+ def [](*args); end
31
+ def captures; end
32
+ def initialize(string = nil, names: nil, captures: nil); end
33
+ def inspect; end
34
+ def names; end
35
+ def to_s; end
36
+ end
37
+ class Mustermann::EqualityMap
38
+ def fetch(key); end
39
+ def finalizer(hash); end
40
+ def initialize; end
41
+ def map; end
42
+ def self.new; end
43
+ def track(key, object); end
44
+ end
45
+ class Mustermann::Pattern
46
+ def &(other); end
47
+ def +(other); end
48
+ def ==(other); end
49
+ def ===(string); end
50
+ def =~(string); end
51
+ def ^(other); end
52
+ def always_array?(key); end
53
+ def eql?(other); end
54
+ def expand(behavior = nil, values = nil); end
55
+ def hash; end
56
+ def initialize(string, uri_decode: nil, **options); end
57
+ def inspect; end
58
+ def map_param(key, value); end
59
+ def match(string); end
60
+ def named_captures; end
61
+ def names; end
62
+ def options; end
63
+ def params(string = nil, captures: nil, offset: nil); end
64
+ def peek(string); end
65
+ def peek_match(string); end
66
+ def peek_params(string); end
67
+ def peek_size(string); end
68
+ def respond_to?(method, *args); end
69
+ def respond_to_special?(method); end
70
+ def self.new(string, ignore_unknown_options: nil, **options); end
71
+ def self.register(*names); end
72
+ def self.supported?(option, **options); end
73
+ def self.supported_options(*list); end
74
+ def simple_inspect; end
75
+ def to_proc; end
76
+ def to_s; end
77
+ def to_templates; end
78
+ def unescape(string, decode = nil); end
79
+ def uri_decode; end
80
+ def |(other); end
81
+ include Mustermann
82
+ end
83
+ class Mustermann::Composite < Mustermann::Pattern
84
+ def ==(pattern); end
85
+ def ===(string); end
86
+ def eql?(pattern); end
87
+ def expand(behavior = nil, values = nil); end
88
+ def hash; end
89
+ def initialize(patterns, operator: nil, **options); end
90
+ def inspect; end
91
+ def match(string); end
92
+ def operator; end
93
+ def params(string); end
94
+ def patterns; end
95
+ def patterns_from(pattern, **options); end
96
+ def respond_to_special?(method); end
97
+ def self.new(*patterns, **options); end
98
+ def self.supported?(option, type: nil, **options); end
99
+ def simple_inspect; end
100
+ def to_s; end
101
+ def to_templates; end
102
+ def with_matching(string, method); end
103
+ end
104
+ class Mustermann::Concat < Mustermann::Composite
105
+ def ===(string); end
106
+ def combined_ast; end
107
+ def expand(behavior = nil, values = nil); end
108
+ def initialize(*arg0, **arg1); end
109
+ def match(string); end
110
+ def operator; end
111
+ def params(string); end
112
+ def peek_match(string); end
113
+ def peek_params(string); end
114
+ def peek_size(string); end
115
+ def pump(string, inject_with: nil, initial: nil, with_size: nil); end
116
+ def respond_to_special?(method); end
117
+ def to_templates; end
118
+ end
119
+ module Mustermann::Concat::Native
120
+ def +(other); end
121
+ def look_ahead(other); end
122
+ def native_concat(other); end
123
+ def native_concat?(other); end
124
+ end
125
+ module Mustermann::AST
126
+ end
127
+ class Mustermann::AST::Node
128
+ def each_leaf(&block); end
129
+ def initialize(payload = nil, **options); end
130
+ def is_a?(type); end
131
+ def length; end
132
+ def min_size; end
133
+ def parse; end
134
+ def payload; end
135
+ def payload=(arg0); end
136
+ def self.[](name); end
137
+ def self.constant_name(name); end
138
+ def self.parse(*args, &block); end
139
+ def self.type; end
140
+ def start; end
141
+ def start=(arg0); end
142
+ def stop; end
143
+ def stop=(arg0); end
144
+ def type; end
145
+ end
146
+ class Mustermann::AST::Node::Capture < Mustermann::AST::Node
147
+ def constraint; end
148
+ def constraint=(arg0); end
149
+ def convert; end
150
+ def convert=(arg0); end
151
+ def name; end
152
+ def parse; end
153
+ def qualifier; end
154
+ def qualifier=(arg0); end
155
+ end
156
+ class Mustermann::AST::Node::Char < Mustermann::AST::Node
157
+ def min_size; end
158
+ end
159
+ class Mustermann::AST::Node::Expression < Mustermann::AST::Node
160
+ def operator; end
161
+ def operator=(arg0); end
162
+ end
163
+ class Mustermann::AST::Node::Composition < Mustermann::AST::Node
164
+ def initialize(payload = nil, **options); end
165
+ end
166
+ class Mustermann::AST::Node::Group < Mustermann::AST::Node::Composition
167
+ end
168
+ class Mustermann::AST::Node::Union < Mustermann::AST::Node::Composition
169
+ end
170
+ class Mustermann::AST::Node::Optional < Mustermann::AST::Node
171
+ end
172
+ class Mustermann::AST::Node::Or < Mustermann::AST::Node
173
+ end
174
+ class Mustermann::AST::Node::Root < Mustermann::AST::Node
175
+ def pattern; end
176
+ def pattern=(arg0); end
177
+ def self.parse(string, &block); end
178
+ end
179
+ class Mustermann::AST::Node::Separator < Mustermann::AST::Node
180
+ def min_size; end
181
+ end
182
+ class Mustermann::AST::Node::Splat < Mustermann::AST::Node::Capture
183
+ def name; end
184
+ end
185
+ class Mustermann::AST::Node::NamedSplat < Mustermann::AST::Node::Splat
186
+ def name; end
187
+ end
188
+ class Mustermann::AST::Node::Variable < Mustermann::AST::Node::Capture
189
+ def explode; end
190
+ def explode=(arg0); end
191
+ def prefix; end
192
+ def prefix=(arg0); end
193
+ end
194
+ class Mustermann::AST::Node::WithLookAhead < Mustermann::AST::Node
195
+ def at_end; end
196
+ def at_end=(arg0); end
197
+ def head; end
198
+ def head=(arg0); end
199
+ def initialize(payload, at_end, **options); end
200
+ end
201
+ class Mustermann::Identity < Mustermann::Pattern
202
+ def ===(string); end
203
+ def expand(behavior = nil, values = nil); end
204
+ def peek_size(string); end
205
+ def to_ast; end
206
+ def to_templates; end
207
+ include Mustermann::Concat::Native
208
+ end
209
+ class Mustermann::AST::Parser
210
+ def buffer; end
211
+ def default_node(char); end
212
+ def eos?(*args, &block); end
213
+ def expect(regexp, char: nil, **options); end
214
+ def getch(*args, &block); end
215
+ def initialize(pattern: nil, **options); end
216
+ def min_size(start, stop, node); end
217
+ def node(type, *args, &block); end
218
+ def parse(string); end
219
+ def pattern; end
220
+ def pos(*args, &block); end
221
+ def read; end
222
+ def read_args(key_separator, close, separator: nil, symbol_keys: nil, **options); end
223
+ def read_brackets(open, close, char: nil, escape: nil, quote: nil, **options); end
224
+ def read_escaped(close, escape: nil, **options); end
225
+ def read_list(*close, separator: nil, escape: nil, quotes: nil, ignore: nil, **options); end
226
+ def read_suffix(element); end
227
+ def scan(regexp); end
228
+ def self.on(*chars, &block); end
229
+ def self.parse(string, **options); end
230
+ def self.suffix(pattern = nil, after: nil, &block); end
231
+ def string; end
232
+ def unexpected(char = nil, exception: nil); end
233
+ extend Forwardable
234
+ end
235
+ class Mustermann::AST::Translator
236
+ def decorator_for(node); end
237
+ def error_class; end
238
+ def escape(char, parser: nil, escape: nil, also_escape: nil); end
239
+ def self.create(&block); end
240
+ def self.dispatch_table; end
241
+ def self.inherited(subclass); end
242
+ def self.raises(error); end
243
+ def self.translate(*types, &block); end
244
+ def translate(node, *args, &block); end
245
+ end
246
+ class Mustermann::AST::Translator::NodeTranslator < Anonymous_Delegator_8
247
+ def initialize(node, translator); end
248
+ def node; end
249
+ def self.register(*types); end
250
+ def t(*args, &block); end
251
+ def translator; end
252
+ end
253
+ class Mustermann::AST::Boundaries::NodeTranslator < Mustermann::AST::Translator::NodeTranslator
254
+ def self.translator; end
255
+ end
256
+ class Mustermann::AST::Boundaries < Mustermann::AST::Translator
257
+ def self.set_boundaries(ast, string: nil, start: nil, stop: nil); end
258
+ def set_boundaries(node, start, stop); end
259
+ end
260
+ class Mustermann::AST::Compiler::NodeTranslator < Mustermann::AST::Translator::NodeTranslator
261
+ def self.translator; end
262
+ end
263
+ class Mustermann::AST::Compiler < Mustermann::AST::Translator
264
+ def compile(ast, except: nil, **options); end
265
+ def encoded(char, uri_decode: nil, space_matches_plus: nil, **options); end
266
+ def error_class; end
267
+ def self.compile(ast, **options); end
268
+ end
269
+ class Mustermann::AST::Compiler::Capture < Mustermann::AST::Compiler::NodeTranslator
270
+ def default(**options); end
271
+ def from_array(array, **options); end
272
+ def from_hash(hash, **options); end
273
+ def from_nil(**options); end
274
+ def from_string(string, **options); end
275
+ def from_symbol(symbol, **options); end
276
+ def pattern(capture: nil, **options); end
277
+ def qualified(string, greedy: nil, **options); end
278
+ def translate(**options); end
279
+ def with_lookahead(string, lookahead: nil, **options); end
280
+ end
281
+ class Mustermann::AST::Compiler::Splat < Mustermann::AST::Compiler::Capture
282
+ def pattern(**options); end
283
+ end
284
+ class Mustermann::AST::Compiler::Variable < Mustermann::AST::Compiler::Capture
285
+ def default(allow_reserved: nil, **options); end
286
+ def parametric(string); end
287
+ def pattern(parametric: nil, separator: nil, **options); end
288
+ def qualified(string, **options); end
289
+ def register_param(parametric: nil, split_params: nil, separator: nil, **options); end
290
+ def translate(**options); end
291
+ end
292
+ class Mustermann::AST::Transformer::NodeTranslator < Mustermann::AST::Translator::NodeTranslator
293
+ def self.translator; end
294
+ end
295
+ class Mustermann::AST::Transformer < Mustermann::AST::Translator
296
+ def self.transform(tree); end
297
+ end
298
+ class Mustermann::AST::Transformer::GroupTransformer < Mustermann::AST::Transformer::NodeTranslator
299
+ def group(elements); end
300
+ def split_payload; end
301
+ def translate; end
302
+ def union; end
303
+ end
304
+ class Mustermann::AST::Transformer::RootTransformer < Mustermann::AST::Transformer::GroupTransformer
305
+ def union; end
306
+ end
307
+ class Mustermann::AST::Transformer::ExpressionTransform < Mustermann::AST::Transformer::NodeTranslator
308
+ def translate; end
309
+ end
310
+ class Mustermann::AST::Transformer::ExpressionTransform::Operator < Struct
311
+ def allow_reserved; end
312
+ def allow_reserved=(_); end
313
+ def parametric; end
314
+ def parametric=(_); end
315
+ def prefix; end
316
+ def prefix=(_); end
317
+ def self.[](*arg0); end
318
+ def self.inspect; end
319
+ def self.members; end
320
+ def self.new(*arg0); end
321
+ def separator; end
322
+ def separator=(_); end
323
+ end
324
+ class Mustermann::AST::Transformer::ArrayTransform < Mustermann::AST::Transformer::NodeTranslator
325
+ def create_lookahead(elements, *args); end
326
+ def expect_lookahead?(element); end
327
+ def list_for(element); end
328
+ def lookahead?(element, in_lookahead = nil); end
329
+ def lookahead_buffer; end
330
+ def lookahead_payload?(payload, in_lookahead); end
331
+ def payload; end
332
+ def track(element); end
333
+ def translate; end
334
+ end
335
+ class Mustermann::AST::Validation::NodeTranslator < Mustermann::AST::Translator::NodeTranslator
336
+ def self.translator; end
337
+ end
338
+ class Mustermann::AST::Validation < Mustermann::AST::Translator
339
+ def check_name(name, forbidden: nil); end
340
+ def names; end
341
+ def self.validate(ast); end
342
+ end
343
+ class Mustermann::AST::TemplateGenerator::NodeTranslator < Mustermann::AST::Translator::NodeTranslator
344
+ def self.translator; end
345
+ end
346
+ class Mustermann::AST::TemplateGenerator < Mustermann::AST::Translator
347
+ def self.generate_templates(ast); end
348
+ end
349
+ class Mustermann::AST::ParamScanner::NodeTranslator < Mustermann::AST::Translator::NodeTranslator
350
+ def self.translator; end
351
+ end
352
+ class Mustermann::AST::ParamScanner < Mustermann::AST::Translator
353
+ def self.scan_params(ast); end
354
+ end
355
+ class Mustermann::RegexpBased < Mustermann::Pattern
356
+ def ===(*args, &block); end
357
+ def =~(*args, &block); end
358
+ def compile(**options); end
359
+ def initialize(string, **options); end
360
+ def match(*args, &block); end
361
+ def named_captures(*args, &block); end
362
+ def names(*args, &block); end
363
+ def peek_match(string); end
364
+ def peek_size(string); end
365
+ def regexp; end
366
+ def to_regexp; end
367
+ extend Forwardable
368
+ end
369
+ class Mustermann::AST::Expander::NodeTranslator < Mustermann::AST::Translator::NodeTranslator
370
+ def self.translator; end
371
+ end
372
+ class Mustermann::AST::Expander < Mustermann::AST::Translator
373
+ def add(ast); end
374
+ def add_to(list, result); end
375
+ def error_class; end
376
+ def error_for(values); end
377
+ def escape(string, *args); end
378
+ def expand(values); end
379
+ def expandable?(values); end
380
+ def expandable_keys(keys); end
381
+ def for_capture(node, **options); end
382
+ def keys; end
383
+ def mappings; end
384
+ def pattern(string = nil, *keys, **filters); end
385
+ def pattern_for(node, **options); end
386
+ end
387
+ class Mustermann::Caster < Anonymous_Delegator_9
388
+ def cast(hash); end
389
+ def caster_for(type, &block); end
390
+ def initialize(*types, &block); end
391
+ def register(*types, &block); end
392
+ end
393
+ class Mustermann::Caster::Any
394
+ def cast(key, value); end
395
+ def initialize(&block); end
396
+ end
397
+ class Mustermann::Caster::Value < Mustermann::Caster::Any
398
+ def cast(key, value); end
399
+ def initialize(type, &block); end
400
+ end
401
+ class Mustermann::Caster::Key < Mustermann::Caster::Any
402
+ def cast(key, value); end
403
+ def initialize(type, &block); end
404
+ end
405
+ class Mustermann::Expander
406
+ def <<(*patterns); end
407
+ def ==(other); end
408
+ def add(*patterns); end
409
+ def additional_values; end
410
+ def append(uri, values); end
411
+ def cast(*types, &block); end
412
+ def caster; end
413
+ def eql?(other); end
414
+ def expand(behavior = nil, values = nil); end
415
+ def expandable?(values); end
416
+ def hash; end
417
+ def initialize(*patterns, additional_values: nil, **options, &block); end
418
+ def map_values(values); end
419
+ def patterns; end
420
+ def slice(hash, keys); end
421
+ def split_values(values); end
422
+ def with_rest(values); end
423
+ end
424
+ class Mustermann::AST::Pattern < Mustermann::RegexpBased
425
+ def boundaries(*args, &block); end
426
+ def compile(**options); end
427
+ def compiler(*args, &block); end
428
+ def expand(behavior = nil, values = nil); end
429
+ def generate_templates(*args, &block); end
430
+ def map_param(key, value); end
431
+ def param_converters; end
432
+ def param_scanner(*args, &block); end
433
+ def parse(*args, &block); end
434
+ def parser(*args, &block); end
435
+ def scan_params(*args, &block); end
436
+ def self.boundaries; end
437
+ def self.compiler; end
438
+ def self.on(*args, &block); end
439
+ def self.param_scanner; end
440
+ def self.parser; end
441
+ def self.suffix(*args, &block); end
442
+ def self.template_generator; end
443
+ def self.transformer; end
444
+ def self.validation; end
445
+ def set_boundaries(*args, &block); end
446
+ def template_generator(*args, &block); end
447
+ def to_ast; end
448
+ def to_templates; end
449
+ def transform(*args, &block); end
450
+ def transformer(*args, &block); end
451
+ def validate(*args, &block); end
452
+ def validation(*args, &block); end
453
+ extend Forwardable
454
+ end
455
+ class Mustermann::Sinatra < Mustermann::AST::Pattern
456
+ def native_concat(other); end
457
+ def safe_string; end
458
+ def self.escape(string); end
459
+ def self.try_convert(input, **options); end
460
+ def |(other); end
461
+ include Mustermann::Concat::Native
462
+ end
463
+ class Mustermann::Sinatra::Parser < Mustermann::AST::Parser
464
+ end
465
+ class Mustermann::Sinatra::TryConvert::NodeTranslator < Mustermann::AST::Translator::NodeTranslator
466
+ def self.translator; end
467
+ end
468
+ class Mustermann::Sinatra::TryConvert < Mustermann::AST::Translator
469
+ def initialize(options); end
470
+ def new(input, escape = nil); end
471
+ def options; end
472
+ def self.convert(input, **options); end
473
+ def uri_decode; end
474
+ end
475
+ class Mustermann::Regular < Mustermann::RegexpBased
476
+ def check_anchors(scanner); end
477
+ def compile(**options); end
478
+ def extended_regexp?(string); end
479
+ def initialize(string, check_anchors: nil, **options); end
480
+ include Mustermann::Concat::Native
481
+ end