kaze 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 801eeb176444975c22103b1c30236940bc4f039cbd78247f0dd953adceb14e2a
4
- data.tar.gz: 7a0023977ffddbcdc64c30969fcbfe7f467df905636196433eb39f0adc65dda0
3
+ metadata.gz: c65dc7f1acffb3ae6d361fbd4f1172fb46b857611dc0cc96b9229219869a3576
4
+ data.tar.gz: 5fa72ea32080be5c77a451bbc9cf24d6e8ff1c83af914c0b97004086cfd76e14
5
5
  SHA512:
6
- metadata.gz: 9e69b526a0219cb6bad9268ccf6f312fe81a020f6925988eb4eb4d7733f5264bd02167c9b4f13c96daf1dcb0bece48eef41c2fa68a27b80b2b9ad8f917f37d8a
7
- data.tar.gz: d683e46426ef76a6356343ade5d5e6026c5a05020daa3fc599e4279e73c31c09d1b18eae029bb9d8324f89fc429c4368beedf1089d273173e74c567ee76a412e
6
+ metadata.gz: 51c93d3f462be29745003941d34a1d8d42da5ff6ab8127c59ae4fc9c3ab001cf23094cc5f298262b63d661507bb5e79d93657fce24ea1fd1c82d8de7d7e5ac7f
7
+ data.tar.gz: 3abcbcda1957bf7415d10fc5c142183ca0227925843b6a1aeebd9c5a158fc5eeed0b855963c60cd785ce4201ac13dcbc169d27cdfe6d3dd12d9b41798d0e7931
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Cuong Giang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/lib/kaze/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kaze
2
- VERSION = '0.11.0'
2
+ VERSION = '0.12.0'
3
3
  end
@@ -6,8 +6,6 @@ class CreateUsers < ActiveRecord::Migration
6
6
  table.timestamp :email_verified_at
7
7
  table.string :password_digest, null: false
8
8
  table.string :remember_token
9
- table.integer :current_team_id
10
- table.string :profile_photo_path, limit: 2048
11
9
  table.timestamps
12
10
  end
13
11
  end
@@ -22,7 +22,7 @@ class ProfileController < ApplicationController
22
22
  def destroy
23
23
  @delete_user_form = DeleteUserForm.new(params.permit(:password))
24
24
 
25
- return render partial: 'profile/partials/delete_user_form', status: :unprocessable_entity if @delete_user_form.invalid?
25
+ return render turbo_stream: turbo_stream.replace('confirm_user_deletion_modal', partial: 'profile/partials/confirm_user_deletion_modal'), status: :unprocessable_entity if @delete_user_form.invalid?
26
26
 
27
27
  user = Current.auth.user
28
28
 
@@ -0,0 +1,25 @@
1
+ <div id="confirm_user_deletion_modal">
2
+ <%= render(ModalComponent.new({ name: "confirm-user-deletion", show: @delete_user_form.error_messages.has_key?(:password), focusable: true })) do %>
3
+ <%= form_with model: @delete_user_form, url: profile_destroy_path, method: "delete", class: "p-6" do %>
4
+ <h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
5
+ Are you sure you want to delete your account?
6
+ </h2>
7
+ <p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
8
+ Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.
9
+ </p>
10
+ <div class="mt-6">
11
+ <%= render(InputLabelComponent.new({ for: "password", value: "Password", class: "sr-only" })) %>
12
+ <%= render(TextInputComponent.new({ id: "password", class: "mt-1 block w-3/4", type: "password", name: "password", placeholder: "Password" })) %>
13
+ <%= render(InputErrorComponent.new({ class: "mt-2", message: @delete_user_form.error_messages[:password] })) %>
14
+ </div>
15
+ <div class="mt-6 flex justify-end">
16
+ <%= render(SecondaryButtonComponent.new({ "x-on:click": "$dispatch('close')" })) do %>
17
+ Cancel
18
+ <% end %>
19
+ <%= render(DangerButtonComponent.new({ class: "ms-3" })) do %>
20
+ Delete Account
21
+ <% end %>
22
+ </div>
23
+ <% end %>
24
+ <% end %>
25
+ </div>
@@ -10,29 +10,5 @@
10
10
  <%= render(DangerButtonComponent.new({"x-data": "", "x-on:click.prevent": "$dispatch('open-modal', 'confirm-user-deletion')"})) do %>
11
11
  Delete Account
12
12
  <% end %>
13
- <%= render(ModalComponent.new({ name: "confirm-user-deletion", show: @delete_user_form.error_messages.has_key?(:password), focusable: true })) do %>
14
- <turbo-frame id="delete_user_form">
15
- <%= form_with model: @delete_user_form, url: profile_destroy_path, method: "delete", class: "p-6" do %>
16
- <h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
17
- Are you sure you want to delete your account?
18
- </h2>
19
- <p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
20
- Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.
21
- </p>
22
- <div class="mt-6">
23
- <%= render(InputLabelComponent.new({ for: "password", value: "Password", class: "sr-only" })) %>
24
- <%= render(TextInputComponent.new({ id: "password", class: "mt-1 block w-3/4", type: "password", name: "password", placeholder: "Password" })) %>
25
- <%= render(InputErrorComponent.new({ class: "mt-2", message: @delete_user_form.error_messages[:password] })) %>
26
- </div>
27
- <div class="mt-6 flex justify-end">
28
- <%= render(SecondaryButtonComponent.new({ "x-on:click": "$dispatch('close')" })) do %>
29
- Cancel
30
- <% end %>
31
- <%= render(DangerButtonComponent.new({ class: "ms-3" })) do %>
32
- Delete Account
33
- <% end %>
34
- </div>
35
- <% end %>
36
- </turbo-frame>
37
- <% end %>
13
+ <%= render 'profile/partials/confirm_user_deletion_modal' %>
38
14
  </section>
@@ -3,7 +3,6 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1">
6
- <meta name="turbo-visit-control" content="reload">
7
6
  <title><%= content_for(:title) || "Rails" %></title>
8
7
  <%= csrf_meta_tags %>
9
8
  <%= csp_meta_tag %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaze
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cuong Giang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-25 00:00:00.000000000 Z
11
+ date: 2024-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.2'
19
+ version: '1.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.2'
26
+ version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: zeitwerk
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.5'
33
+ version: '2.6'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.5'
40
+ version: '2.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: railties
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -60,6 +60,7 @@ executables:
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
+ - LICENSE.md
63
64
  - README.md
64
65
  - bin/kaze
65
66
  - lib/kaze.rb
@@ -150,6 +151,7 @@ files:
150
151
  - stubs/hotwire/app/views/layouts/application.html.erb
151
152
  - stubs/hotwire/app/views/layouts/guest.html.erb
152
153
  - stubs/hotwire/app/views/profile/edit.html.erb
154
+ - stubs/hotwire/app/views/profile/partials/_confirm_user_deletion_modal.html.erb
153
155
  - stubs/hotwire/app/views/profile/partials/_delete_user_form.html.erb
154
156
  - stubs/hotwire/app/views/profile/partials/_update_password_form.html.erb
155
157
  - stubs/hotwire/app/views/profile/partials/_update_profile_information_form.html.erb
@@ -270,5 +272,6 @@ requirements: []
270
272
  rubygems_version: 3.5.9
271
273
  signing_key:
272
274
  specification_version: 4
273
- summary: Minimal Rails authentication scaffolding with Hotwire, Vue, or React + Tailwind.
275
+ summary: Opinionated minimal Rails authentication scaffolding with Hotwire, React,
276
+ or Vue + Tailwind.
274
277
  test_files: []