mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
name taskwarrior-rest
This commit is contained in:
parent
752d05e96b
commit
727db7f669
8 changed files with 21 additions and 20 deletions
26
Cargo.lock
generated
26
Cargo.lock
generated
|
@ -366,19 +366,6 @@ dependencies = [
|
||||||
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rask"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
"uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rdrand"
|
name = "rdrand"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
|
@ -480,6 +467,19 @@ dependencies = [
|
||||||
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "taskwarrior-rust"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
version = "3.1.0"
|
version = "3.1.0"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "rask"
|
name = "taskwarrior-rust"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Dustin J. Mitchell <dustin@mozilla.com>"]
|
authors = ["Dustin J. Mitchell <dustin@mozilla.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
extern crate clap;
|
extern crate clap;
|
||||||
use clap::{App, Arg, SubCommand};
|
use clap::{App, Arg, SubCommand};
|
||||||
use rask::{Replica, DB};
|
use taskwarrior_rust::{Replica, DB};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
@ -89,7 +89,8 @@ fn decode(value: String) -> String {
|
||||||
|
|
||||||
/// Parse an "FF4" formatted task line. From Task::parse in Taskwarrior's src/Task.cpp.
|
/// Parse an "FF4" formatted task line. From Task::parse in Taskwarrior's src/Task.cpp.
|
||||||
///
|
///
|
||||||
/// While Taskwarrior supports additional formats, this is the only format supported by rask.
|
/// While Taskwarrior supports additional formats, this is the only format supported by
|
||||||
|
/// taskwarrior_rust.
|
||||||
pub(super) fn parse_ff4(line: &str) -> Fallible<Task> {
|
pub(super) fn parse_ff4(line: &str) -> Fallible<Task> {
|
||||||
let mut pig = Pig::new(line.as_bytes());
|
let mut pig = Pig::new(line.as_bytes());
|
||||||
let mut builder = TaskBuilder::new();
|
let mut builder = TaskBuilder::new();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use chrono::Utc;
|
use chrono::Utc;
|
||||||
use proptest::prelude::*;
|
use proptest::prelude::*;
|
||||||
use rask::{Operation, DB};
|
use taskwarrior_rust::{Operation, DB};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
fn uuid_strategy() -> impl Strategy<Value = Uuid> {
|
fn uuid_strategy() -> impl Strategy<Value = Uuid> {
|
||||||
|
|
|
@ -6,7 +6,7 @@ use std::io::BufReader;
|
||||||
fn test_parse() {
|
fn test_parse() {
|
||||||
let filename = "tests/data/tdb2-test.data";
|
let filename = "tests/data/tdb2-test.data";
|
||||||
let file = File::open(filename).unwrap();
|
let file = File::open(filename).unwrap();
|
||||||
let tasks = rask::parse(filename, BufReader::new(file)).unwrap();
|
let tasks = taskwarrior_rust::parse(filename, BufReader::new(file)).unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
tasks[0].description,
|
tasks[0].description,
|
||||||
"https://phabricator.services.example.com/D7364 [taskgraph] Download debian packages"
|
"https://phabricator.services.example.com/D7364 [taskgraph] Download debian packages"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use chrono::Utc;
|
use chrono::Utc;
|
||||||
use rask::{Operation, Server, DB};
|
use taskwarrior_rust::{Operation, Server, DB};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use chrono::Utc;
|
use chrono::Utc;
|
||||||
use proptest::prelude::*;
|
use proptest::prelude::*;
|
||||||
use rask::{Operation, Server, DB};
|
use taskwarrior_rust::{Operation, Server, DB};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue