hoboken 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
  3. data/.github/ISSUE_TEMPLATE/code_change.md +11 -0
  4. data/.github/PULL_REQUEST_TEMPLATE.md +25 -0
  5. data/.gitignore +3 -0
  6. data/.rubocop.yml +13 -5
  7. data/.tool-versions +1 -0
  8. data/CHANGELOG.md +131 -0
  9. data/CODE_OF_CONDUCT.md +8 -0
  10. data/CONTRIBUTING.md +16 -0
  11. data/README.md +10 -14
  12. data/Rakefile +7 -16
  13. data/hoboken.gemspec +18 -8
  14. data/lib/hoboken/add_ons/active_record.rb +142 -0
  15. data/lib/hoboken/add_ons/airbrake.rb +64 -0
  16. data/lib/hoboken/add_ons/heroku.rb +5 -1
  17. data/lib/hoboken/add_ons/internationalization.rb +2 -2
  18. data/lib/hoboken/add_ons/metrics.rb +3 -2
  19. data/lib/hoboken/add_ons/omniauth.rb +9 -8
  20. data/lib/hoboken/add_ons/rubocop.rb +10 -4
  21. data/lib/hoboken/add_ons/sequel.rb +55 -29
  22. data/lib/hoboken/add_ons/sidekiq.rb +137 -0
  23. data/lib/hoboken/add_ons/turnip.rb +109 -0
  24. data/lib/hoboken/add_ons/twbs.rb +5 -35
  25. data/lib/hoboken/add_ons/vcr.rb +54 -0
  26. data/lib/hoboken/generate.rb +18 -10
  27. data/lib/hoboken/templates/Gemfile.erb.tt +13 -3
  28. data/lib/hoboken/templates/README.md.tt +18 -6
  29. data/lib/hoboken/templates/Rakefile.tt +11 -0
  30. data/lib/hoboken/templates/active_record.rake +11 -0
  31. data/lib/hoboken/templates/airbrake.rb.tt +13 -0
  32. data/lib/hoboken/templates/classic.rb.tt +6 -20
  33. data/lib/hoboken/templates/classic_environment.rb.tt +51 -0
  34. data/lib/hoboken/templates/config.ru.tt +2 -4
  35. data/lib/hoboken/templates/console +19 -0
  36. data/lib/hoboken/templates/example_worker.rb.tt +14 -0
  37. data/lib/hoboken/templates/metrics.rake.tt +3 -1
  38. data/lib/hoboken/templates/modular.rb.tt +8 -25
  39. data/lib/hoboken/templates/modular_environment.rb.tt +62 -0
  40. data/lib/hoboken/templates/rspec.rake.tt +7 -3
  41. data/lib/hoboken/templates/rubocop.yml.tt +23 -3
  42. data/lib/hoboken/templates/seeds.rb +12 -0
  43. data/lib/hoboken/templates/server +15 -0
  44. data/lib/hoboken/templates/setup +28 -0
  45. data/lib/hoboken/templates/sidekiq.rb.tt +21 -0
  46. data/lib/hoboken/templates/spec/app_spec.rb.tt +0 -2
  47. data/lib/hoboken/templates/spec/example_worker_spec.rb.tt +16 -0
  48. data/lib/hoboken/templates/spec/rack_matchers.rb.tt +8 -6
  49. data/lib/hoboken/templates/spec/spec_helper.rb.tt +2 -6
  50. data/lib/hoboken/templates/spec/turnip_helper.rb.tt +10 -0
  51. data/lib/hoboken/templates/styles.css.tt +1 -1
  52. data/lib/hoboken/templates/support/rack_test_assertions.rb.tt +5 -3
  53. data/lib/hoboken/templates/test/test_helper.rb.tt +2 -5
  54. data/lib/hoboken/templates/test/unit/example_worker_test.rb.tt +20 -0
  55. data/lib/hoboken/templates/vcr_setup.rb.tt +15 -0
  56. data/lib/hoboken/templates/views/index.erb.tt +1 -1
  57. data/lib/hoboken/templates/views/layout.erb.tt +3 -3
  58. data/lib/hoboken/version.rb +1 -1
  59. data/lib/hoboken.rb +54 -10
  60. data/test/integration/active_record_test.rb +66 -0
  61. data/test/integration/airbrake_test.rb +31 -0
  62. data/test/integration/generate_classic_test.rb +75 -0
  63. data/test/integration/generate_modular_test.rb +83 -0
  64. data/test/integration/github_action_test.rb +13 -0
  65. data/test/integration/heroku_test.rb +14 -0
  66. data/test/integration/internationalization_test.rb +26 -0
  67. data/test/integration/metrics_test.rb +54 -0
  68. data/test/integration/omniauth_test.rb +143 -0
  69. data/test/integration/rubocop_test.rb +39 -0
  70. data/test/integration/sequel_test.rb +64 -0
  71. data/test/integration/sidekiq_test.rb +105 -0
  72. data/test/integration/travis_test.rb +13 -0
  73. data/test/integration/turnip_test.rb +51 -0
  74. data/test/integration/twitter_bootstrap_test.rb +39 -0
  75. data/test/integration/vcr_test.rb +54 -0
  76. data/test/test_helper.rb +21 -10
  77. data/www/Gemfile +4 -0
  78. data/www/README.md +2 -0
  79. data/www/config.rb +11 -0
  80. data/www/source/documentation.html.erb +274 -0
  81. data/www/source/images/hoboken-running.png +0 -0
  82. data/www/source/images/hoboken.png +0 -0
  83. data/www/source/images/sinatra.png +0 -0
  84. data/www/source/index.html.erb +44 -0
  85. data/www/source/javascripts/all.js +1 -0
  86. data/www/source/layouts/layout.erb +38 -0
  87. data/www/source/stylesheets/all.css.scss +116 -0
  88. data/www/source/stylesheets/normalize.css +375 -0
  89. metadata +230 -44
  90. data/lib/hoboken/add_ons/sprockets.rb +0 -99
  91. data/lib/hoboken/templates/console.sh +0 -5
  92. data/lib/hoboken/templates/server.sh +0 -12
  93. data/lib/hoboken/templates/setup.sh +0 -7
  94. data/lib/hoboken/templates/sprockets.rake +0 -39
  95. data/lib/hoboken/templates/sprockets_chain.rb +0 -30
  96. data/lib/hoboken/templates/sprockets_helper.rb +0 -17
  97. data/test/integration/add_on_test.rb +0 -505
  98. data/test/integration/generate_test.rb +0 -203
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoboken
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Nadler
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-06 00:00:00.000000000 Z
11
+ date: 2022-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thor
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.1'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +58,14 @@ dependencies:
44
58
  requirements:
45
59
  - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '13.0'
61
+ version: '12.3'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '13.0'
68
+ version: '12.3'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rubocop
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +122,20 @@ dependencies:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
124
  version: '1.2'
125
+ - !ruby/object:Gem::Dependency
126
+ name: airbrake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '12.0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '12.0'
111
139
  - !ruby/object:Gem::Dependency
112
140
  name: better_errors
113
141
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +170,14 @@ dependencies:
142
170
  requirements:
143
171
  - - "~>"
144
172
  - !ruby/object:Gem::Version
145
- version: 5.0.0.beta3
173
+ version: 5.1.0
146
174
  type: :development
147
175
  prerelease: false
148
176
  version_requirements: !ruby/object:Gem::Requirement
149
177
  requirements:
150
178
  - - "~>"
151
179
  - !ruby/object:Gem::Version
152
- version: 5.0.0.beta3
180
+ version: 5.1.0
153
181
  - !ruby/object:Gem::Dependency
154
182
  name: contest
155
183
  requirement: !ruby/object:Gem::Requirement
@@ -192,6 +220,34 @@ dependencies:
192
220
  - - "~>"
193
221
  - !ruby/object:Gem::Version
194
222
  version: '1.10'
223
+ - !ruby/object:Gem::Dependency
224
+ name: flay
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - "~>"
228
+ - !ruby/object:Gem::Version
229
+ version: '2.12'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - "~>"
235
+ - !ruby/object:Gem::Version
236
+ version: '2.12'
237
+ - !ruby/object:Gem::Dependency
238
+ name: flog
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: '4.6'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: '4.6'
195
251
  - !ruby/object:Gem::Dependency
