rails_app 0.3.0 → 0.4.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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -1
  3. data/lib/rails_app/cli.rb +1 -1
  4. data/lib/rails_app/template/app_postcss/assets/stylesheets/application.postcss.css +2 -0
  5. data/lib/rails_app/template/app_postcss/assets/stylesheets/custom.css +49 -0
  6. data/lib/rails_app/template/app_postcss/views/devise/confirmations/new.html.erb +16 -0
  7. data/lib/rails_app/template/app_postcss/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  8. data/lib/rails_app/template/app_postcss/views/devise/mailer/email_changed.html.erb +7 -0
  9. data/lib/rails_app/template/app_postcss/views/devise/mailer/password_change.html.erb +3 -0
  10. data/lib/rails_app/template/app_postcss/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  11. data/lib/rails_app/template/app_postcss/views/devise/mailer/unlock_instructions.html.erb +7 -0
  12. data/lib/rails_app/template/app_postcss/views/devise/passwords/edit.html.erb +25 -0
  13. data/lib/rails_app/template/app_postcss/views/devise/passwords/new.html.erb +16 -0
  14. data/lib/rails_app/template/app_postcss/views/devise/registrations/edit.html.erb +43 -0
  15. data/lib/rails_app/template/app_postcss/views/devise/registrations/new.html.erb +29 -0
  16. data/lib/rails_app/template/app_postcss/views/devise/sessions/new.html.erb +26 -0
  17. data/lib/rails_app/template/app_postcss/views/devise/shared/_error_messages.html.erb +15 -0
  18. data/lib/rails_app/template/app_postcss/views/devise/shared/_links.html.erb +25 -0
  19. data/lib/rails_app/template/app_postcss/views/devise/unlocks/new.html.erb +16 -0
  20. data/lib/rails_app/template/app_postcss/views/layouts/application.html.erb +19 -0
  21. data/lib/rails_app/template/app_postcss/views/layouts/mailer.html.erb +13 -0
  22. data/lib/rails_app/template/app_postcss/views/layouts/mailer.text.erb +1 -0
  23. data/lib/rails_app/template/app_postcss/views/shared/_navbar.html.erb +11 -0
  24. data/lib/rails_app/template/app_postcss/views/static/home.html.erb +2 -0
  25. data/lib/rails_app/template/template.rb +1 -1
  26. data/lib/rails_app/version.rb +1 -1
  27. data/screenshot_cli.png +0 -0
  28. metadata +23 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abe9ca28918f70a2b71b19040764b860567c4ea7a58fc020dad211a80e10cfb7
4
- data.tar.gz: '0283ec9fae9b1c6438830c486c3eadcbd090f7c74ba78fe965e930bc08c3453e'
3
+ metadata.gz: 950e88ffd5cb494ab170e0195ea2f7b3fd0ae91f78be6e7bc2c15c5c41d33cd2
4
+ data.tar.gz: 0e261dacae4e68f6553791bbb5935b8ac4a277cbf2b02e1f939d84b5bde45389
5
5
  SHA512:
