rails_app_generator 0.2.2 → 0.2.5
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 +4 -4
- data/CHANGELOG.md +22 -0
- data/after_templates/addons/dotenv/_.rb +21 -0
- data/after_templates/addons/dotenv/app/controllers/home_controller.rb +7 -0
- data/after_templates/addons/dotenv/app/views/home/index.html.erb +10 -0
- data/after_templates/addons/dotenv/app/views/layouts/application.html.erb +19 -0
- data/after_templates/addons/lograge/_.rb +22 -0
- data/after_templates/addons/lograge/app/controllers/home_controller.rb +9 -0
- data/after_templates/addons/lograge/app/views/home/index.html.erb +11 -0
- data/after_templates/addons/lograge/app/views/layouts/application.html.erb +21 -0
- data/after_templates/addons/public_suffix/_.rb +23 -0
- data/after_templates/addons/public_suffix/app/controllers/home_controller.rb +7 -0
- data/after_templates/addons/public_suffix/app/views/home/index.html.erb +29 -0
- data/after_templates/addons/public_suffix/app/views/layouts/application.html.erb +23 -0
- data/after_templates/addons/rubocop/_.rb +29 -0
- data/after_templates/addons/rubocop/app/assets/images/cop-output.png +0 -0
- data/after_templates/addons/rubocop/app/controllers/home_controller.rb +21 -0
- data/after_templates/addons/rubocop/app/views/home/index.html.erb +46 -0
- data/after_templates/addons/rubocop/app/views/layouts/application.html.erb +19 -0
- data/after_templates/application/printspeak/_.rb +21 -27
- data/after_templates/application/printspeak/app/assets/stylesheets/application.bootstrap.scss +1 -1
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/_global.scss +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/_variables.scss +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/components/_buttons.scss +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/components/_navbar.scss +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/sections/_contact.scss +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/sections/_footer.scss +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/sections/_masthead.scss +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/page/sections/_pagehead.scss +52 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/sections/_portfolio.scss +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/sections/_team.scss +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/sections/_timeline.scss +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/styles.scss +1 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/variables/_colors.scss +0 -0
- data/after_templates/application/printspeak/app/assets/stylesheets/{home → page}/variables/_typography.scss +0 -0
- data/after_templates/application/printspeak/app/controllers/application_controller.rb +41 -0
- data/after_templates/application/printspeak/app/controllers/home_controller.rb +3 -3
- data/after_templates/application/printspeak/app/controllers/page_controller.rb +13 -0
- data/after_templates/application/printspeak/app/views/home/_body_end.html.erb +45 -0
- data/after_templates/application/printspeak/app/views/home/_modal.erb +23 -0
- data/after_templates/application/printspeak/app/views/home/_navbar.html.erb +14 -0
- data/after_templates/application/printspeak/app/views/home/index.html.erb +234 -283
- data/after_templates/application/printspeak/app/views/layouts/_body_end.html.erb +0 -0
- data/after_templates/application/printspeak/app/views/layouts/_footer.html.erb +2 -2
- data/after_templates/application/printspeak/app/views/layouts/_head.html.erb +0 -0
- data/after_templates/application/printspeak/app/views/layouts/application.html.erb +3 -3
- data/after_templates/application/printspeak/app/views/page/_navbar.html.erb +9 -0
- data/after_templates/application/printspeak/app/views/page/benefits.html.erb +28 -0
- data/after_templates/application/printspeak/app/views/page/privacy.html.erb +12 -0
- data/after_templates/application/printspeak/app/views/page/terms.html.erb +12 -0
- data/docs/last_run/app_generator_class.json +32 -0
- data/docs/last_run/app_generator_data.json +7 -4
- data/docs/last_run/rails_options_class.json +32 -0
- data/docs/last_run/rails_options_data.json +8 -4
- data/lib/rails_app_generator/addons/continuous_integration.rb +1 -0
- data/lib/rails_app_generator/addons/devise.rb +1 -0
- data/lib/rails_app_generator/addons/docker.rb +1 -0
- data/lib/rails_app_generator/addons/docker_compose.rb +1 -0
- data/lib/rails_app_generator/addons/dotenv.rb +2 -0
- data/lib/rails_app_generator/addons/factory_bot.rb +1 -0
- data/lib/rails_app_generator/addons/foreman.rb +1 -0
- data/lib/rails_app_generator/addons/generators.rb +1 -0
- data/lib/rails_app_generator/addons/lograge.rb +3 -1
- data/lib/rails_app_generator/addons/public_suffix.rb +33 -0
- data/lib/rails_app_generator/addons/rubocop.rb +4 -0
- data/lib/rails_app_generator/app_generator.rb +10 -2
- data/lib/rails_app_generator/rag_initializer.rb +15 -15
- data/lib/rails_app_generator/version.rb +1 -1
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/profiles/{default/printspeak.json → addons/dotenv.json} +4 -4
- data/profiles/addons/lograge.json +12 -0
- data/profiles/addons/public_suffix.json +12 -0
- data/profiles/addons/rubocop.json +12 -0
- data/profiles/application/printspeak.json +6 -4
- data/templates/addons/lograge/config/initializers/lograge.rb +9 -1
- data/templates/addons/rubocop/.rubocop.yml.erb +5 -2
- data/templates/thor_task/addon/addon.tt +1 -1
- data/templates/thor_task/profile/after_template.rb +17 -8
- metadata +49 -23
- data/after_templates/application/printspeak/app/views/layouts/_alerts.html.erb +0 -2
- data/after_templates/application/printspeak/app/views/page/_footer.html.erb +0 -184
- data/after_templates/application/printspeak/app/views/page/architecture.html.erb +0 -33
- data/after_templates/application/printspeak/app/views/page/blog.html.erb +0 -44
- data/after_templates/application/printspeak/app/views/page/page_controller.rb +0 -27
- data/after_templates/application/printspeak/app/views/page/readme.html.erb +0 -49
- data/profiles/printspeak.json +0 -12
@@ -15,15 +15,15 @@
|
|
15
15
|
<%- else -%>
|
16
16
|
<%%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
17
17
|
<%- end -%>
|
18
|
+
<%%= render head_partial if head_partial %>
|
18
19
|
</head>
|
19
20
|
|
20
21
|
<body id="page-top">
|
21
|
-
<%%= render
|
22
|
+
<%%= render navbar_partial if navbar_partial %>
|
22
23
|
<main>
|
23
|
-
<%%= render 'layouts/alerts' %>
|
24
24
|
<%%= yield %>
|
25
25
|
</main>
|
26
|
-
<%%= render
|
26
|
+
<%%= render footer_partial if footer_partial %>
|
27
27
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
|
28
28
|
</body>
|
29
29
|
</html>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<nav class="navbar navbar-expand-lg navbar-dark fixed-top" id="mainNav">
|
2
|
+
<div class="container"><a class="navbar-brand" href="#page-top"><%= image_tag "printspeak-logo.svg", alt: "..." %></a><button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">Menu<i class="fas fa-bars ms-1"></i></button>
|
3
|
+
<div class="collapse navbar-collapse" id="navbarResponsive">
|
4
|
+
<ul class="navbar-nav text-uppercase ms-auto py-4 py-lg-0">
|
5
|
+
<li class="nav-item"><%= link_to 'Home', root_path, class: "nav-link" %></li>
|
6
|
+
</ul>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
</nav>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<header class="pagehead">
|
2
|
+
<div class="pagehead-subheading">Benefits</div>
|
3
|
+
</header>
|
4
|
+
|
5
|
+
<section class="page-section">
|
6
|
+
<div class="container">
|
7
|
+
<div class="text-center">
|
8
|
+
<h2 class="section-heading text-uppercase">More Leads/More Sales</h2>
|
9
|
+
<h3 class="section-subheading text-muted">Easy to say, and thanks to Print Speak, it’s becoming easier to do.</h3>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
|
13
|
+
<div class="row text-center">
|
14
|
+
<div class="col-md-4"><span class="fa-stack fa-4x"><i class="fas fa-circle fa-stack-2x text-primary"></i><i class="fas fa-shopping-cart fa-stack-1x fa-inverse"></i></span>
|
15
|
+
<h4 class="my-3">Its in the Details</h4>
|
16
|
+
<p class="text-muted">Ensuring smaller tasks that are often left behind get done, like estimate follow-ups and order acknowledgements, is the key to small but constant improvements</p>
|
17
|
+
</div>
|
18
|
+
<div class="col-md-4"><span class="fa-stack fa-4x"><i class="fas fa-circle fa-stack-2x text-primary"></i><i class="fas fa-laptop fa-stack-1x fa-inverse"></i></span>
|
19
|
+
<h4 class="my-3">One Percenters</h4>
|
20
|
+
<p class="text-muted">These “one-percenters” make a big difference to overall performance, which is why Print Speak subscribers benefit from the streamlined processes and convenient tools that allow them to outperform those that go it alone.</p>
|
21
|
+
</div>
|
22
|
+
<div class="col-md-4"><span class="fa-stack fa-4x"><i class="fas fa-circle fa-stack-2x text-primary"></i><i class="fas fa-lock fa-stack-1x fa-inverse"></i></span>
|
23
|
+
<h4 class="my-3">Conversion</h4>
|
24
|
+
<p class="text-muted">Remember, every little bit counts towards better conversion rates. You can count on Print Speak to help with the little things that matter most, converting opportunities into sales.</p>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</section>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<header class="pagehead">
|
2
|
+
<div class="pagehead-subheading">Privacy</div>
|
3
|
+
</header>
|
4
|
+
|
5
|
+
<section class="page-section">
|
6
|
+
<div class="container">
|
7
|
+
<div class="text-center">
|
8
|
+
<h2 class="section-heading text-uppercase">Blah</h2>
|
9
|
+
<h3 class="section-subheading text-muted">Blah Blah</h3>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</section>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<header class="pagehead">
|
2
|
+
<div class="pagehead-subheading">Terms and Conditions</div>
|
3
|
+
</header>
|
4
|
+
|
5
|
+
<section class="page-section">
|
6
|
+
<div class="container">
|
7
|
+
<div class="text-center">
|
8
|
+
<h2 class="section-heading text-uppercase">Blah</h2>
|
9
|
+
<h3 class="section-subheading text-muted">Blah Blah</h3>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
</section>
|
@@ -41,7 +41,10 @@
|
|
41
41
|
"note",
|
42
42
|
"test",
|
43
43
|
"add_devise",
|
44
|
+
"add_dotenv",
|
45
|
+
"add_rubocop",
|
44
46
|
"add_annotate",
|
47
|
+
"add_lograge",
|
45
48
|
"add_acts_as_list",
|
46
49
|
"add_browser",
|
47
50
|
"add_chartkick",
|
@@ -51,6 +54,7 @@
|
|
51
54
|
"add_httparty",
|
52
55
|
"add_honeybadger",
|
53
56
|
"add_mini_magick",
|
57
|
+
"add_public_suffix",
|
54
58
|
"add_rails_html_sanitizer",
|
55
59
|
"add_twilio_ruby"
|
56
60
|
],
|
@@ -342,6 +346,20 @@
|
|
342
346
|
"default": false,
|
343
347
|
"required": false
|
344
348
|
},
|
349
|
+
{
|
350
|
+
"name": "add_dotenv",
|
351
|
+
"description": "Indicates when to generate add dotenv",
|
352
|
+
"type": "boolean",
|
353
|
+
"default": false,
|
354
|
+
"required": false
|
355
|
+
},
|
356
|
+
{
|
357
|
+
"name": "add_rubocop",
|
358
|
+
"description": "Indicates when to generate add rubocop",
|
359
|
+
"type": "boolean",
|
360
|
+
"default": false,
|
361
|
+
"required": false
|
362
|
+
},
|
345
363
|
{
|
346
364
|
"name": "add_annotate",
|
347
365
|
"description": "Indicates when to generate add annotate",
|
@@ -349,6 +367,13 @@
|
|
349
367
|
"default": false,
|
350
368
|
"required": false
|
351
369
|
},
|
370
|
+
{
|
371
|
+
"name": "add_lograge",
|
372
|
+
"description": "Indicates when to generate add lograge",
|
373
|
+
"type": "boolean",
|
374
|
+
"default": false,
|
375
|
+
"required": false
|
376
|
+
},
|
352
377
|
{
|
353
378
|
"name": "add_acts_as_list",
|
354
379
|
"description": "Indicates when to generate add acts as list",
|
@@ -412,6 +437,13 @@
|
|
412
437
|
"default": false,
|
413
438
|
"required": false
|
414
439
|
},
|
440
|
+
{
|
441
|
+
"name": "add_public_suffix",
|
442
|
+
"description": "Indicates when to generate add public suffix",
|
443
|
+
"type": "boolean",
|
444
|
+
"default": false,
|
445
|
+
"required": false
|
446
|
+
},
|
415
447
|
{
|
416
448
|
"name": "add_rails_html_sanitizer",
|
417
449
|
"description": "Indicates when to generate add rails html sanitizer",
|
@@ -4,7 +4,7 @@
|
|
4
4
|
"skip_collision_check": false,
|
5
5
|
"ruby": "/Users/davidcruwys/.asdf/installs/ruby/2.7.6/bin/ruby",
|
6
6
|
"database": "sqlite3",
|
7
|
-
"skip_git":
|
7
|
+
"skip_git": true,
|
8
8
|
"skip_keeps": false,
|
9
9
|
"skip_action_mailer": false,
|
10
10
|
"skip_action_mailbox": false,
|
@@ -31,7 +31,10 @@
|
|
31
31
|
"note": "",
|
32
32
|
"test": "rspec",
|
33
33
|
"add_devise": false,
|
34
|
-
"
|
34
|
+
"add_dotenv": false,
|
35
|
+
"add_rubocop": false,
|
36
|
+
"add_annotate": false,
|
37
|
+
"add_lograge": false,
|
35
38
|
"add_acts_as_list": false,
|
36
39
|
"add_browser": false,
|
37
40
|
"add_chartkick": false,
|
@@ -41,9 +44,9 @@
|
|
41
44
|
"add_httparty": false,
|
42
45
|
"add_honeybadger": false,
|
43
46
|
"add_mini_magick": false,
|
47
|
+
"add_public_suffix": true,
|
44
48
|
"add_rails_html_sanitizer": false,
|
45
49
|
"add_twilio_ruby": false,
|
46
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
47
|
-
"css": "bootstrap"
|
50
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/public_suffix/_.rb"
|
48
51
|
}
|
49
52
|
}
|
@@ -41,7 +41,10 @@
|
|
41
41
|
"note",
|
42
42
|
"test",
|
43
43
|
"add_devise",
|
44
|
+
"add_dotenv",
|
45
|
+
"add_rubocop",
|
44
46
|
"add_annotate",
|
47
|
+
"add_lograge",
|
45
48
|
"add_acts_as_list",
|
46
49
|
"add_browser",
|
47
50
|
"add_chartkick",
|
@@ -51,6 +54,7 @@
|
|
51
54
|
"add_httparty",
|
52
55
|
"add_honeybadger",
|
53
56
|
"add_mini_magick",
|
57
|
+
"add_public_suffix",
|
54
58
|
"add_rails_html_sanitizer",
|
55
59
|
"add_twilio_ruby"
|
56
60
|
],
|
@@ -342,6 +346,20 @@
|
|
342
346
|
"default": false,
|
343
347
|
"required": false
|
344
348
|
},
|
349
|
+
{
|
350
|
+
"name": "add_dotenv",
|
351
|
+
"description": "",
|
352
|
+
"type": "boolean",
|
353
|
+
"default": false,
|
354
|
+
"required": false
|
355
|
+
},
|
356
|
+
{
|
357
|
+
"name": "add_rubocop",
|
358
|
+
"description": "",
|
359
|
+
"type": "boolean",
|
360
|
+
"default": false,
|
361
|
+
"required": false
|
362
|
+
},
|
345
363
|
{
|
346
364
|
"name": "add_annotate",
|
347
365
|
"description": "",
|
@@ -349,6 +367,13 @@
|
|
349
367
|
"default": false,
|
350
368
|
"required": false
|
351
369
|
},
|
370
|
+
{
|
371
|
+
"name": "add_lograge",
|
372
|
+
"description": "",
|
373
|
+
"type": "boolean",
|
374
|
+
"default": false,
|
375
|
+
"required": false
|
376
|
+
},
|
352
377
|
{
|
353
378
|
"name": "add_acts_as_list",
|
354
379
|
"description": "",
|
@@ -412,6 +437,13 @@
|
|
412
437
|
"default": false,
|
413
438
|
"required": false
|
414
439
|
},
|
440
|
+
{
|
441
|
+
"name": "add_public_suffix",
|
442
|
+
"description": "",
|
443
|
+
"type": "boolean",
|
444
|
+
"default": false,
|
445
|
+
"required": false
|
446
|
+
},
|
415
447
|
{
|
416
448
|
"name": "add_rails_html_sanitizer",
|
417
449
|
"description": "",
|
@@ -7,9 +7,9 @@
|
|
7
7
|
"quiet": false,
|
8
8
|
"skip": false,
|
9
9
|
"ruby": "/Users/davidcruwys/.asdf/installs/ruby/2.7.6/bin/ruby",
|
10
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
10
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/public_suffix/_.rb",
|
11
11
|
"database": "sqlite3",
|
12
|
-
"skip_git":
|
12
|
+
"skip_git": true,
|
13
13
|
"skip_keeps": false,
|
14
14
|
"skip_action_mailer": false,
|
15
15
|
"skip_action_mailbox": false,
|
@@ -36,12 +36,15 @@
|
|
36
36
|
"api": false,
|
37
37
|
"minimal": false,
|
38
38
|
"javascript": "importmap",
|
39
|
-
"css": "
|
39
|
+
"css": "",
|
40
40
|
"skip_bundle": false,
|
41
41
|
"note": "",
|
42
42
|
"test": "rspec",
|
43
43
|
"add_devise": false,
|
44
|
-
"
|
44
|
+
"add_dotenv": false,
|
45
|
+
"add_rubocop": false,
|
46
|
+
"add_annotate": false,
|
47
|
+
"add_lograge": false,
|
45
48
|
"add_acts_as_list": false,
|
46
49
|
"add_browser": false,
|
47
50
|
"add_chartkick": false,
|
@@ -51,6 +54,7 @@
|
|
51
54
|
"add_httparty": false,
|
52
55
|
"add_honeybadger": false,
|
53
56
|
"add_mini_magick": false,
|
57
|
+
"add_public_suffix": true,
|
54
58
|
"add_rails_html_sanitizer": false,
|
55
59
|
"add_twilio_ruby": false
|
56
60
|
}
|
@@ -5,6 +5,7 @@ module RailsAppGenerator
|
|
5
5
|
module AddOns
|
6
6
|
# Add GitHub Actions continuous integration
|
7
7
|
class ContinuousIntegration < RailsAppGenerator::Addon
|
8
|
+
# Requires Testing
|
8
9
|
def apply
|
9
10
|
say 'continuous integration - Setup GitHub Actions'
|
10
11
|
template('github/workflows/build.yml.erb', '.github/workflows/build.yml')
|
@@ -9,6 +9,7 @@ module RailsAppGenerator
|
|
9
9
|
|
10
10
|
required_gem gem.version('devise', '4.8.1', 'Flexible authentication solution for Rails with Warden')
|
11
11
|
|
12
|
+
# Requires Testing
|
12
13
|
def apply
|
13
14
|
generate('devise:install', capture: true)
|
14
15
|
generate(:devise, 'User', 'name', 'admin:boolean', capture: true)
|
@@ -5,6 +5,8 @@ module RailsAppGenerator
|
|
5
5
|
module AddOns
|
6
6
|
# Add DotEnv to rails application
|
7
7
|
class Dotenv < RailsAppGenerator::Addon
|
8
|
+
required_gem gem.version('dotenv-rails', '2.8.1', 'Loads environment variables from `.env`.')
|
9
|
+
|
8
10
|
def apply
|
9
11
|
template '.env.development.erb', '.env.development'
|
10
12
|
end
|
@@ -5,6 +5,7 @@ module RailsAppGenerator
|
|
5
5
|
module AddOns
|
6
6
|
# Add Foreman process management for applications with multiple components
|
7
7
|
class Foreman < RailsAppGenerator::Addon
|
8
|
+
# Requires Testing
|
8
9
|
def apply
|
9
10
|
template '.foreman.erb', '.foreman'
|
10
11
|
template 'Procfile.erb', 'Procfile'
|
@@ -5,6 +5,7 @@ module RailsAppGenerator
|
|
5
5
|
module AddOns
|
6
6
|
# Add Rails Generator configuration to rails application
|
7
7
|
class Generators < RailsAppGenerator::Addon
|
8
|
+
# Requires Testing (NOT SURE IF THIS IS A GOOD APPROACH, need to look at other generator systems)
|
8
9
|
def apply
|
9
10
|
directory('lib/generators/rails/navigation', 'lib/generators/rails/navigation') if uses?(:views)
|
10
11
|
|
@@ -3,8 +3,10 @@
|
|
3
3
|
module RailsAppGenerator
|
4
4
|
# Custom add-ons for RailsAppGenerator
|
5
5
|
module AddOns
|
6
|
-
# Add
|
6
|
+
# Add Lograge to rails application
|
7
7
|
class Lograge < RailsAppGenerator::Addon
|
8
|
+
required_gem gem.version('lograge', '0.12.0', 'Tame Rails multi-line logging into a single line per request')
|
9
|
+
|
8
10
|
def apply
|
9
11
|
template 'config/initializers/lograge.rb'
|
10
12
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# lib/rails_app_generator/rag_initializer.rb
|
4
|
+
# rag.add_option :add_public_suffix , type: :boolean, default: false
|
5
|
+
|
6
|
+
module RailsAppGenerator
|
7
|
+
# Custom add-ons for RailsAppGenerator
|
8
|
+
module AddOns
|
9
|
+
# Add PublicSuffix to rails application
|
10
|
+
class PublicSuffix < RailsAppGenerator::Addon
|
11
|
+
required_gem gem.version('public_suffix', '5.0.0', 'PublicSuffix can parse and decompose a domain name into top level domain, domain and subdomains.')
|
12
|
+
|
13
|
+
def apply
|
14
|
+
say 'Setting up PublicSuffix'
|
15
|
+
# template('public_suffix_template.rb', 'target/public_suffix.rb', force: true)
|
16
|
+
# template('app/javascript/stylesheets/components.scss')
|
17
|
+
# create_file('target/public_suffix.rb', 'put your content here')
|
18
|
+
# directory 'app/template', 'app/target', force: true
|
19
|
+
# empty_directory 'app/target'
|
20
|
+
# inject_into_file('app/application.js', "some content")
|
21
|
+
# rails_command('tailwindcss:install')
|
22
|
+
end
|
23
|
+
|
24
|
+
def before_bundle
|
25
|
+
say 'Setting up PublicSuffix - before bundle install'
|
26
|
+
end
|
27
|
+
|
28
|
+
def after_bundle
|
29
|
+
say 'Setting up PublicSuffix - after bundle install'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -5,6 +5,10 @@ module RailsAppGenerator
|
|
5
5
|
module AddOns
|
6
6
|
# Add Rubocop to rails application
|
7
7
|
class Rubocop < RailsAppGenerator::Addon
|
8
|
+
# required_gem gem.version('rubocop', '1.34.0', 'RuboCop is a Ruby code style checking and code formatting tool.')
|
9
|
+
# TODO: This needs to go into the development group
|
10
|
+
required_gem gem.version('rubocop-rails', '2.15.2', 'NOTE: MOVE TO DEVELOPMENT GROUP: RuboCop linter with focused on enforcing Rails best practices and coding conventions.')
|
11
|
+
|
8
12
|
def apply
|
9
13
|
template '.rubocop.yml.erb', '.rubocop.yml'
|
10
14
|
end
|
@@ -110,7 +110,6 @@ module RailsAppGenerator
|
|
110
110
|
# # invoke :copy_miscellaneous_files
|
111
111
|
# # invoke :setup_database
|
112
112
|
# # invoke :create_github_repo
|
113
|
-
# # binding.pry
|
114
113
|
# # invoke :generate_default
|
115
114
|
# # invoke :create_heroku_apps
|
116
115
|
# # invoke :generate_deployment_default
|
@@ -121,7 +120,6 @@ module RailsAppGenerator
|
|
121
120
|
|
122
121
|
# def xxx_generate_default
|
123
122
|
# puts 'xxx_generate_default'
|
124
|
-
# # binding.pry
|
125
123
|
# # run("spring stop > /dev/null 2>&1 || true")
|
126
124
|
# generate("rails_app_generator:foo")
|
127
125
|
# # generate("suspenders:runner")
|
@@ -245,6 +243,10 @@ module RailsAppGenerator
|
|
245
243
|
generate(:migration, name, *args)
|
246
244
|
end
|
247
245
|
|
246
|
+
def rubocop
|
247
|
+
run('rubocop -A --config .rubocop.yml')
|
248
|
+
end
|
249
|
+
|
248
250
|
def db_migrate
|
249
251
|
rails_command('db:migrate')
|
250
252
|
end
|
@@ -257,6 +259,12 @@ module RailsAppGenerator
|
|
257
259
|
generate(:stimulus, name, *args)
|
258
260
|
end
|
259
261
|
|
262
|
+
def bundle_install
|
263
|
+
Bundler.with_unbundled_env do
|
264
|
+
run('bundle install')
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
260
268
|
def bundle_add(name)
|
261
269
|
run("bundle add #{name}")
|
262
270
|
end
|
@@ -31,7 +31,6 @@ KConfig.configure do |config|
|
|
31
31
|
# # paper_trail 10.3.1 12.3.0 ~> 10.3 default
|
32
32
|
# # pg 0.21.0 1.4.2 ~> 0.20 default
|
33
33
|
# # pg_search 2.3.0 2.3.6 ~> 2.0 default
|
34
|
-
# # pry 0.13.1 0.14.1
|
35
34
|
# # public_suffix 2.0.5 5.0.0 ~> 2.0 default
|
36
35
|
# # pusher 1.4.3 2.0.2 ~> 1.3 default
|
37
36
|
# # rack-mini-profiler 0.10.7 3.0.0 ~> 0.10 default
|
@@ -203,15 +202,15 @@ KConfig.configure do |config|
|
|
203
202
|
# rag.add_option :add_irbrc , type: :boolean, default: false
|
204
203
|
# rag.add_option :add_foreman , type: :boolean, default: false
|
205
204
|
rag.add_option :add_devise , type: :boolean, default: false
|
206
|
-
|
205
|
+
rag.add_option :add_dotenv , type: :boolean, default: false
|
207
206
|
# rag.add_option :add_docker , type: :boolean, default: false
|
208
207
|
# rag.add_option :add_docker_compose , type: :boolean, default: false
|
209
|
-
|
208
|
+
rag.add_option :add_rubocop , type: :boolean, default: false
|
210
209
|
rag.add_option :add_annotate , type: :boolean, default: false
|
211
210
|
# rag.add_option :add_continuous_integration , type: :boolean, default: false
|
212
211
|
# rag.add_option :add_high_voltage , type: :boolean, default: false
|
213
212
|
# rag.add_option :add_generators , type: :boolean, default: false
|
214
|
-
|
213
|
+
rag.add_option :add_lograge , type: :boolean, default: false
|
215
214
|
# rag.add_option :add_pundit , type: :boolean, default: false
|
216
215
|
# rag.add_option :add_services , type: :boolean, default: false
|
217
216
|
# rag.add_option :add_sidekiq , type: :boolean, default: false
|
@@ -222,17 +221,18 @@ KConfig.configure do |config|
|
|
222
221
|
# rag.add_option :add_shoulda , type: :boolean, default: false
|
223
222
|
|
224
223
|
# NEW GEM ADDONS
|
225
|
-
rag.add_option :add_acts_as_list
|
226
|
-
rag.add_option :add_browser
|
227
|
-
rag.add_option :add_chartkick
|
228
|
-
rag.add_option :add_faker
|
229
|
-
rag.add_option :add_groupdate
|
230
|
-
rag.add_option :add_hexapdf
|
231
|
-
rag.add_option :add_httparty
|
232
|
-
rag.add_option :add_honeybadger
|
233
|
-
rag.add_option :add_mini_magick
|
234
|
-
rag.add_option :
|
235
|
-
rag.add_option :
|
224
|
+
rag.add_option :add_acts_as_list , type: :boolean, default: false
|
225
|
+
rag.add_option :add_browser , type: :boolean, default: false
|
226
|
+
rag.add_option :add_chartkick , type: :boolean, default: false
|
227
|
+
rag.add_option :add_faker , type: :boolean, default: false
|
228
|
+
rag.add_option :add_groupdate , type: :boolean, default: false
|
229
|
+
rag.add_option :add_hexapdf , type: :boolean, default: false
|
230
|
+
rag.add_option :add_httparty , type: :boolean, default: false
|
231
|
+
rag.add_option :add_honeybadger , type: :boolean, default: false
|
232
|
+
rag.add_option :add_mini_magick , type: :boolean, default: false , description: 'Add Mini Magick gem'
|
233
|
+
rag.add_option :add_public_suffix , type: :boolean, default: false
|
234
|
+
rag.add_option :add_rails_html_sanitizer , type: :boolean, default: false
|
235
|
+
rag.add_option :add_twilio_ruby , type: :boolean, default: false
|
236
236
|
end
|
237
237
|
|
238
238
|
# Make sure that RailsOptions reflect the options available from Railties
|
data/package-lock.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "rails_app_generator",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.5",
|
4
4
|
"lockfileVersion": 2,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "rails_app_generator",
|
9
|
-
"version": "0.2.
|
9
|
+
"version": "0.2.5",
|
10
10
|
"dependencies": {
|
11
11
|
"daisyui": "^2.20.0"
|
12
12
|
},
|
data/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"args": {
|
3
|
-
"app_path": "
|
4
|
-
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/
|
3
|
+
"app_path": "dotenv",
|
4
|
+
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
|
5
5
|
},
|
6
6
|
"opts": {
|
7
7
|
"skip_git": true,
|
8
8
|
"skip_test": true,
|
9
|
-
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/
|
10
|
-
"
|
9
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/dotenv/_.rb",
|
10
|
+
"add_dotenv": true
|
11
11
|
}
|
12
12
|
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"args": {
|
3
|
+
"app_path": "lograge",
|
4
|
+
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
|
5
|
+
},
|
6
|
+
"opts": {
|
7
|
+
"skip_git": true,
|
8
|
+
"skip_test": true,
|
9
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/lograge/_.rb",
|
10
|
+
"add_lograge": true
|
11
|
+
}
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"args": {
|
3
|
+
"app_path": "public_suffix",
|
4
|
+
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
|
5
|
+
},
|
6
|
+
"opts": {
|
7
|
+
"skip_git": true,
|
8
|
+
"skip_test": true,
|
9
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/public_suffix/_.rb",
|
10
|
+
"add_public_suffix": true
|
11
|
+
}
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"args": {
|
3
|
+
"app_path": "rubocop",
|
4
|
+
"destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
|
5
|
+
},
|
6
|
+
"opts": {
|
7
|
+
"skip_git": true,
|
8
|
+
"skip_test": true,
|
9
|
+
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/rubocop/_.rb",
|
10
|
+
"add_rubocop": true
|
11
|
+
}
|
12
|
+
}
|
@@ -1,12 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"args": {
|
3
|
-
"app_path": "
|
4
|
-
"destination_root": "/Users/davidcruwys/dev/
|
3
|
+
"app_path": "p7",
|
4
|
+
"destination_root": "/Users/davidcruwys/dev/printspeak"
|
5
5
|
},
|
6
6
|
"opts": {
|
7
|
-
"skip_git": true,
|
8
7
|
"skip_test": true,
|
9
8
|
"template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/application/printspeak/_.rb",
|
10
|
-
"
|
9
|
+
"css": "bootstrap",
|
10
|
+
"add_annotate": true,
|
11
|
+
"add_dotenv": true,
|
12
|
+
"add_rubocop": true
|
11
13
|
}
|
12
14
|
}
|
@@ -2,4 +2,12 @@
|
|
2
2
|
|
3
3
|
Rails.application.configure do
|
4
4
|
config.lograge.enabled = true
|
5
|
-
|
5
|
+
|
6
|
+
# config.lograge.keep_original_rails_log = true
|
7
|
+
|
8
|
+
# config.lograge.custom_options = lambda do |event|
|
9
|
+
# { time1: Time.now, time2: event.time }
|
10
|
+
# end
|
11
|
+
|
12
|
+
# config.lograge.logger = ActiveSupport::Logger.new "#{Rails.root}/log/lograge_#{Rails.env}.log"
|
13
|
+
end
|