196
252
  name: omniauth-twitter
197
253
  requirement: !ruby/object:Gem::Requirement
@@ -263,61 +319,61 @@ dependencies:
263
319
  - !ruby/object:Gem::Version
264
320
  version: '1.1'
265
321
  - !ruby/object:Gem::Dependency
266
- name: rb-fsevent
322
+ name: rspec
267
323
  requirement: !ruby/object:Gem::Requirement
268
324
  requirements:
269
325
  - - "~>"
270
326
  - !ruby/object:Gem::Version
271
- version: '0.10'
327
+ version: '3.10'
272
328
  type: :development
273
329
  prerelease: false
274
330
  version_requirements: !ruby/object:Gem::Requirement
275
331
  requirements:
276
332
  - - "~>"
277
333
  - !ruby/object:Gem::Version
278
- version: '0.10'
334
+ version: '3.10'
279
335
  - !ruby/object:Gem::Dependency
280
- name: rerun
336
+ name: rubocop-performance
281
337
  requirement: !ruby/object:Gem::Requirement
282
338
  requirements:
283
339
  - - "~>"
284
340
  - !ruby/object:Gem::Version
285
- version: '0.13'
341
+ version: '1.13'
286
342
  type: :development
287
343
  prerelease: false
288
344
  version_requirements: !ruby/object:Gem::Requirement
289
345
  requirements:
290
346
  - - "~>"
291
347
  - !ruby/object:Gem::Version
292
- version: '0.13'
348
+ version: '1.13'
293
349
  - !ruby/object:Gem::Dependency
294
- name: rspec
350
+ name: rubocop-rspec
295
351
  requirement: !ruby/object:Gem::Requirement
296
352
  requirements:
297
353
  - - "~>"
298
354
  - !ruby/object:Gem::Version
299
- version: '3.10'
355
+ version: '2.2'
300
356
  type: :development
301
357
  prerelease: false
302
358
  version_requirements: !ruby/object:Gem::Requirement
303
359
  requirements:
304
360
  - - "~>"
305
361
  - !ruby/object:Gem::Version
306
- version: '3.10'
362
+ version: '2.2'
307
363
  - !ruby/object:Gem::Dependency
308
- name: rubocop-rspec
364
+ name: rubocop-sequel
309
365
  requirement: !ruby/object:Gem::Requirement
310
366
  requirements:
311
367
  - - "~>"
312
368
  - !ruby/object:Gem::Version
313
- version: '2.2'
369
+ version: '0.2'
314
370
  type: :development
315
371
  prerelease: false
316
372
  version_requirements: !ruby/object:Gem::Requirement
317
373
  requirements:
318
374
  - - "~>"
319
375
  - !ruby/object:Gem::Version
320
- version: '2.2'
376
+ version: '0.2'
321
377
  - !ruby/object:Gem::Dependency
322
378
  name: sassc
323
379
  requirement: !ruby/object:Gem::Requirement
@@ -346,6 +402,34 @@ dependencies:
346
402
  - - "~>"
347
403
  - !ruby/object:Gem::Version
348
404
  version: '5.43'
