rails_app 0.1.0 → 0.3.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.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -3
  3. data/README.md +19 -3
  4. data/lib/rails_app/cli.rb +9 -1
  5. data/lib/rails_app/command.rb +4 -2
  6. data/lib/rails_app/template/app_sass/assets/stylesheets/application.sass.scss +2 -0
  7. data/lib/rails_app/template/app_sass/assets/stylesheets/custom.sass.scss +49 -0
  8. data/lib/rails_app/template/app_sass/views/devise/confirmations/new.html.erb +16 -0
  9. data/lib/rails_app/template/app_sass/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  10. data/lib/rails_app/template/app_sass/views/devise/mailer/email_changed.html.erb +7 -0
  11. data/lib/rails_app/template/app_sass/views/devise/mailer/password_change.html.erb +3 -0
  12. data/lib/rails_app/template/app_sass/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  13. data/lib/rails_app/template/app_sass/views/devise/mailer/unlock_instructions.html.erb +7 -0
  14. data/lib/rails_app/template/app_sass/views/devise/passwords/edit.html.erb +25 -0
  15. data/lib/rails_app/template/app_sass/views/devise/passwords/new.html.erb +16 -0
  16. data/lib/rails_app/template/app_sass/views/devise/registrations/edit.html.erb +43 -0
  17. data/lib/rails_app/template/app_sass/views/devise/registrations/new.html.erb +29 -0
  18. data/lib/rails_app/template/app_sass/views/devise/sessions/new.html.erb +26 -0
  19. data/lib/rails_app/template/app_sass/views/devise/shared/_error_messages.html.erb +15 -0
  20. data/lib/rails_app/template/app_sass/views/devise/shared/_links.html.erb +25 -0
  21. data/lib/rails_app/template/app_sass/views/devise/unlocks/new.html.erb +16 -0
  22. data/lib/rails_app/template/app_sass/views/layouts/application.html.erb +19 -0
  23. data/lib/rails_app/template/app_sass/views/layouts/mailer.html.erb +13 -0
  24. data/lib/rails_app/template/app_sass/views/layouts/mailer.text.erb +1 -0
  25. data/lib/rails_app/template/app_sass/views/shared/_navbar.html.erb +11 -0
  26. data/lib/rails_app/template/app_sass/views/static/home.html.erb +2 -0
  27. data/lib/rails_app/template/template.rb +14 -5
  28. data/lib/rails_app/version.rb +1 -1
  29. data/rails_app.gemspec +2 -2
  30. data/screenshot_cli.png +0 -0
  31. metadata +27 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36c17f77988b58a87e4316db69ccc49e857183fc86fbb6bd29b0cbec3f9074a4
4
- data.tar.gz: 6a13aa68f3ad243da3578e59177eaa3c320147bddd3623b404820bd32e3f0d26
3
+ metadata.gz: abe9ca28918f70a2b71b19040764b860567c4ea7a58fc020dad211a80e10cfb7
4
+ data.tar.gz: '0283ec9fae9b1c6438830c486c3eadcbd090f7c74ba78fe965e930bc08c3453e'
5
5
  SHA512:
6
- metadata.gz: '051813c1c44650894418ad7c8486ccf001f977a27dbf8b0aafb55d55a4b393046cd5b9446c94e8cb2d786b139215811c316e98ce9abd61f50bdafe85c76f8900'
7
- data.tar.gz: d94d2918acbd20eae15a8ca93be081283d622a7db3e36efef52964489368ee31d68598048d526ce487e6b0d47a906ca2ffd9785210c48f8625a0b3eeeaaf9cf9
6
+ metadata.gz: 70d9bb94900977be4b5b8d79589f44c93d97e916a6914ebec7b91792bb810a08fb4fe3fdaade63298b39b2fd751910993750da751cb00b6c444097d8bfb99a31
7
+ data.tar.gz: 93c4942b640be06a3bd09bd85af99b101b95eeff4f9ad389a03f1d2643da8e539f15afd6d527da59372eedd65aac60494f98e3f234d7a7d79eec012ec9365e77
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
- ## [Unreleased]
1
+ # Changelog
2
2
 
