-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: normalize crate names, new shared test utils (#3)
* feat: normalize crate names, new shared test utils * chore: remove residule
- Loading branch information
Showing
27 changed files
with
106 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
module.exports = { | ||
bumpFiles: [ | ||
{ | ||
filename: './rulog-cli/Cargo.toml', | ||
updater: './scripts/cargo-updater' | ||
}, | ||
{ | ||
filename: './rulog-core/Cargo.toml', | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
function createEntries() { | ||
const entries = fs.readdirSync('./') | ||
.filter(name => name.startsWith('rulog_') && fs.lstatSync(name).isDirectory()) | ||
.map(name => ({ | ||
filename: `./${name}/Cargo.toml`, | ||
updater: './scripts/cargo-updater' | ||
}, | ||
{ | ||
filename: './rulog-vm/Cargo.toml', | ||
updater: './scripts/cargo-updater' | ||
}, | ||
{ | ||
filename: './package.json', | ||
type: 'json' | ||
} | ||
], | ||
})); | ||
|
||
// Add the entry for package.json | ||
entries.push({ | ||
filename: './package.json', | ||
type: 'json' | ||
}); | ||
|
||
return entries; | ||
} | ||
|
||
module.exports = { | ||
bumpFiles: createEntries(), | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
[workspace] | ||
|
||
members = [ | ||
"rulog-core", | ||
"rulog-cli", | ||
"rulog-vm", | ||
"rulog_core", | ||
"rulog_cli", | ||
"rulog_vm", | ||
"rulog_test_util", | ||
] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "rulog_cli" | ||
version = "0.1.2" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
env_logger = "0.10.1" | ||
log = "0.4.20" | ||
rulog_core = { path = "../rulog_core" } | ||
rulog_vm = { path = "../rulog_vm" } |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "rulog_core" | ||
version = "0.1.2" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
env_logger = "0.10.1" | ||
log = "0.4.20" | ||
backtrace = "0.3" | ||
rulog_test_util = { path = "../rulog_test_util" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
[package] | ||
name = "rulog_test_util" | ||
version = "0.1.2" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
env_logger = "0.10.1" | ||
log = "0.4.20" | ||
backtrace = "0.3" | ||
|
||
[package] | ||
name = "rulog-core" | ||
version = "0.1.3" | ||
edition = "2021" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use std::io::Write; | ||
|
||
pub fn setup_logger() { | ||
use log::LevelFilter; | ||
let _ = env_logger::builder() | ||
.is_test(true) | ||
.format(|buf, record| { | ||
writeln!( | ||
buf, | ||
"[{}] {}:{} \t - {}", | ||
record.level(), | ||
record.file().unwrap_or("unknown"), | ||
record.line().unwrap_or(0), | ||
record.args() | ||
) | ||
}) | ||
.filter_level(LevelFilter::Trace) | ||
.try_init(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "rulog_vm" | ||
version = "0.1.2" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
chrono = "0.4.31" | ||
env_logger = "0.10.1" | ||
log = "0.4.20" | ||
rulog_test_util = { path = "../rulog_test_util" } | ||
[dependencies.rulog_core] | ||
path = "../rulog_core" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.