405
+ - !ruby/object:Gem::Dependency
406
+ name: sidekiq
407
+ requirement: !ruby/object:Gem::Requirement
408
+ requirements:
409
+ - - "~>"
410
+ - !ruby/object:Gem::Version
411
+ version: '6.2'
412
+ type: :development
413
+ prerelease: false
414
+ version_requirements: !ruby/object:Gem::Requirement
415
+ requirements:
416
+ - - "~>"
417
+ - !ruby/object:Gem::Version
418
+ version: '6.2'
419
+ - !ruby/object:Gem::Dependency
420
+ name: simplecov
421
+ requirement: !ruby/object:Gem::Requirement
422
+ requirements:
423
+ - - "~>"
424
+ - !ruby/object:Gem::Version
425
+ version: '0.21'
426
+ type: :development
427
+ prerelease: false
428
+ version_requirements: !ruby/object:Gem::Requirement
429
+ requirements:
430
+ - - "~>"
431
+ - !ruby/object:Gem::Version
432
+ version: '0.21'
349
433
  - !ruby/object:Gem::Dependency
350
434
  name: sinatra
351
435
  requirement: !ruby/object:Gem::Requirement
@@ -360,6 +444,34 @@ dependencies:
360
444
  - - "~>"
361
445
  - !ruby/object:Gem::Version
362
446
  version: '2.1'
447
+ - !ruby/object:Gem::Dependency
448
+ name: sinatra-activerecord
449
+ requirement: !ruby/object:Gem::Requirement
450
+ requirements:
451
+ - - "~>"
452
+ - !ruby/object:Gem::Version
453
+ version: '2.0'
454
+ type: :development
455
+ prerelease: false
456
+ version_requirements: !ruby/object:Gem::Requirement
457
+ requirements:
458
+ - - "~>"
459
+ - !ruby/object:Gem::Version
460
+ version: '2.0'
461
+ - !ruby/object:Gem::Dependency
462
+ name: sinatra-asset-pipeline
463
+ requirement: !ruby/object:Gem::Requirement
464
+ requirements:
465
+ - - "~>"
466
+ - !ruby/object:Gem::Version
467
+ version: '2.2'
468
+ type: :development
469
+ prerelease: false
470
+ version_requirements: !ruby/object:Gem::Requirement
471
+ requirements:
472
+ - - "~>"
473
+ - !ruby/object:Gem::Version
474
+ version: '2.2'
363
475
  - !ruby/object:Gem::Dependency
364
476
  name: sinatra-contrib
365
477
  requirement: !ruby/object:Gem::Requirement
@@ -389,19 +501,19 @@ dependencies:
389
501
  - !ruby/object:Gem::Version
390
502
  version: '0.3'
391
503
  - !ruby/object:Gem::Dependency
392
- name: sprockets
504
+ name: sinatra-r18n
393
505
  requirement: !ruby/object:Gem::Requirement
394
506
  requirements:
395
507
  - - "~>"
396
508
  - !ruby/object:Gem::Version
397
- version: '4.0'
509
+ version: '5.0'
398
510
  type: :development
399
511
  prerelease: false
400
512
  version_requirements: !ruby/object:Gem::Requirement
401
513
  requirements:
402
514
  - - "~>"
403
515
  - !ruby/object:Gem::Version
404
- version: '4.0'
516
+ version: '5.0'
405
517
  - !ruby/object:Gem::Dependency
406
518
  name: sqlite3
407
519
  requirement: !ruby/object:Gem::Requirement
@@ -416,6 +528,20 @@ dependencies:
416
528
  - - "~>"
417
529
  - !ruby/object:Gem::Version
418
530
  version: '1.4'
531
+ - !ruby/object:Gem::Dependency
532
+ name: turnip
533
+ requirement: !ruby/object:Gem::Requirement
534
+ requirements:
535
+ - - "~>"
536
+ - !ruby/object:Gem::Version
537
+ version: '4.3'
538
+ type: :development
539
+ prerelease: false
540
+ version_requirements: !ruby/object:Gem::Requirement
541
+ requirements:
542
+ - - "~>"
543
+ - !ruby/object:Gem::Version
544
+ version: '4.3'
419
545
  - !ruby/object:Gem::Dependency
420
546
  name: uglifier
421
547
  requirement: !ruby/object:Gem::Requirement
