rsg 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +44 -3
- data/Gemfile.lock +5 -4
- data/README.md +13 -6
- data/exe/rsg +1 -1
- data/lib/rsg/generators/actions.rb +39 -5
- data/lib/rsg/generators/app/app_builder.rb +23 -36
- data/lib/rsg/generators/app/app_generator.rb +62 -67
- data/lib/rsg/generators/base.rb +2 -0
- data/lib/rsg/generators/dotenv/install_generator.rb +14 -20
- data/lib/rsg/generators/logging/common_generator.rb +17 -23
- data/lib/rsg/generators/logging/lograge_generator.rb +14 -24
- data/lib/rsg/generators/logging/templates/{initializer_lograge.rb → initializer_lograge.rb.tt} +0 -0
- data/lib/rsg/generators/misc/misc_generator.rb +47 -38
- data/lib/rsg/generators/misc/templates/{puma.rb → puma.rb.tt} +0 -0
- data/lib/rsg/generators/orm/active_record_generator.rb +38 -32
- data/lib/rsg/generators/orm/templates/{db.rake → db.rake.tt} +0 -0
- data/lib/rsg/generators/orm/templates/{samples.rb → samples.rb.tt} +0 -0
- data/lib/rsg/generators/orm/templates/{seeds.rb → seeds.rb.tt} +0 -0
- data/lib/rsg/generators/testing/rspec_generator.rb +19 -25
- data/lib/rsg/generators/webpacker/bootstrap_generator.rb +27 -0
- data/lib/rsg/generators/webpacker/install_generator.rb +37 -47
- data/lib/rsg/generators/webpacker/templates/bootstrap/application.sass +40 -0
- data/lib/rsg/generators/webpacker/templates/bootstrap/landing.html.erb +18 -0
- data/lib/rsg/generators/webpacker/templates/bootstrap/layout.html.erb +35 -0
- data/lib/rsg/generators/webpacker/templates/landing_controller.rb.erb +1 -1
- data/lib/rsg/version.rb +1 -1
- data/lib/rsg.rb +6 -15
- data/rsg.gemspec +4 -0
- data/templates/rsg-bootstrap.rb +7 -0
- data/templates/rsg-default.rb +10 -3
- metadata +26 -12
- data/lib/rsg/generators/gemfile/cleanup_generator.rb +0 -28
- data/lib/rsg/generators/install/install_generator.rb +0 -13
- data/lib/rsg/generators/orm/templates/active_record/mysql.yml +0 -59
- data/lib/rsg/generators/orm/templates/active_record/postgresql.yml +0 -86
- data/lib/rsg/generators/orm/templates/active_record/sqlite3.yml +0 -25
@@ -1,20 +1,34 @@
|
|
1
|
-
|
1
|
+
class Rsg::Generators::Misc::MiscGenerator < Rsg::Generators::Base
|
2
|
+
def banner
|
3
|
+
say "Making some extra tweaks"
|
4
|
+
end
|
5
|
+
|
6
|
+
def remove_assets
|
7
|
+
run "rm -rf app/assets"
|
8
|
+
end
|
9
|
+
|
10
|
+
def remove_gemfile_comments
|
11
|
+
gsub_file "Gemfile", /^ *#\s*[^#\n]+\n/, ""
|
12
|
+
end
|
13
|
+
|
14
|
+
def remove_tzinfo_gem
|
15
|
+
# Remove tzinfo-data since we don't have a need for it in dev / prod env, if
|
16
|
+
# rsg becomes a thing on the platforms it's needed we can revisit
|
17
|
+
gsub_file "Gemfile", /\ngem 'tzinfo-data'[^\n]+\n/, ""
|
18
|
+
end
|
2
19
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
def self.source_root
|
7
|
-
Pathname.new(__FILE__).dirname.join("templates").expand_path
|
8
|
-
end
|
20
|
+
def remove_gemfile_extra_whitespace
|
21
|
+
gsub_file "Gemfile", /^( *gem[^\n]+)\n\n\n/, "\\1\n\n"
|
22
|
+
end
|
9
23
|
|
10
|
-
|
11
|
-
|
12
|
-
|
24
|
+
def isolate_rails_gem
|
25
|
+
gsub_file "Gemfile", /^( *)(gem ["']rails["'][^\n]+)\n(?: *)(gem ['"]puma['"][^\n]+)\n$/, "\\1\\2\n\n\\3"
|
26
|
+
end
|
13
27
|
|
14
|
-
|
15
|
-
|
28
|
+
def disable_assets_generators
|
29
|
+
return if api_mode?
|
16
30
|
|
17
|
-
|
31
|
+
inject_into_file "config/application.rb", <<-CODE, before: /^\s*# Don't generate system test files./
|
18
32
|
|
19
33
|
# Don't generate CSS files when using scaffolding commands, since we compile assets through webpacker
|
20
34
|
config.generators.assets = false
|
@@ -24,38 +38,33 @@ module Rsg
|
|
24
38
|
# Most of time we can get away with a handful of methods in the default application_helper. Other ones
|
25
39
|
# can be introduced as needed
|
26
40
|
config.generators.helper = false
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
def configure_pry
|
31
|
-
append_gem "pry-rails", within_group: :development
|
32
|
-
end
|
41
|
+
CODE
|
42
|
+
end
|
33
43
|
|
34
|
-
|
35
|
-
|
36
|
-
|
44
|
+
def configure_pry
|
45
|
+
append_gem "pry-rails", within_group: :development
|
46
|
+
end
|
37
47
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
48
|
+
# TODO: Skip puma on app generator, introduce a new Puma::InstallGenerator
|
49
|
+
def puma_configs
|
50
|
+
copy_file "puma.rb", "config/puma.rb", force: true
|
51
|
+
end
|
42
52
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
53
|
+
# TODO: Move to an i18n generator that does this and more
|
54
|
+
def configure_environments
|
55
|
+
# If by any chance we make use of translations, let them fail and get
|
56
|
+
# caught early on the dev process
|
57
|
+
uncomment_lines "config/environments/development.rb", /raise_on_missing_translations/
|
58
|
+
uncomment_lines "config/environments/test.rb", /raise_on_missing_translations/
|
59
|
+
end
|
50
60
|
|
51
|
-
|
52
|
-
|
61
|
+
# TODO: Move to rsg-dox
|
62
|
+
def healthcheck
|
63
|
+
inject_into_file "config/routes.rb", <<-CODE, before: "end"
|
53
64
|
|
54
65
|
# Defines a static healthcheck for probes. Please note that this won't
|
55
66
|
# output any logs in production
|
56
67
|
get :healthcheck, to: proc { [200, {}, ['OK']] }
|
57
|
-
|
58
|
-
end
|
59
|
-
end
|
68
|
+
CODE
|
60
69
|
end
|
61
70
|
end
|
File without changes
|
@@ -1,44 +1,50 @@
|
|
1
|
-
|
1
|
+
class Rsg::Generators::Orm::ActiveRecordGenerator < Rsg::Generators::Base
|
2
|
+
include Rails::Generators::Database
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
include Rails::Generators::Database
|
4
|
+
SUPPORTED_DBS = %w(sqlite3 mysql postgres)
|
5
|
+
class_option :database, type: :string, default: nil, desc: "Configure for selected database (options: #{SUPPORTED_DBS.join("/")})"
|
6
|
+
class_option :auto_migrate, type: :boolean, default: nil, desc: "Automatically run rake db:migrate"
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
def self.source_root
|
12
|
-
Pathname.new(__FILE__).dirname.join("templates").expand_path
|
13
|
-
end
|
8
|
+
def self.source_root
|
9
|
+
Pathname.new(__FILE__).dirname.join("templates").expand_path
|
10
|
+
end
|
14
11
|
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
def self.source_paths
|
13
|
+
@__source_paths ||= [
|
14
|
+
Rails::Generators::AppGenerator.source_root,
|
15
|
+
Pathname.new(__FILE__).dirname.join("templates").expand_path
|
16
|
+
]
|
17
|
+
end
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
def banner
|
20
|
+
say "Configuring active record"
|
21
|
+
end
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
def enable_active_record
|
24
|
+
enable_railtie "active_record"
|
25
|
+
end
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
def configure_driver
|
28
|
+
database ||= options.fetch(:database) { ask("Which database you'd like to use?", limited_to: SUPPORTED_DBS, default: "sqlite3") }
|
29
|
+
# From the core rails template
|
30
|
+
template "config/databases/#{database}.yml", "config/database.yml"
|
30
31
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
copy_file "samples.rb", "db/samples.rb"
|
35
|
-
end
|
32
|
+
name, version = gem_for_database(database)
|
33
|
+
append_gem name, version: version
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
36
|
+
def write_db_sample
|
37
|
+
copy_file "db.rake", "lib/tasks/db.rake"
|
38
|
+
copy_file "seeds.rb", "db/seeds.rb"
|
39
|
+
copy_file "samples.rb", "db/samples.rb"
|
40
|
+
end
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
+
def migrate
|
43
|
+
if options.key?(:auto_migrate)
|
44
|
+
rake "db:create db:migrate" if options[:auto_migrate]
|
45
|
+
return
|
42
46
|
end
|
47
|
+
|
48
|
+
rake "db:create db:migrate" unless no?("Would you like to create the database schema?")
|
43
49
|
end
|
44
50
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,33 +1,27 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
class RspecGenerator < Generators::Base
|
6
|
-
def banner
|
7
|
-
say "Configuring rspec"
|
8
|
-
end
|
1
|
+
class Rsg::Generators::Testing::RspecGenerator < Rsg::Generators::Base
|
2
|
+
def banner
|
3
|
+
say "Configuring rspec"
|
4
|
+
end
|
9
5
|
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
def add_rspec
|
7
|
+
append_gem "rspec-rails", within_group: [:development, :test]
|
8
|
+
end
|
13
9
|
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
def gitignore
|
11
|
+
append_file ".gitignore", "\n# Ignore rspec state\n/spec/examples.txt\n"
|
12
|
+
end
|
17
13
|
|
18
|
-
|
19
|
-
|
20
|
-
|
14
|
+
def install
|
15
|
+
generate("rspec:install")
|
16
|
+
end
|
21
17
|
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
def enable_recommendations
|
19
|
+
gsub_file "spec/spec_helper.rb", /^# The settings below[^=]+=begin\n(.+)\n=end/m, '\1'
|
20
|
+
end
|
25
21
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
end
|
30
|
-
end
|
22
|
+
def no_ci_focus
|
23
|
+
gsub_file "spec/spec_helper.rb", /^ config\.filter_run_when_matching :focus$/ do
|
24
|
+
" if ENV.key?(\"CI\")\n config.filter_run_when_matching :focus\n end"
|
31
25
|
end
|
32
26
|
end
|
33
27
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class Rsg::Generators::Webpacker::BootstrapGenerator < Rsg::Generators::Base
|
2
|
+
def sanity_check
|
3
|
+
raise "Can't configure bootstrap on API apps" if api_mode?
|
4
|
+
end
|
5
|
+
|
6
|
+
def banner
|
7
|
+
say("Configuring Bootstrap")
|
8
|
+
end
|
9
|
+
|
10
|
+
def add_bootstrap
|
11
|
+
return say("Bootstrap already installed, skipping") if File.read("yarn.lock") =~ /^bootstrap[^:]+:/
|
12
|
+
run "yarn add bootstrap bootstrap-icons"
|
13
|
+
end
|
14
|
+
|
15
|
+
def application_sass
|
16
|
+
copy_file "bootstrap/application.sass", "app/javascript/stylesheets/application.sass"
|
17
|
+
end
|
18
|
+
|
19
|
+
def htmls
|
20
|
+
# TODO: These will ask to confirm for an overwrite, should we just force?
|
21
|
+
template "bootstrap/layout.html.erb", "app/views/layouts/application.html.erb"
|
22
|
+
template "bootstrap/landing.html.erb", "app/views/landing/show.html.erb"
|
23
|
+
# template "bootstrap/about.html.erb", "app/views/landing/about.html.erb"
|
24
|
+
# template "bootstrap/contact.html.erb", "app/views/landing/contact.html.erb"
|
25
|
+
# template "bootstrap/login.html.erb", "app/views/landing/login.html.erb"
|
26
|
+
end
|
27
|
+
end
|
@@ -1,51 +1,41 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
"stylesheet_link_tag",
|
38
|
-
"stylesheet_pack_tag"
|
39
|
-
end
|
40
|
-
|
41
|
-
def configure_landing
|
42
|
-
template "landing_controller.rb.erb", "app/controllers/landing_controller.rb"
|
43
|
-
copy_file "landing_show.html.erb", "app/views/landing/show.html.erb"
|
44
|
-
inject_into_file "config/routes.rb", <<-CODE, before: "end"
|
1
|
+
class Rsg::Generators::Webpacker::InstallGenerator < Rsg::Generators::Base
|
2
|
+
def sanity_check
|
3
|
+
raise "Can't configure webpacker on API apps" if api_mode?
|
4
|
+
end
|
5
|
+
|
6
|
+
def banner
|
7
|
+
say("Configuring webpacker")
|
8
|
+
end
|
9
|
+
|
10
|
+
def add_webpacker
|
11
|
+
append_gem("webpacker", version: "~> 5.0")
|
12
|
+
end
|
13
|
+
|
14
|
+
def install_webpacker
|
15
|
+
rake("webpacker:install")
|
16
|
+
end
|
17
|
+
|
18
|
+
def configure_js
|
19
|
+
copy_file "application.js", "app/javascript/packs/application.js", force: true
|
20
|
+
|
21
|
+
inject_into_file "app/views/layouts/application.html.erb",
|
22
|
+
" <%= javascript_pack_tag 'application' %>\n ",
|
23
|
+
before: /<\/body>/
|
24
|
+
end
|
25
|
+
|
26
|
+
def configure_sass
|
27
|
+
copy_file "application.sass", "app/javascript/stylesheets/application.sass"
|
28
|
+
gsub_file "app/views/layouts/application.html.erb",
|
29
|
+
"stylesheet_link_tag",
|
30
|
+
"stylesheet_pack_tag"
|
31
|
+
end
|
32
|
+
|
33
|
+
def configure_landing
|
34
|
+
template "landing_controller.rb.erb", "app/controllers/landing_controller.rb"
|
35
|
+
copy_file "landing_show.html.erb", "app/views/landing/show.html.erb"
|
36
|
+
inject_into_file "config/routes.rb", <<-CODE, before: "end"
|
45
37
|
|
46
38
|
root 'landing#show'
|
47
|
-
|
48
|
-
end
|
49
|
-
end
|
39
|
+
CODE
|
50
40
|
end
|
51
41
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.css.
|
2
|
+
|
3
|
+
@import "bootstrap"
|
4
|
+
|
5
|
+
$bootstrap-icons-font-src: url("~bootstrap-icons/font/fonts/bootstrap-icons.woff2") format("woff2"), url("~bootstrap-icons/font/fonts/bootstrap-icons.woff") format("woff")
|
6
|
+
@import "bootstrap-icons/font/bootstrap-icons.scss"
|
7
|
+
|
8
|
+
.bd-placeholder-img
|
9
|
+
font-size: 1.125rem
|
10
|
+
text-anchor: middle
|
11
|
+
-webkit-user-select: none
|
12
|
+
-moz-user-select: none
|
13
|
+
user-select: none
|
14
|
+
|
15
|
+
@media (min-width: 768px)
|
16
|
+
.bd-placeholder-img-lg
|
17
|
+
font-size: 3.5rem
|
18
|
+
|
19
|
+
.nav
|
20
|
+
.nav-link
|
21
|
+
padding: .25rem 0
|
22
|
+
font-weight: 700
|
23
|
+
color: rgba(255, 255, 255, .5)
|
24
|
+
background-color: transparent
|
25
|
+
border-bottom: .25rem solid transparent
|
26
|
+
|
27
|
+
.nav-link:hover,
|
28
|
+
.nav-link:focus
|
29
|
+
border-bottom-color: rgba(255, 255, 255, .25)
|
30
|
+
|
31
|
+
.nav-link + .nav-link
|
32
|
+
margin-left: 1rem
|
33
|
+
|
34
|
+
.active
|
35
|
+
color: #fff
|
36
|
+
border-bottom-color: #fff
|
37
|
+
|
38
|
+
.landing-show
|
39
|
+
@extend .bg-dark
|
40
|
+
@extend .text-white
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<%%# https://getbootstrap.com/docs/5.1/examples/cover/ %>
|
2
|
+
<main class="px-3 text-center">
|
3
|
+
<h1>
|
4
|
+
<i class="bi-gem"></i>
|
5
|
+
Welcome to <%= app_name.humanize %>!
|
6
|
+
<i class="bi-gem"></i>
|
7
|
+
</h1>
|
8
|
+
<p class="lead">
|
9
|
+
TODO: Some "lorem ipsum", show Rails and RSG versions
|
10
|
+
</p>
|
11
|
+
<p class="lead">
|
12
|
+
<a href="#" class="btn btn-lg btn-success fw-bold">
|
13
|
+
<i class="bi-currency-dollar"></i>
|
14
|
+
Call to action
|
15
|
+
<i class="bi-currency-dollar"></i>
|
16
|
+
</a>
|
17
|
+
</p>
|
18
|
+
</main>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html class="h-100">
|
3
|
+
<head>
|
4
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<%%= csrf_meta_tags %>
|
7
|
+
<%%= csp_meta_tag %>
|
8
|
+
<title><%= app_name.humanize %></title>
|
9
|
+
<%%= stylesheet_pack_tag 'application', media: 'all' %>
|
10
|
+
</head>
|
11
|
+
|
12
|
+
<body class="d-flex flex-column mx-auto h-100 w-100 bg-light <%%= controller_name.dasherize %>-<%%= action_name.dasherize %>">
|
13
|
+
<div class="bg-dark w-100 mb-auto">
|
14
|
+
<header class="container d-flex justify-content-between py-2">
|
15
|
+
<h3 class=" text-white"><%= app_name.humanize %></h3>
|
16
|
+
<nav class="nav justify-content-center ">
|
17
|
+
<a class="nav-link active" aria-current="page" href="#">Home</a>
|
18
|
+
<a class="nav-link" href="#">Features</a>
|
19
|
+
<a class="nav-link" href="#">Contact</a>
|
20
|
+
</nav>
|
21
|
+
</header>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="container px-0 pt-3">
|
25
|
+
<%%= yield %>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<div class="bg-dark mt-auto py-3 text-center">
|
29
|
+
<footer class="container text-white-50">
|
30
|
+
© <%%= Date.today.year %> <%= app_name.humanize %>, inc.
|
31
|
+
</footer>
|
32
|
+
</div>
|
33
|
+
<%%= javascript_pack_tag 'application' %>
|
34
|
+
</body>
|
35
|
+
</html>
|
data/lib/rsg/version.rb
CHANGED
data/lib/rsg.rb
CHANGED
@@ -1,19 +1,7 @@
|
|
1
|
-
|
1
|
+
require "zeitwerk"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
require_relative "rsg/generators/base"
|
6
|
-
|
7
|
-
require_relative "rsg/generators/app/app_generator"
|
8
|
-
require_relative "rsg/generators/dotenv/install_generator"
|
9
|
-
require_relative "rsg/generators/gemfile/cleanup_generator"
|
10
|
-
require_relative "rsg/generators/install/install_generator"
|
11
|
-
require_relative "rsg/generators/logging/common_generator"
|
12
|
-
require_relative "rsg/generators/logging/lograge_generator"
|
13
|
-
require_relative "rsg/generators/misc/misc_generator"
|
14
|
-
require_relative "rsg/generators/orm/active_record_generator"
|
15
|
-
require_relative "rsg/generators/testing/rspec_generator"
|
16
|
-
require_relative "rsg/generators/webpacker/install_generator"
|
3
|
+
loader = Zeitwerk::Loader.for_gem
|
4
|
+
loader.setup
|
17
5
|
|
18
6
|
module Rsg
|
19
7
|
def self.app_templates_sources
|
@@ -34,3 +22,6 @@ module Rsg
|
|
34
22
|
return nil
|
35
23
|
end
|
36
24
|
end
|
25
|
+
|
26
|
+
# Required, or the classes for the generators won't be defined
|
27
|
+
loader.eager_load
|
data/rsg.gemspec
CHANGED
@@ -25,4 +25,8 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
|
27
27
|
spec.add_dependency "rails", Rsg::RAILS_VERSION
|
28
|
+
|
29
|
+
# Rails already adds zeitwerk as a dependency but since we rely on it for
|
30
|
+
# autoloading constants we belive it is good to call it out
|
31
|
+
spec.add_dependency "zeitwerk"
|
28
32
|
end
|
data/templates/rsg-default.rb
CHANGED
@@ -6,12 +6,19 @@ git_add_commit "Rails app generated with rsg v#{Rsg::VERSION}, api_mode=#{option
|
|
6
6
|
say("Adding rsg gem to application")
|
7
7
|
rsg_install
|
8
8
|
|
9
|
-
rsg_generate "rsg:gemfile:cleanup"
|
10
9
|
rsg_generate "rsg:misc:misc"
|
11
10
|
rsg_generate "rsg:logging:common"
|
12
11
|
rsg_generate "rsg:dotenv:install"
|
13
|
-
|
14
|
-
|
12
|
+
|
13
|
+
rsg_skip_or_confirm(:active_record, "Do you want to configure active_record?") do
|
14
|
+
rsg_generate "rsg:orm:active_record", rsg_options[:active_record]
|
15
|
+
end
|
16
|
+
|
17
|
+
if !options[:api]
|
18
|
+
rsg_skip_or_confirm(:webpacker, "Do you want to configure webpacker?") do
|
19
|
+
rsg_generate "rsg:webpacker:install"
|
20
|
+
end
|
21
|
+
end
|
15
22
|
|
16
23
|
rsg_generate "rsg:logging:lograge"
|
17
24
|
rsg_generate "rsg:testing:rspec"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Doximity Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 6.1.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: zeitwerk
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description:
|
28
42
|
email:
|
29
43
|
- engineering@doximity.com
|
@@ -54,30 +68,30 @@ files:
|
|
54
68
|
- lib/rsg/generators/dotenv/install_generator.rb
|
55
69
|
- lib/rsg/generators/dotenv/templates/env.development
|
56
70
|
- lib/rsg/generators/dotenv/templates/env.test
|
57
|
-
- lib/rsg/generators/gemfile/cleanup_generator.rb
|
58
|
-
- lib/rsg/generators/install/install_generator.rb
|
59
71
|
- lib/rsg/generators/logging/common_generator.rb
|
60
72
|
- lib/rsg/generators/logging/lograge_generator.rb
|
61
|
-
- lib/rsg/generators/logging/templates/initializer_lograge.rb
|
73
|
+
- lib/rsg/generators/logging/templates/initializer_lograge.rb.tt
|
62
74
|
- lib/rsg/generators/misc/misc_generator.rb
|
63
|
-
- lib/rsg/generators/misc/templates/puma.rb
|
75
|
+
- lib/rsg/generators/misc/templates/puma.rb.tt
|
64
76
|
- lib/rsg/generators/options.rb
|
65
77
|
- lib/rsg/generators/orm/active_record_generator.rb
|
66
|
-
- lib/rsg/generators/orm/templates/
|
67
|
-
- lib/rsg/generators/orm/templates/
|
68
|
-
- lib/rsg/generators/orm/templates/
|
69
|
-
- lib/rsg/generators/orm/templates/db.rake
|
70
|
-
- lib/rsg/generators/orm/templates/samples.rb
|
71
|
-
- lib/rsg/generators/orm/templates/seeds.rb
|
78
|
+
- lib/rsg/generators/orm/templates/db.rake.tt
|
79
|
+
- lib/rsg/generators/orm/templates/samples.rb.tt
|
80
|
+
- lib/rsg/generators/orm/templates/seeds.rb.tt
|
72
81
|
- lib/rsg/generators/testing/rspec_generator.rb
|
82
|
+
- lib/rsg/generators/webpacker/bootstrap_generator.rb
|
73
83
|
- lib/rsg/generators/webpacker/install_generator.rb
|
74
84
|
- lib/rsg/generators/webpacker/templates/application.js
|
75
85
|
- lib/rsg/generators/webpacker/templates/application.sass
|
86
|
+
- lib/rsg/generators/webpacker/templates/bootstrap/application.sass
|
87
|
+
- lib/rsg/generators/webpacker/templates/bootstrap/landing.html.erb
|
88
|
+
- lib/rsg/generators/webpacker/templates/bootstrap/layout.html.erb
|
76
89
|
- lib/rsg/generators/webpacker/templates/landing_controller.rb.erb
|
77
90
|
- lib/rsg/generators/webpacker/templates/landing_show.html.erb
|
78
91
|
- lib/rsg/version.rb
|
79
92
|
- rsg.gemspec
|
80
93
|
- templates/README.md
|
94
|
+
- templates/rsg-bootstrap.rb
|
81
95
|
- templates/rsg-default.rb
|
82
96
|
homepage: https://github.com/doximity/rsg
|
83
97
|
licenses:
|