refactor: Remove branch specification from sal dependency
- Removed the branch specification from the `sal` dependency in `doctree/Cargo.toml` and `webbuilder/Cargo.toml`. This simplifies the dependency management and relies on the default branch of the repository. - Updated `.gitignore` to ignore `sccache.log` to prevent it from being committed to the repository. - Updated example commands in `example_commands.sh` to use a different collection name (`grid1` instead of `grid_documentation`) for testing purposes. This avoids potential conflicts with pre-existing data. - Improved code structure and organization in `doctree/src/lib.rs`.
This commit is contained in:
@@ -5,33 +5,29 @@
|
||||
|
||||
// Import lazy_static for global state
|
||||
|
||||
mod error;
|
||||
mod storage;
|
||||
mod utils;
|
||||
mod collection;
|
||||
mod doctree;
|
||||
mod error;
|
||||
mod include;
|
||||
mod storage;
|
||||
mod utils;
|
||||
|
||||
pub use error::{DocTreeError, Result};
|
||||
pub use storage::RedisStorage;
|
||||
pub use collection::{Collection, CollectionBuilder};
|
||||
pub use doctree::{DocTree, DocTreeBuilder, new, from_directory};
|
||||
pub use doctree::{DocTree, DocTreeBuilder, from_directory, new};
|
||||
pub use error::{DocTreeError, Result};
|
||||
pub use include::process_includes;
|
||||
pub use storage::RedisStorage;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_doctree_builder() {
|
||||
// Create a storage instance
|
||||
let storage = RedisStorage::new("dummy_url").unwrap();
|
||||
let storage = RedisStorage::new("redis://localhost:6379").unwrap();
|
||||
|
||||
let doctree = DocTree::builder()
|
||||
.with_storage(storage)
|
||||
.build()
|
||||
.unwrap();
|
||||
let doctree = DocTree::builder().with_storage(storage).build().unwrap();
|
||||
|
||||
assert_eq!(doctree.collections.len(), 0);
|
||||
assert_eq!(doctree.default_collection, None);
|
||||
|
Reference in New Issue
Block a user