Skip to content

Commit

Permalink
chore: cleanup crates
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsan committed Feb 22, 2024
1 parent ee5b63d commit 64a1336
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 60 deletions.
7 changes: 0 additions & 7 deletions crates/core/tests/activity_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,6 @@ fn test_activity_store_list_ended_activities_passes(
Ok(())
}

#[rstest]
#[ignore = "We need to implement the archiving feature first."]
fn test_activity_store_list_archived_activities_passes() -> TestResult<()> {
// TODO!: We need to implement the archiving feature first.
todo!()
}

#[rstest]
fn test_activity_store_list_all_activities_passes(
activity_log_with_variety_content: (Vec<Activity>, ActivityLog),
Expand Down
2 changes: 0 additions & 2 deletions crates/core/src/event.rs → crates/server/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,9 @@ enum PaceEventType {
// A more generalized way to handle any activity, whether it's a task, an intermission, or part of a Pomodoro session. This approach provides flexibility for future extensions.
BeginActivity {
activity_id: u32,
activity_type: ActivityType,
},
EndActivity {
activity_id: u32,
activity_type: ActivityType,
},

// Additional system events
Expand Down
2 changes: 2 additions & 0 deletions crates/server/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
//! Server Library for pace
pub(crate) mod event;
51 changes: 0 additions & 51 deletions src/commands/begin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,6 @@ impl Runnable for BeginCmd {
}

impl BeginCmd {
/// Create a new instance of the `begin` subcommand
pub fn new(
category: impl Into<Option<String>>,
time: impl Into<Option<String>>,
description: String,
tags: impl Into<Option<Vec<String>>>,
projects: impl Into<Option<Vec<String>>>,
) -> Self {
Self {
category: category.into(),
time: time.into(),
description,
tags: tags.into(),
_projects: projects.into(),
}
}

/// Inner run implementation for the begin command
pub fn inner_run(&self, config: &PaceConfig) -> Result<()> {
let Self {
Expand Down Expand Up @@ -121,37 +104,3 @@ impl BeginCmd {
eyre::bail!("Failed to start {activity}");
}
}

// TODO!: Test pace-rs begin command
// #[cfg(test)]
// mod tests {

// use std::env::temp_dir;

// use abscissa_core::fs::create_dir_all;
// use eyre::Ok;

// use super::*;

// #[test]
// fn test_begin_subcommand_creates_activity_passes() -> Result<()> {
// let temp_dir = temp_dir();
// let temp_file = temp_dir.join("activity_log.toml");
// create_dir_all(temp_dir)?;

// let cmd = BeginCmd::new(
// "Test::Category".to_string(),
// "22:00".to_string(),
// "Test description".to_string(),
// None,
// None,
// );

// let mut pace_config = PaceConfig::default();
// pace_config.add_activity_log_path(temp_file.to_string_lossy().to_string());

// cmd.inner_run(&pace_config)?;

// Ok(())
// }
// }

0 comments on commit 64a1336

Please sign in to comment.