@@ -431,33 +557,33 @@ dependencies:
431
557
  - !ruby/object:Gem::Version
432
558
  version: '4.2'
433
559
  - !ruby/object:Gem::Dependency
434
- name: yui-compressor
560
+ name: vcr
435
561
  requirement: !ruby/object:Gem::Requirement
436
562
  requirements:
437
563
  - - "~>"
438
564
  - !ruby/object:Gem::Version
439
- version: '0.12'
565
+ version: '6.0'
440
566
  type: :development
441
567
  prerelease: false
442
568
  version_requirements: !ruby/object:Gem::Requirement
443
569
  requirements:
444
570
  - - "~>"
445
571
  - !ruby/object:Gem::Version
446
- version: '0.12'
572
+ version: '6.0'
447
573
  - !ruby/object:Gem::Dependency
448
- name: thor
574
+ name: webmock
449
575
  requirement: !ruby/object:Gem::Requirement
450
576
  requirements:
451
577
  - - "~>"
452
578
  - !ruby/object:Gem::Version
453
- version: '1.1'
454
- type: :runtime
579
+ version: '3.13'
580
+ type: :development
455
581
  prerelease: false
456
582
  version_requirements: !ruby/object:Gem::Requirement
457
583
  requirements:
458
584
  - - "~>"
459
585
  - !ruby/object:Gem::Version
460
- version: '1.1'
586
+ version: '3.13'
461
587
  description: Sinatra project generator.
462
588
  email:
463
589
  - bnadlerjr@gmail.com
@@ -466,11 +592,18 @@ executables:
466
592
  extensions: []
467
593
  extra_rdoc_files: []
468
594
  files:
595
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
596
+ - ".github/ISSUE_TEMPLATE/code_change.md"
597
+ - ".github/PULL_REQUEST_TEMPLATE.md"
469
598
  - ".github/dependabot.yml"
470
599
  - ".github/workflows/ruby.yml"
471
600
  - ".gitignore"
472
601
  - ".rubocop.yml"
473
602
  - ".ruby-version"
603
+ - ".tool-versions"
604
+ - CHANGELOG.md
605
+ - CODE_OF_CONDUCT.md
606
+ - CONTRIBUTING.md
474
607
  - Gemfile
475
608
  - IDEAS.md
476
609
  - LICENSE.txt
@@ -480,6 +613,8 @@ files:
480
613
  - hoboken.gemspec
481
614
  - lib/hoboken.rb
482
615
  - lib/hoboken/actions.rb
616
+ - lib/hoboken/add_ons/active_record.rb
617
+ - lib/hoboken/add_ons/airbrake.rb
483
618
  - lib/hoboken/add_ons/github_action.rb
484
619
  - lib/hoboken/add_ons/heroku.rb
485
620
  - lib/hoboken/add_ons/internationalization.rb
@@ -487,57 +622,94 @@ files:
487
622
  - lib/hoboken/add_ons/omniauth.rb
488
623
  - lib/hoboken/add_ons/rubocop.rb
489
624
  - lib/hoboken/add_ons/sequel.rb
490
- - lib/hoboken/add_ons/sprockets.rb
625
+ - lib/hoboken/add_ons/sidekiq.rb
491
626
  - lib/hoboken/add_ons/travis.rb
627
+ - lib/hoboken/add_ons/turnip.rb
492
628
  - lib/hoboken/add_ons/twbs.rb
629
+ - lib/hoboken/add_ons/vcr.rb
493
630
  - lib/hoboken/generate.rb
494
631
  - lib/hoboken/templates/Gemfile.erb.tt
495
632
  - lib/hoboken/templates/README.md.tt
496
633
  - lib/hoboken/templates/Rakefile.tt
634
+ - lib/hoboken/templates/active_record.rake
635
+ - lib/hoboken/templates/airbrake.rb.tt
497
636
  - lib/hoboken/templates/classic.rb.tt