6
- metadata.gz: 70d9bb94900977be4b5b8d79589f44c93d97e916a6914ebec7b91792bb810a08fb4fe3fdaade63298b39b2fd751910993750da751cb00b6c444097d8bfb99a31
7
- data.tar.gz: 93c4942b640be06a3bd09bd85af99b101b95eeff4f9ad389a03f1d2643da8e539f15afd6d527da59372eedd65aac60494f98e3f234d7a7d79eec012ec9365e77
6
+ metadata.gz: bfd248a9575bd294fa228beaa3eb099b7e365fb96a2cb26944dc1553d9dded192f694209758fbdea794a162d0674dc08ad097322b1fe02f03e8ff9fb2407e47f
7
+ data.tar.gz: 23120127039675a3e50be730baffa5eee1ffe1a05f1dd93249005709ed273207eb7bca9fb4273530f3397c2a51283ed0904473130023aba318d3ca2c733a95f4
data/CHANGELOG.md CHANGED
@@ -1,12 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.4.0](https://github.com/eclectic-coding/rails_app/tree/0.4.0) (2024-04-04)
4
+
5
+ [Full Changelog](https://github.com/eclectic-coding/rails_app/compare/0.3.0...0.4.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - postcss [\#8](https://github.com/eclectic-coding/rails_app/issues/8)
10
+ - Add Postcss styling option [\#11](https://github.com/eclectic-coding/rails_app/pull/11) ([eclectic-coding](https://github.com/eclectic-coding))
11
+
3
12
  ## [0.3.0](https://github.com/eclectic-coding/rails_app/tree/0.3.0) (2024-04-03)
4
13
 
5
14
  [Full Changelog](https://github.com/eclectic-coding/rails_app/compare/0.2.0...0.3.0)
6
15
 
7
16
  **Implemented enhancements:**
8
17
 
9
- - Add user option to select other styling systems [\#2](https://github.com/eclectic-coding/rails_app/issues/2)
10
18
  - 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
19
 
12
20
  ## [0.2.0](https://github.com/eclectic-coding/rails_app/tree/0.2.0) (2024-04-03)
data/lib/rails_app/cli.rb CHANGED
@@ -13,7 +13,7 @@ module RailsApp
13
13
  {name: "Bootstrap", value: "bootstrap"},
14
14
  {name: "Tailwind CSS", value: "tailwindcss", disabled: "(coming soon)"},
15
15
  {name: "Bulma", value: "bulma", disabled: "(coming soon)"},
16
- {name: "PostCSS", value: "postcss", disabled: "(coming soon)"},
16
+ {name: "PostCSS", value: "postcss"},
17
17
  {name: "SASS", value: "sass"}
18
18
  ]
19
19
  styling = prompt.select("How would you like to manage styling?", styling_choices)
@@ -0,0 +1,2 @@
1
+ /* Entry point for your PostCSS build */
2
+ @import 'custom.css';
@@ -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>
@@ -77,7 +77,7 @@ def add_styling
77
77
  elsif options[:css] == "bulma"
78
78
  say "BULMA COMING SOON", :red
79
79
  elsif options[:css] == "postcss"
80
- say "POSTCSS COMING SOON", :red
80
+ directory "app_postcss", "app", force: true
81
81
  elsif options[:css] == "sass"
82
82
  directory "app_sass", "app", force: true
83
83
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsApp
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.0"
5
5
  end
data/screenshot_cli.png CHANGED
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.3.0
4
+ version: 0.4.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-03 00:00:00.000000000 Z
11
+ date: 2024-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootsnap
@@ -117,6 +117,27 @@ files:
117
117
  - lib/rails_app/template/app_bootstrap/views/shared/_navbar.html.erb
118
118
  - lib/rails_app/template/app_bootstrap/views/shared/_notices.html.erb
119
119
  - lib/rails_app/template/app_bootstrap/views/static/home.html.erb
120
+ - lib/rails_app/template/app_postcss/assets/stylesheets/application.postcss.css
121
+ - lib/rails_app/template/app_postcss/assets/stylesheets/custom.css
122
+ - lib/rails_app/template/app_postcss/views/devise/confirmations/new.html.erb
123
+ - lib/rails_app/template/app_postcss/views/devise/mailer/confirmation_instructions.html.erb
124
+ - lib/rails_app/template/app_postcss/views/devise/mailer/email_changed.html.erb
125
+ - lib/rails_app/template/app_postcss/views/devise/mailer/password_change.html.erb
126
+ - lib/rails_app/template/app_postcss/views/devise/mailer/reset_password_instructions.html.erb
127
+ - lib/rails_app/template/app_postcss/views/devise/mailer/unlock_instructions.html.erb
128
+ - lib/rails_app/template/app_postcss/views/devise/passwords/edit.html.erb
129
+ - lib/rails_app/template/app_postcss/views/devise/passwords/new.html.erb
130
+ - lib/rails_app/template/app_postcss/views/devise/registrations/edit.html.erb
131
+ - lib/rails_app/template/app_postcss/views/devise/registrations/new.html.erb
132
+ - lib/rails_app/template/app_postcss/views/devise/sessions/new.html.erb
133
+ - lib/rails_app/template/app_postcss/views/devise/shared/_error_messages.html.erb
134
+ - lib/rails_app/template/app_postcss/views/devise/shared/_links.html.erb
135
+ - lib/rails_app/template/app_postcss/views/devise/unlocks/new.html.erb
136
+ - lib/rails_app/template/app_postcss/views/layouts/application.html.erb
137
+ - lib/rails_app/template/app_postcss/views/layouts/mailer.html.erb
138
+ - lib/rails_app/template/app_postcss/views/layouts/mailer.text.erb
139
+ - lib/rails_app/template/app_postcss/views/shared/_navbar.html.erb
140
+ - lib/rails_app/template/app_postcss/views/static/home.html.erb
120
141
  - lib/rails_app/template/app_sass/assets/stylesheets/application.sass.scss
121
142
  - lib/rails_app/template/app_sass/assets/stylesheets/custom.sass.scss
122
143
  - lib/rails_app/template/app_sass/views/devise/confirmations/new.html.erb