kaze 0.3.0 → 0.4.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: 367b549562d6d96be85bac57b8d0f4528598122dfe773d733fcd992de4e1616d
4
- data.tar.gz: 9d79187ce1918ff96854c36cb5e2f51e05aaf6a329afeede53a35151eaeb433d
3
+ metadata.gz: c2c180c5d3390cc6b2013e98ce172091691001be25971dfc2f2f28fe7022eaf1
4
+ data.tar.gz: ddc60156cf90ab2827ea0907e0f7d68e6bc4c760963ad271809b80132b0a7884
5
5
  SHA512:
6
- metadata.gz: f87b1598f94dbdead93d4dea21d766d57819ec6bf354093e45af74c5659ebf7c31927a09f22138e5bd4fd122a1210a3aef92dbd5e0f2f492978bd44000e2d2db
7
- data.tar.gz: ff833ef663bc961c1ab98c8ab671a26b04ae4da50c57a491a9a96c713b97068570f843905f6ef03591bdf53f3c306f18d881e6b75b56b0039423b5547fd84ea6
6
+ metadata.gz: 7a47cce2a4bd167ac9f57ac2c367794f61f7354e3400619112abd2482d59a1341ccbe1bbd6881f61104404f4b7a87c59600fe1889abbd5577ab8f12d22308ef6
7
+ data.tar.gz: 0f885b972c32e66757b2412481b8cce0aacc03fd7512bebbc41e007bc4e715afec41afc36c946fe05e462a5c26256cfbe47955ce61e66508df9467be82ddab77
data/README.md CHANGED
@@ -4,7 +4,7 @@ Heavily inspired by [Laravel Breeze](https://github.com/laravel/breeze), this ge
4
4
 
5
5
  [Kaze](https://github.com/gtkvn/kaze) is a minimal, simple implementation of all of Rails's authentication features, including login, registration, password reset. In addition, Kaze includes a simple "profile" page where the user may update their name, email address, and password.
6
6
 
7
- Kaze provides scaffolding options based on Inertia, with the choice of using Vue or React for the Inertia-based scaffolding.
7
+ Kaze provides scaffolding options based on [Hotwire](https://hotwired.dev) or [Inertia](https://inertiajs.com), with the choice of using Vue or React for the Inertia-based scaffolding.
8
8
 
9
9
  ## Installation
10
10
 
@@ -18,11 +18,30 @@ gem install kaze
18
18
 
19
19
  Once Kaze is installed, you may scaffold your application using one of the Kaze "stacks" discussed in the documentation below.
20
20
 
21
+ ## Kaze & Hotwire
22
+
23
+ The default Kaze "stack" is the Hotwire stack. Hotwire is a powerful way to building dynamic, reactive, front-end UIs primarily using Ruby and ERB templates without using much JavaScript by sending HTML instead of JSON over the wire.
24
+
25
+ The Hotwire stack may be installed by invoking the `install` command with no other additional arguments inside your app directory.
26
+
27
+ ```
28
+ kaze install
29
+ ```
30
+
31
+ After Kaze's scaffolding is installed, you may start your application:
32
+
33
+ ```
34
+ bin/setup
35
+ bin/dev
36
+ ```
37
+
38
+ Next, you may navigate to your application's `/login` or `/register` URLs in your web browser.
39
+
21
40
  ## Kaze & React / Vue
22
41
 
23
42
  Kaze offers React and Vue scaffolding via an Inertia frontend implementation. Inertia allows you to build modern, single-page React and Vue applications using classic server-side routing and controllers.
24
43
 
25
- Inertia lets you enjoy the frontend power of React and Vue combined with the incredible backend productivity of Rails and lightning-fast Vite compilation. To use an Inertia stack, specify vue or react as your desired stack when executing the install command inside your app directory:
44
+ Inertia lets you enjoy the frontend power of React and Vue combined with the incredible backend productivity of Rails and lightning-fast Vite compilation. To use an Inertia stack, specify `react` or `vue` as your desired stack when executing the `install` command inside your app directory:
26
45
 
27
46
  ```
28
47
  kaze install react
@@ -7,7 +7,7 @@ class Kaze::Commands::InstallCommand < Thor
7
7
  include Kaze::Commands::InstallsHotwireStack
8
8
  include Kaze::Commands::InstallsInertiaStacks
9
9
 
10
- desc "install [STACK]", "Install the Kaze controllers and resources. Supported stacks: react, vue."
10
+ desc "install [STACK]", "Install the Kaze controllers and resources. Supported stacks: hotwire, react, vue."
11
11
  def install(stack = "hotwire")
12
12
  if stack == "hotwire"
13
13
  return install_hotwire_stack
@@ -21,7 +21,7 @@ class Kaze::Commands::InstallCommand < Thor
21
21
  return install_inertia_vue_stack
22
22
  end
23
23
 
24
- say "Invalid stack. Supported stacks are [react], [vue].", :red
24
+ say "Invalid stack. Supported stacks are [hotwire], [react], [vue].", :red
25
25
  end
26
26
 
27
27
  private
data/lib/kaze/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kaze
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -3,12 +3,12 @@ class ModalComponent < ViewComponent::Base
3
3
  @name = attributes[:name]
4
4
  @show = attributes[:show] || false
5
5
  @max_width = {
6
- :sm => 'sm:max-w-sm',
7
- :md => 'sm:max-w-md',
8
- :lg => 'sm:max-w-lg',
9
- :xl => 'sm:max-w-xl',
10
- '2xl' => 'sm:max-w-2xl',
11
- }[attributes[:max_width] || '2xl']
6
+ :sm => "sm:max-w-sm",
7
+ :md => "sm:max-w-md",
8
+ :lg => "sm:max-w-lg",
9
+ :xl => "sm:max-w-xl",
10
+ "2xl" => "sm:max-w-2xl"
11
+ }[attributes[:max_width] || "2xl"]
12
12
  @attributes = attributes.without(:name, :show, :max_width)
13
13
  end
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaze
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
  - Cuong Giang