637
+ - lib/hoboken/templates/classic_environment.rb.tt
498
638
  - lib/hoboken/templates/config.ru.tt
499
- - lib/hoboken/templates/console.sh
639
+ - lib/hoboken/templates/console
500
640
  - lib/hoboken/templates/db.rb.tt
501
641
  - lib/hoboken/templates/en.yml.tt
642
+ - lib/hoboken/templates/example_worker.rb.tt
502
643
  - lib/hoboken/templates/favicon.png
503
644
  - lib/hoboken/templates/github_action.tt
504
645
  - lib/hoboken/templates/gitignore
505
646
  - lib/hoboken/templates/hoboken.png
506
647
  - lib/hoboken/templates/metrics.rake.tt
507
648
  - lib/hoboken/templates/modular.rb.tt
649
+ - lib/hoboken/templates/modular_environment.rb.tt
508
650
  - lib/hoboken/templates/puma.rb.tt
509
651
  - lib/hoboken/templates/rspec.rake.tt
510
652
  - lib/hoboken/templates/rubocop.yml.tt
653
+ - lib/hoboken/templates/seeds.rb
511
654
  - lib/hoboken/templates/sequel.rake
512
- - lib/hoboken/templates/server.sh
513
- - lib/hoboken/templates/setup.sh
655
+ - lib/hoboken/templates/server
656
+ - lib/hoboken/templates/setup
657
+ - lib/hoboken/templates/sidekiq.rb.tt
514
658
  - lib/hoboken/templates/sinatra.png
515
659
  - lib/hoboken/templates/spec/app_spec.rb.tt
660
+ - lib/hoboken/templates/spec/example_worker_spec.rb.tt
516
661
  - lib/hoboken/templates/spec/rack_matchers.rb.tt
517
662
  - lib/hoboken/templates/spec/spec_helper.rb.tt
518
- - lib/hoboken/templates/sprockets.rake
519
- - lib/hoboken/templates/sprockets_chain.rb
520
- - lib/hoboken/templates/sprockets_helper.rb
663
+ - lib/hoboken/templates/spec/turnip_helper.rb.tt
521
664
  - lib/hoboken/templates/styles.css.tt
522
665
  - lib/hoboken/templates/support/rack_helpers.rb.tt
523
666
  - lib/hoboken/templates/support/rack_test_assertions.rb.tt
524
667
  - lib/hoboken/templates/test/test_helper.rb.tt
525
668
  - lib/hoboken/templates/test/unit/app_test.rb.tt
669
+ - lib/hoboken/templates/test/unit/example_worker_test.rb.tt
526
670
  - lib/hoboken/templates/test_unit.rake.tt
671
+ - lib/hoboken/templates/vcr_setup.rb.tt
527
672
  - lib/hoboken/templates/views/index.erb.tt
528
673
  - lib/hoboken/templates/views/layout.erb.tt
529
674
  - lib/hoboken/version.rb
530
675
  - test/fixtures/Gemfile
531
676
  - test/fixtures/Gemfile.pristine
532
- - test/integration/add_on_test.rb
533
- - test/integration/generate_test.rb
677
+ - test/integration/active_record_test.rb
678
+ - test/integration/airbrake_test.rb
679
+ - test/integration/generate_classic_test.rb
680
+ - test/integration/generate_modular_test.rb
681
+ - test/integration/github_action_test.rb
682
+ - test/integration/heroku_test.rb
683
+ - test/integration/internationalization_test.rb
684
+ - test/integration/metrics_test.rb
685
+ - test/integration/omniauth_test.rb
686
+ - test/integration/rubocop_test.rb
687
+ - test/integration/sequel_test.rb
688
+ - test/integration/sidekiq_test.rb
689
+ - test/integration/travis_test.rb
690
+ - test/integration/turnip_test.rb
691
+ - test/integration/twitter_bootstrap_test.rb
692
+ - test/integration/vcr_test.rb
534
693
  - test/test_helper.rb
535
694
  - test/unit/hoboken_actions_test.rb
