diff --git a/scouter/src/lib.rs b/scouter/src/lib.rs index c4ff95f..6b674c8 100644 --- a/scouter/src/lib.rs +++ b/scouter/src/lib.rs @@ -32,6 +32,29 @@ impl Project { pub fn path(&self) -> &Path { &self.path } + + pub fn info(&self) -> ProjectInfo { + match self.project_type { + ProjectType::Maven => ProjectInfo { + name: "placeholder".into(), + version: "placeholder".into() + }, + ProjectType::Npm => ProjectInfo { + name: "placeholder".into(), + version: "placeholder".into() + }, + ProjectType::Cargo => ProjectInfo { + name: "placeholder".into(), + version: "placeholder".into() + } + } + } +} + +#[derive(Debug)] +pub struct ProjectInfo { + pub name: String, + pub version: String } pub struct Scouter { diff --git a/src/main.rs b/src/main.rs index c26e0f6..e26b996 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ fn main() { let mut args = env::args(); args.next(); match args.next().as_ref().map(|arg| arg.as_str()) { - Some("info") => println!("{:?}", project), + Some("info") => println!("{:?}", project.info()), Some("where") => println!("{}", project.path().display()), Some("run") => { Command::new(args.next().unwrap())