3
- ## [0.1.0] - 2024-04-01
3
+ ## [0.3.0](https://github.com/eclectic-coding/rails_app/tree/0.3.0) (2024-04-03)
4
4
 
5
- - Initial release
5
+ [Full Changelog](https://github.com/eclectic-coding/rails_app/compare/0.2.0...0.3.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Add user option to select other styling systems [\#2](https://github.com/eclectic-coding/rails_app/issues/2)
10
+ - add user option to select sass styling systems [\#7](https://github.com/eclectic-coding/rails_app/pull/7) ([eclectic-coding](https://github.com/eclectic-coding))
11
+
12
+ ## [0.2.0](https://github.com/eclectic-coding/rails_app/tree/0.2.0) (2024-04-03)
13
+
14
+ [Full Changelog](https://github.com/eclectic-coding/rails_app/compare/0.1.0...0.2.0)
15
+
16
+ **Closed issues:**
17
+
18
+ - Integrate github\_changelog\_generator [\#5](https://github.com/eclectic-coding/rails_app/issues/5)
19
+
20
+ **Merged pull requests:**
21
+
22
+ - Integrate GitHub changelog generator [\#6](https://github.com/eclectic-coding/rails_app/pull/6) ([eclectic-coding](https://github.com/eclectic-coding))
23
+ - Update CHANGELOG.md [\#3](https://github.com/eclectic-coding/rails_app/pull/3) ([eclectic-coding](https://github.com/eclectic-coding))
24
+
25
+ ## [0.1.0](https://github.com/eclectic-coding/rails_app/tree/0.1.0) (2024-04-02)
26
+
27
+ [Full Changelog](https://github.com/eclectic-coding/rails_app/compare/640f33991e4aaf2aa31cc9bb974bb094190f2aa3...0.1.0)
28
+
29
+
30
+
31
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/README.md CHANGED
@@ -8,7 +8,7 @@ The initial release of this gem is an opinionated template that includes the fol
8
8
  - Esbuild for JavaScript bundling
9
9
  - Bootstrap for CSS styling
10
10
  - RSpec for testing
11
- - Code quality tools: RuboCop, Brakeman, and Bundler Audit
11
+ - Code quality tools: Rubocop, Brakeman, and Bundler Audit
12
12
 
13
13
  The initial release of this gem **v.0.1.0** is starting with my personal preferences and a Rails template I have developed locally. I plan to expand the template to include more options and configurations with future releases which will make this template less opinionated.
14
14
 
@@ -21,11 +21,27 @@ gem install rails_app
21
21
  ## Usage
22
22
  To bootstrap a new Rails application: `rails_app`
23
23
 
24
- The user will be prompted to enter the name of the new Rails application, and the select the assets pipeline to use (propshaft or sprockets).
24
+ The user will be prompted to enter the name of the new Rails application, and the select the assets pipeline to use (propshaft or sprockets), and a styling option:
25
+
26
+ ![](./screenshot_cli.png)
25
27
 
26
28
  The template will then create a new Rails application with the selected options.
27
29
 
28
- In addition, there is a custom binstub (`bin/ci`) that can be used to run the test suite and code quality tools (rubocop, brakeman, and bundle-audit).
30
+ ### Testing
31
+ The template includes RSpec for testing, which includes pre configured:
32
+ - FactoryBot
33
+ - Faker
34
+ - Webmock
35
+ - VCR
36
+ - Simplecov
37
+
38
+ ### Code Quality Tools
39
+ The template includes the following code quality tools:
40
+ - Rubocop using the `rubocop-rails-omakase` gem with a few custom settings in a provided `.rubocop.yml`
41
+ - Brakeman for security scanning
42
+ - Bundler Audit for checking for vulnerable gems
43
+
44
+ All of this tools can be run using the following command, which also will run the test suite: `bin/ci`
29
45
 
30
46
  ## Development
31
47
 
data/lib/rails_app/cli.rb CHANGED
@@ -9,8 +9,16 @@ module RailsApp
9
9
 
10
10
  app_name = prompt.ask("What is the name of your application?", required: true)
11
11
  assets = prompt.select("How would you like to manage assets?", %w[propshaft sprockets])
12
+ styling_choices = [
13
+ {name: "Bootstrap", value: "bootstrap"},
14
+ {name: "Tailwind CSS", value: "tailwindcss", disabled: "(coming soon)"},
15
+ {name: "Bulma", value: "bulma", disabled: "(coming soon)"},
16
+ {name: "PostCSS", value: "postcss", disabled: "(coming soon)"},
17
+ {name: "SASS", value: "sass"}
18
+ ]
19
+ styling = prompt.select("How would you like to manage styling?", styling_choices)
12
20
 
13
- Command.new(app_name: app_name, assets: assets).run
21
+ Command.new(app_name: app_name, assets: assets, styling: styling).run
14
22
  end
15
23
  end
16
24
  end
@@ -4,9 +4,10 @@ module RailsApp
4
4
  class Command
5
5
  attr_reader :app_name, :bundling, :assets
6
6
 
7
- def initialize(app_name:, assets:)
7
+ def initialize(app_name:, assets:, styling:)
8
8
  @app_name = app_name
9
9
  @assets = assets
10
+ @styling = styling
10
11
  end
11
12
 
12
13
  def template
@@ -15,6 +16,7 @@ module RailsApp
15
16
 
16
17
  def run
17
18
  command = "rails new #{@app_name} --no-rc #{skip_spring} #{asset_management} #{javascript_bundling} #{styling_framework} #{testing_framework} -m #{template}"
19
+ puts command
18
20
  system(command)
19
21
  end
20
22
 
@@ -31,7 +33,7 @@ module RailsApp
31
33
  end
32
34
 
33
35
  def styling_framework
34
- "--css bootstrap"
36
+ "--css #{@styling}"
35
37
  end
36
38
 
37
39
  def testing_framework
@@ -0,0 +1,2 @@
1
+ // Entry point for your Sass build
2
+ @import 'custom.sass.scss';
@@ -0,0 +1,49 @@
1
+ a {
2
+ text-decoration: none;
3
+ }
4
+
5
+ body {
6
+ background-color: #eceeef;
7
+ font-family: Verdana, Helvetica, Arial;
8
+ font-size: 14px;
9
+
10
+ .container {
11
+ width: 80%;
12
+ margin: 0 auto;
13
+ background-color: #fff;
14
+ padding: 20px 40px;
15
+ margin-top: 25px;
16
+ border: solid 1px black;
17
+ }
18
+ }
19
+
20
+ nav ul {
21
+ list-style-type: none;
22
+ margin: 0;
23
+ padding: 0;
24
+ overflow: hidden;
25
+ display: flex;
26
+
27
+ li {
28
+ margin-right: 1rem;
29
+
30
+ a {
31
+ display: block;
32
+ color: black;
33
+ text-align: center;
34
+ padding: 14px 16px;
35
+ text-decoration: none;
36
+
37
+ &:hover {
38
+ border-radius: 5px;
39
+ background-color: #ececec;
40
+ color: black;
41
+ }
42
+ }
43
+ }
44
+ }
45
+
46
+ .field,
47
+ .actions {
48
+ margin-bottom: 1rem;
49
+ }
@@ -0,0 +1,16 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
9
+ </div>
10
+
11
+ <div class="actions">
12
+ <%= f.submit "Resend confirmation instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @email %>!</p>
2
+
3
+ <% if @resource.try(:unconfirmed_email?) %>
4
+ <p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
5
+ <% else %>
6
+ <p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
7
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>We're contacting you to notify you that your password has been changed.</p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
@@ -0,0 +1,25 @@
1
+ <h2>Change your password</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+ <%= f.hidden_field :reset_password_token %>
6
+
7
+ <div class="field">
8
+ <%= f.label :password, "New password" %><br />
9
+ <% if @minimum_password_length %>
10
+ <em>(<%= @minimum_password_length %> characters minimum)</em><br />
11
+ <% end %>
12
+ <%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
13
+ </div>
14
+
15
+ <div class="field">
16
+ <%= f.label :password_confirmation, "Confirm new password" %><br />
17
+ <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
18
+ </div>
19
+
20
+ <div class="actions">
21
+ <%= f.submit "Change my password" %>
22
+ </div>
23
+ <% end %>
24
+
25
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,16 @@
1
+ <h2>Forgot your password?</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
+ </div>
10
+
11
+ <div class="actions">
12
+ <%= f.submit "Send me reset password instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,43 @@
1
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
+ </div>
10
+
11
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
12
+ <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
13
+ <% end %>
14
+
15
+ <div class="field">
16
+ <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
17
+ <%= f.password_field :password, autocomplete: "new-password" %>
18
+ <% if @minimum_password_length %>
19
+ <br />
20
+ <em><%= @minimum_password_length %> characters minimum</em>
21
+ <% end %>
22
+ </div>
23
+
24
+ <div class="field">
25
+ <%= f.label :password_confirmation %><br />
26
+ <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
27
+ </div>
28
+
29
+ <div class="field">
30
+ <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
31
+ <%= f.password_field :current_password, autocomplete: "current-password" %>
32
+ </div>
33
+
34
+ <div class="actions">
35
+ <%= f.submit "Update" %>
36
+ </div>
37
+ <% end %>
38
+
39
+ <h3>Cancel my account</h3>
40
+
41
+ <div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div>
42
+
43
+ <%= link_to "Back", :back %>
@@ -0,0 +1,29 @@
1
+ <h2>Sign up</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
+ </div>
10
+
11
+ <div class="field">
12
+ <%= f.label :password %>
13
+ <% if @minimum_password_length %>
14
+ <em>(<%= @minimum_password_length %> characters minimum)</em>
15
+ <% end %><br />
16
+ <%= f.password_field :password, autocomplete: "new-password" %>
17
+ </div>
18
+
19
+ <div class="field">
20
+ <%= f.label :password_confirmation %><br />
21
+ <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
22
+ </div>
23
+
24
+ <div class="actions">
25
+ <%= f.submit "Sign up" %>
26
+ </div>
27
+ <% end %>
28
+
29
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,26 @@
1
+ <h2>Log in</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
4
+ <div class="field">
5
+ <%= f.label :email %><br />
6
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
7
+ </div>
8
+
9
+ <div class="field">
10
+ <%= f.label :password %><br />
11
+ <%= f.password_field :password, autocomplete: "current-password" %>
12
+ </div>
13
+
14
+ <% if devise_mapping.rememberable? %>
15
+ <div class="field">
16
+ <%= f.check_box :remember_me %>
17
+ <%= f.label :remember_me %>
18
+ </div>
19
+ <% end %>
20
+
21
+ <div class="actions">
22
+ <%= f.submit "Log in" %>
23
+ </div>
24
+ <% end %>
25
+
26
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,15 @@
1
+ <% if resource.errors.any? %>
2
+ <div id="error_explanation" data-turbo-cache="false">
3
+ <h2>
4
+ <%= I18n.t("errors.messages.not_saved",
5
+ count: resource.errors.count,
6
+ resource: resource.class.model_name.human.downcase)
7
+ %>
8
+ </h2>
9
+ <ul>
10
+ <% resource.errors.full_messages.each do |message| %>
11
+ <li><%= message %></li>
12
+ <% end %>
13
+ </ul>
14
+ </div>
15
+ <% end %>
@@ -0,0 +1,25 @@
1
+ <%- if controller_name != 'sessions' %>
2
+ <%= link_to "Log in", new_session_path(resource_name) %><br />
3
+ <% end %>
4
+
5
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
+ <%= link_to "Sign up", new_registration_path(resource_name) %><br />
7
+ <% end %>
8
+
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
10
+ <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11
+ <% end %>
12
+
13
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
15
+ <% end %>
16
+
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
19
+ <% end %>
20
+
21
+ <%- if devise_mapping.omniauthable? %>
22
+ <%- resource_class.omniauth_providers.each do |provider| %>
23
+ <%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false } %><br />
24
+ <% end %>
25
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
+ <%= render "devise/shared/error_messages", resource: resource %>
5
+
6
+ <div class="field">
7
+ <%= f.label :email %><br />
8
+ <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
+ </div>
10
+
11
+ <div class="actions">
12
+ <%= f.submit "Resend unlock instructions" %>
13
+ </div>
14
+ <% end %>
15
+
16
+ <%= render "devise/shared/links" %>
@@ -0,0 +1,19 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Catapp</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <%= csrf_meta_tags %>
7
+ <%= csp_meta_tag %>
8
+
9
+ <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
10
+ <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
11
+ </head>
12
+
13
+ <body>
14
+ <div class="container">
15
+ <%= render 'shared/navbar' %>
16
+ <%= yield %>
17
+ </div>
18
+ </body>
19
+ </html>
@@ -0,0 +1,13 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
+ <style>
6
+ /* Email styles need to be inline */
7
+ </style>
8
+ </head>
9
+
10
+ <body>
11
+ <%= yield %>
12
+ </body>
13
+ </html>
@@ -0,0 +1,11 @@
1
+ <nav>
2
+ <ul>
3
+ <li><%= link_to 'Home', root_path %></li>
4
+ <% if user_signed_in? %>
5
+ <li><%= button_to "Log out", destroy_user_session_path, method: :delete %></li>
6
+ <% else %>
7
+ <li><%= link_to "Login", new_user_session_path %></li>
8
+ <li><%= link_to "Sign Up", new_user_registration_path %></li>
9
+ <% end%>
10
+ </ul>
11
+ </nav>
@@ -0,0 +1,2 @@
1
+ <h1>Static#home</h1>
2
+ <p>Find me in app/views/static/home.html.erb</p>
@@ -3,8 +3,7 @@
3
3
  require "fileutils"
4
4
  require "shellwords"
5
5
 
6
- puts "options: #{options}"
7
- puts "args: #{args}"
6
+ # puts "options: #{options}"
8
7
 
9
8
  def add_template_to_source_path
10
9
  source_paths.unshift(File.expand_path(File.join(__dir__)))
@@ -70,8 +69,18 @@ def add_static
70
69
  route "root to: 'static#home'"
71
70
  end
72
71
 
73
- def add_bootstrap
74
- directory "app_bootstrap", "app", force: true
72
+ def add_styling
73
+ if options[:css] == "bootstrap"
74
+ directory "app_bootstrap", "app", force: true
75
+ elsif options[:css] == "tailwindcss"
76
+ say "TAILWIND CSS COMING SOON", :red
77
+ elsif options[:css] == "bulma"
78
+ say "BULMA COMING SOON", :red
79
+ elsif options[:css] == "postcss"
80
+ say "POSTCSS COMING SOON", :red
81
+ elsif options[:css] == "sass"
82
+ directory "app_sass", "app", force: true
83
+ end
75
84
  end
76
85
 
77
86
  def setup_rspec
@@ -129,7 +138,7 @@ after_bundle do
129
138
  add_esbuild_script
130
139
  add_users
131
140
  add_static
132
- add_bootstrap
141
+ add_styling
133
142
  setup_rspec
134
143
  copy_templates
135
144
  database_setup
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsApp
4
- VERSION = "0.1.0"
4
+ VERSION = "0.3.0"
5
5
  end
data/rails_app.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["Chuck Smith"]
9
9
  spec.email = ["chuck@eclecticsaddlebag.com"]
10
10
 
11
- spec.summary = "Write a short summary, because RubyGems requires one."
12
- spec.description = "Write a longer description or delete this line."
11
+ spec.summary = "Bootstrap a new customized Rails application with a better development experience."
12
+ spec.description = "Bootstrap a new customized Rails application with a better development experience."
13
13
  spec.homepage = "https://github.com/eclectic-coding/rails_app"
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = ">= 3.1.4"
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chuck Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-02 00:00:00.000000000 Z
11
+ date: 2024-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootsnap
@@ -64,7 +64,8 @@ dependencies:
64
64
  - - "~>"
65
65
  - !ruby/object:Gem::Version
66
66
  version: 0.23.1
67
- description: Write a longer description or delete this line.
67
+ description: Bootstrap a new customized Rails application with a better development
68
+ experience.
68
69
  email:
69
70
  - chuck@eclecticsaddlebag.com
70
71
  executables:
@@ -116,6 +117,27 @@ files:
116
117
  - lib/rails_app/template/app_bootstrap/views/shared/_navbar.html.erb
117
118
  - lib/rails_app/template/app_bootstrap/views/shared/_notices.html.erb
118
119
  - lib/rails_app/template/app_bootstrap/views/static/home.html.erb
120
+ - lib/rails_app/template/app_sass/assets/stylesheets/application.sass.scss
121
+ - lib/rails_app/template/app_sass/assets/stylesheets/custom.sass.scss
122
+ - lib/rails_app/template/app_sass/views/devise/confirmations/new.html.erb
123
+ - lib/rails_app/template/app_sass/views/devise/mailer/confirmation_instructions.html.erb
124
+ - lib/rails_app/template/app_sass/views/devise/mailer/email_changed.html.erb
125
+ - lib/rails_app/template/app_sass/views/devise/mailer/password_change.html.erb
126
+ - lib/rails_app/template/app_sass/views/devise/mailer/reset_password_instructions.html.erb
127
+ - lib/rails_app/template/app_sass/views/devise/mailer/unlock_instructions.html.erb
128
+ - lib/rails_app/template/app_sass/views/devise/passwords/edit.html.erb
129
+ - lib/rails_app/template/app_sass/views/devise/passwords/new.html.erb
130
+ - lib/rails_app/template/app_sass/views/devise/registrations/edit.html.erb
131
+ - lib/rails_app/template/app_sass/views/devise/registrations/new.html.erb
132
+ - lib/rails_app/template/app_sass/views/devise/sessions/new.html.erb
133
+ - lib/rails_app/template/app_sass/views/devise/shared/_error_messages.html.erb
134
+ - lib/rails_app/template/app_sass/views/devise/shared/_links.html.erb
135
+ - lib/rails_app/template/app_sass/views/devise/unlocks/new.html.erb
136
+ - lib/rails_app/template/app_sass/views/layouts/application.html.erb
137
+ - lib/rails_app/template/app_sass/views/layouts/mailer.html.erb
138
+ - lib/rails_app/template/app_sass/views/layouts/mailer.text.erb
139
+ - lib/rails_app/template/app_sass/views/shared/_navbar.html.erb
140
+ - lib/rails_app/template/app_sass/views/static/home.html.erb
119
141
  - lib/rails_app/template/bin/ci
120
142
  - lib/rails_app/template/bin/setup
121
143
  - lib/rails_app/template/bin/yarn
@@ -130,6 +152,7 @@ files:
130
152
  - lib/rails_app/template/template.rb
131
153
  - lib/rails_app/version.rb
132
154
  - rails_app.gemspec
155
+ - screenshot_cli.png
133
156
  homepage: https://github.com/eclectic-coding/rails_app
134
157
  licenses:
135
158
  - MIT
@@ -155,5 +178,5 @@ requirements: []
155
178
  rubygems_version: 3.5.6
156
179
  signing_key:
157
180
  specification_version: 4
158
- summary: Write a short summary, because RubyGems requires one.
181
+ summary: Bootstrap a new customized Rails application with a better development experience.
159
182
  test_files: []