695
+ - www/Gemfile
696
+ - www/README.md
697
+ - www/config.rb
698
+ - www/source/documentation.html.erb
699
+ - www/source/images/hoboken-running.png
700
+ - www/source/images/hoboken.png
701
+ - www/source/images/sinatra.png
702
+ - www/source/index.html.erb
703
+ - www/source/javascripts/all.js
704
+ - www/source/layouts/layout.erb
705
+ - www/source/stylesheets/all.css.scss
706
+ - www/source/stylesheets/normalize.css
536
707
  homepage: https://github.com/bnadlerjr/hoboken
537
708
  licenses:
538
709
  - MIT
539
- metadata: {}
540
- post_install_message:
710
+ metadata:
711
+ rubygems_mfa_required: 'true'
712
+ post_install_message:
541
713
  rdoc_options: []
542
714
  require_paths:
543
715
  - lib
@@ -552,14 +724,28 @@ required_rubygems_version: !ruby/object:Gem::Requirement
552
724
  - !ruby/object:Gem::Version
553
725
  version: '0'
554
726
  requirements: []
555
- rubygems_version: 3.1.6
556
- signing_key:
727
+ rubygems_version: 3.3.4
728
+ signing_key:
557
729
  specification_version: 4
558
730
  summary: Sinatra project generator.
559
731
  test_files:
560
732
  - test/fixtures/Gemfile
561
733
  - test/fixtures/Gemfile.pristine
562
- - test/integration/add_on_test.rb
563
- - test/integration/generate_test.rb
734
+ - test/integration/active_record_test.rb
735
+ - test/integration/airbrake_test.rb
736
+ - test/integration/generate_classic_test.rb
737
+ - test/integration/generate_modular_test.rb
738
+ - test/integration/github_action_test.rb
739
+ - test/integration/heroku_test.rb
740
+ - test/integration/internationalization_test.rb
741
+ - test/integration/metrics_test.rb
742
+ - test/integration/omniauth_test.rb
743
+ - test/integration/rubocop_test.rb
744
+ - test/integration/sequel_test.rb
745
+ - test/integration/sidekiq_test.rb
746
+ - test/integration/travis_test.rb
747
+ - test/integration/turnip_test.rb
748
+ - test/integration/twitter_bootstrap_test.rb
749
+ - test/integration/vcr_test.rb
564
750
  - test/test_helper.rb
565
751
  - test/unit/hoboken_actions_test.rb
