Skip to content

Commit

Permalink
Merge branch 'master' into sqlite-optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
kaplanelad authored Oct 14, 2024
2 parents a69d9d3 + 018e1ba commit 632c246
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Fix some comments in the starters and example code. [https://github.com/loco-rs/loco/pull/824](https://github.com/loco-rs/loco/pull/824)
* Fix Y2038 bug for JWT on 32 bit platforms. [https://github.com/loco-rs/loco/pull/825](https://github.com/loco-rs/loco/pull/825)
* Make App URL in Boot Banner Clickable. [https://github.com/loco-rs/loco/pull/826](https://github.com/loco-rs/loco/pull/826)
* Add `--no-banner` flag to allow disabling the banner display. [https://github.com/loco-rs/loco/pull/839](https://github.com/loco-rs/loco/pull/839)
* add on_shutdown hook. [https://github.com/loco-rs/loco/pull/842](https://github.com/loco-rs/loco/pull/842)


## v0.10.1
Expand Down
4 changes: 2 additions & 2 deletions docs-site/content/blog/axum-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Hooks for App {
Now, you can create your controller that uses Axum session. Use the `cargo loco generate controller` command:

```sh
❯ cargo loco generate controller mysession -k api
❯ cargo loco generate controller mysession --api
Finished dev [unoptimized + debuginfo] target(s) in 0.36s
Running `target/debug/axum-session-cli generate controller mysession`
added: "src/controllers/mysession.rs"
Expand Down Expand Up @@ -166,7 +166,7 @@ impl Hooks for App {
Create the controller as before using `cargo loco generate controller`

```sh
❯ cargo loco generate controller mysession -k api
❯ cargo loco generate controller mysession --api
Finished dev [unoptimized + debuginfo] target(s) in 0.36s
Running `target/debug/axum-session-cli generate controller mysession`
added: "src/controllers/mysession.rs"
Expand Down
6 changes: 3 additions & 3 deletions docs-site/content/docs/getting-started/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ The built in <code>_health</code> route will tell you that you have configured y
Let's add a quick _hello_ response to our service.

```sh
$ cargo loco generate controller guide -k api
$ cargo loco generate controller guide --api
added: "src/controllers/guide.rs"
injected: "src/controllers/mod.rs"
injected: "src/app.rs"
Expand Down Expand Up @@ -465,7 +465,7 @@ $ cargo playground
We're now ready to plug this into an `articles` controller. First, generate a new controller:
```sh
$ cargo loco generate controller articles -k api
$ cargo loco generate controller articles --api
added: "src/controllers/articles.rs"
injected: "src/controllers/mod.rs"
injected: "src/app.rs"
Expand Down Expand Up @@ -630,7 +630,7 @@ Let's add another model, this time: `Comment`. We want to create a relation - a
Instead of coding the model and controller by hand, we're going to create a **comment scaffold** which will generate a fully working CRUD API comments. We're also going to use the special `references` type:
```sh
$ cargo loco generate scaffold comment content:text article:references -k api
$ cargo loco generate scaffold comment content:text article:references --api
```
If you peek into the new migration, you'll discover a new database relation in the articles table:
Expand Down
4 changes: 2 additions & 2 deletions docs-site/content/docs/getting-started/tour/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ You can choose between generating an `api`, `html` or `htmx` scaffold using the
</div>

```sh
$ cargo loco generate scaffold post title:string content:text -k api
$ cargo loco generate scaffold post title:string content:text --api

:
:
Expand Down Expand Up @@ -168,7 +168,7 @@ For those counting -- the commands for creating a blog backend were:
1. `cargo install loco-cli`
2. `cargo install sea-orm-cli`
3. `loco new`
4. `cargo loco generate scaffold post title:string content:text -k api`
4. `cargo loco generate scaffold post title:string content:text --api`

Done! enjoy your ride with `loco` 🚂

Expand Down
2 changes: 1 addition & 1 deletion docs-site/content/docs/the-app/your-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Options:
You can begin by generating a scaffold for the Post resource, which will represent a single blog posting. To accomplish this, open your terminal and enter the following command:
<!-- <snip id="scaffold-post-command" inject_from="yaml" template="sh"> -->
```sh
cargo loco generate scaffold posts name:string title:string content:text
cargo loco generate scaffold posts name:string title:string content:text --api
```
<!-- </snip> -->

Expand Down
2 changes: 2 additions & 0 deletions examples/demo/tests/cmd/cli.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ $ demo_app-cli routes --environment test

```console
$ demo_app-cli doctor
[..][0m DEBUG app: loco_rs::bgworker: job queue ping requested environment=development
✅ SeaORM CLI is installed
✅ DB connection: success
✅ redis queue: queue connection: success

```

Expand Down
2 changes: 1 addition & 1 deletion snipdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ snippets:
path: ./snipdoc.yml
scaffold-post-command:
content: cargo loco generate scaffold posts
name:string title:string content:text
name:string title:string content:text --api
path: ./snipdoc.yml
generate-task-help-command:
content: cd ./examples/demo && cargo loco generate task --help
Expand Down

0 comments on commit 632c246

Please sign in to comment.