Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New loco cli generator #980

Merged
merged 45 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f42ae9e
new loco cli generator
kaplanelad Nov 6, 2024
ff1e056
testing v1
kaplanelad Nov 7, 2024
a7c96ee
testing v2
kaplanelad Nov 7, 2024
c7fc853
adding ci test
kaplanelad Nov 7, 2024
954b079
temp remove needs ci
kaplanelad Nov 10, 2024
7fecead
docs: first pass updating "loco-cli"
jondot Nov 10, 2024
8949328
order of instructions similar to loco-cli
jondot Nov 10, 2024
dada9fa
sync templates
jondot Nov 10, 2024
d42e9c0
loco version support local and normal
jondot Nov 13, 2024
171a64c
loco version support local and normal
jondot Nov 13, 2024
31b62a5
loco version support local and normal
jondot Nov 13, 2024
7f62347
loco version support local and normal
jondot Nov 13, 2024
aeb8e2b
loco version support local and normal
jondot Nov 13, 2024
5255d03
loco version support local and normal
jondot Nov 13, 2024
6683ddb
loco version support local and normal
jondot Nov 13, 2024
124badc
loco version support local and normal
jondot Nov 13, 2024
9722f15
loco version support local and normal
jondot Nov 13, 2024
52a2ae0
loco version support local and normal
jondot Nov 13, 2024
01fd0ec
support clientside
jondot Nov 13, 2024
62a36bb
lint
jondot Nov 13, 2024
d95661a
lint
jondot Nov 13, 2024
443513f
lint
jondot Nov 13, 2024
37ddf1c
lint
jondot Nov 13, 2024
599a6f3
lint
jondot Nov 13, 2024
724713f
lint
jondot Nov 13, 2024
8bc5130
lint
jondot Nov 13, 2024
a29d3ee
ci
jondot Nov 14, 2024
085c5b9
ci
jondot Nov 14, 2024
1e0c42b
adjust crate location
jondot Nov 14, 2024
a5cc0fe
migrate gen to loco-new
jondot Nov 14, 2024
1e7463c
migrate gen to loco-new
jondot Nov 14, 2024
7678200
migrate gen to loco-new
jondot Nov 14, 2024
c618c5f
migrate gen to loco-new
jondot Nov 14, 2024
f7f1567
migrate gen to loco-new
jondot Nov 14, 2024
dd1b7fd
migrate gen to loco-new
jondot Nov 14, 2024
756cf2f
migrate gen to loco-new
jondot Nov 14, 2024
dc817ad
new deprecation message
jondot Nov 14, 2024
da60aed
starters test
jondot Nov 14, 2024
697e060
test
jondot Nov 14, 2024
255e779
test
jondot Nov 14, 2024
febcf26
test
jondot Nov 14, 2024
dbf32f4
clippy
jondot Nov 14, 2024
64e5edb
clippy
jondot Nov 14, 2024
24e952b
Merge branch 'master' into new-loco-cli-generator
jondot Nov 14, 2024
0abe489
loco version support local and normal
jondot Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
starters test
  • Loading branch information
jondot committed Nov 14, 2024
commit da60aed54d122c8604721182e2391e7f62306efa
1 change: 0 additions & 1 deletion loco-new/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mod templates;
#[cfg(feature = "test-wizard")]
mod wizard;

pub mod assertion;
34 changes: 31 additions & 3 deletions loco-new/tests/wizard/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use loco::{
settings, wizard,
wizard::{AssetsOption, BackgroundOption, DBOption},
};
use rstest::rstest;
use uuid::Uuid;

struct TestDir {
Expand All @@ -30,8 +29,9 @@ impl Drop for TestDir {
}
}

#[rstest]
fn new_from_wizard(
#[cfg(feature = "test-wizard")]
#[rstest::rstest]
fn test_all_combinations(
#[values(DBOption::None, DBOption::Sqlite)] db: DBOption,
#[values(
BackgroundOption::Async,
Expand All @@ -43,6 +43,34 @@ fn new_from_wizard(
#[values(AssetsOption::Serverside, AssetsOption::Clientside, AssetsOption::None)]
asset: AssetsOption,
) {
test_combination(db, background, asset);
}

#[test]
fn test_starter_combinations() {
// lightweight service
test_combination(DBOption::None, BackgroundOption::None, AssetsOption::None);
// REST API
test_combination(
DBOption::Sqlite,
BackgroundOption::Async,
AssetsOption::None,
);
// SaaS, serverside
test_combination(
DBOption::Sqlite,
BackgroundOption::Async,
AssetsOption::Serverside,
);
// SaaS, clientside
test_combination(
DBOption::Sqlite,
BackgroundOption::Async,
AssetsOption::Clientside,
);
}

fn test_combination(db: DBOption, background: BackgroundOption, asset: AssetsOption) {
use std::collections::HashMap;

let test_dir = TestDir::new();
Expand Down
Loading