@@ -1,99 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Hoboken
4
- module AddOns
5
- # Rack-based asset packaging system.
6
- #
7
- class Sprockets < ::Hoboken::Group
8
- def create_assets_folder
9
- empty_directory('assets')
10
- FileUtils.cp('public/css/styles.css', 'assets/styles.scss')
11
- FileUtils.cp('public/js/app.js', 'assets/app.js')
12
- end
13
-
14
- def add_gems
15
- gem 'sassc', version: '2.4', group: :assets
16
- gem 'sprockets', version: '4.0', group: :assets
17
- gem 'uglifier', version: '4.2', group: :assets
18
- gem 'yui-compressor', version: '0.12', group: :assets
19
- end
20
-
21
- def copy_sprockets_helpers
22
- copy_file('hoboken/templates/sprockets.rake', 'tasks/sprockets.rake')
23
- copy_file('hoboken/templates/sprockets_chain.rb', 'middleware/sprockets_chain.rb')
24
- copy_file('hoboken/templates/sprockets_helper.rb', 'helpers/sprockets.rb')
25
- end
26
-
27
- def update_app
28
- snippet = <<~CODE
29
- require File.expand_path('middleware/sprockets_chain', settings.root)
30
- use Middleware::SprocketsChain, %r{/assets} do |env|
31
- %w[assets vendor].each do |f|
32
- env.append_path File.expand_path("../\#{f}", __FILE__)
33
- end
34
- end
35
- CODE
36
-
37
- indentation = classic? ? 2 : 6
38
- insert_into_file('app.rb', after: /configure :development do\n/) do
39
- "#{indent(snippet, indentation)}\n"
40
- end
41
-
42
- insert_into_file('app.rb', after: /configure do\n/) do
43
- "#{indent("helpers Helpers::Sprockets\n", indentation)}\n"
44
- end
45
- end
46
-
47
- # rubocop:disable Metrics/MethodLength
48
- def adjust_link_tags
49
- insert_into_file('views/layout.erb', before: %r{</head>}) do
50
- <<HTML
51
- <%== stylesheet_tag :styles %>
52
- <%== javascript_tag :app %>
53
- HTML
54
- end
55
-
56
- gsub_file(
57
- 'views/layout.erb',
58
- %r{<link rel="stylesheet" type="text/css" href="css/styles.css">},
59
- ''
60
- )
61
-
62
- gsub_file(
63
- 'views/layout.erb',
64
- %r{<script type="text/javascript" src="js/app.js"></script>},
65
- ''
66
- )
67
- end
68
- # rubocop:enable Metrics/MethodLength
69
-
70
- # rubocop:disable Metrics/MethodLength
71
- def directions
72
- text = <<~TEXT
73
- #{' '}
74
- Run `bundle install` to get the sprockets gem and its
75
- dependencies.
76
- #{' '}
77
- Running the server in development mode will serve css
78
- and js files from /assets. In order to serve assets in
79
- production, you must run `rake assets:precompile`. Read
80
- the important note below before running this rake task.
81
- TEXT
82
-
83
- important = <<~TEXT
84
- #{' '}
85
- Important Note:
86
- Any css or js files from the /public folder have been copied
87
- to /assets, the original files remain intact in /public, but
88
- will be replaced the first time you run `rake assets:precompile`.
89
- You may want to backup those files if they are not under source
90
- control before running the Rake command.
91
- TEXT
92
-
93
- say text
94
- say important, :red
95
- end
96
- # rubocop:enable Metrics/MethodLength
97
- end
98
- end
99
- end
@@ -1,5 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- bundle exec racksh
@@ -1,12 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- if gem list foreman -i
6
- then
7
- echo 'Foreman detected... starting server with Procfile'
8
- rerun --background foreman start
9
- else
10
- echo 'Foreman not installed... starting server with rackup'
11
- rerun --background rackup
12
- fi
@@ -1,7 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- bundle install
6
-
7
- # Do any other automated setup that you need to do here
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # rubocop:disable Metrics/BlockLength
4
- namespace :assets do
5
- require 'sprockets'
6
- require 'uglifier'
7
- require 'yui/compressor'
8
- sprockets = Sprockets::Environment.new { |env| env.logger = Logger.new($stdout) }
9
- sprockets.css_compressor = YUI::CssCompressor.new
10
- sprockets.js_compressor = Uglifier.new(harmony: true)
11
-
12
- %w[assets vendor].each do |f|
13
- sprockets.append_path File.expand_path("../../#{f}", __FILE__)
14
- end
15
-
16
- output_path = File.expand_path('../public', __dir__)
17
-
18
- desc 'Pre-compile CSS assets'
19
- task :precompile_css do
20
- asset = sprockets['styles.css']
21
- outfile = Pathname.new(output_path).join('css/styles.css')
22
- FileUtils.mkdir_p outfile.dirname
23
- asset.write_to(outfile)
24
- puts 'successfully compiled css assets'
25
- end
26
-
27
- desc 'Pre-compile JavaScript assets'
28
- task :precompile_js do
29
- asset = sprockets['app.js']
30
- outfile = Pathname.new(output_path).join('js/app.js')
31
- FileUtils.mkdir_p outfile.dirname
32
- asset.write_to(outfile)
33
- puts 'successfully compiled javascript assets'
34
- end
35
-
36
- desc 'precompile all assets'
37
- task precompile: %i[precompile_css precompile_js]
38
- end
39
- # rubocop:enable Metrics/BlockLength