summaryrefslogtreecommitdiffstats
path: root/bin/domain/imag-habit
AgeCommit message (Collapse)Author
2020-04-29Replace repository with new sourcehut repoMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-24Update toml-query: 0.9.2 -> 0.10.0Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-24Revert "Move to toml-query from master branch"Matthias Beyer
This reverts commit f7fadc118f2de7e84cef8c6d4103296289564f74. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-08Move to toml-query from master branchMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-03-08Replace failure with anyhow in complete codebaseMatthias Beyer
This patch was scripted with sed -i 's/use failure::Error/use anyhow::Error/' $(rg "use failure::Error" -l) sed -i 's/use failure::Fallible as /use anyhow::/' $(rg "use failure::Fallible" -l) sed -i 's/failure/anyhow/' $(rg "failure *=" -l) sed -i 's/format_err!/anyhow!/' $(rg "format_err!" -l) sed -i 's/use failure::ResultExt/use anyhow::Context/' $(rg "use failure::ResultExt" -l) sed -i 's/err_msg/anyhow!/' $(rg "use failure::err_msg" -l) sed -i 's/^anyhow\ *=.*$/anyhow = "1"/' $(rg "anyhow * =" -l) sed -i 's/^anyhow_derive.*//' $(rg "anyhow_derive" -l) sed -i 's/extern crate failure/extern crate anyhow/' $(rg "extern crate failure" -l) sed -i 's/.*extern crate anyhow_derive.*//' $(rg "anyhow_derive" -l) Some manual changes were added as well, so this patch was not completely scripted, but mostly. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2020-01-01Update copyright years to 2015-2020Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-12-24Fix: Drop habit before getting instancesMatthias Beyer
Because when showing an instance, we try to get the comment for the instance from the habit template, which tries to Store::get() the template in HabitInstance::get_comment(). This fails if the template is already borrowed, thus drop the borrow before the whole thing. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-12-23Remove len() != 0 comparison with negation and ::is_empty() callMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-12-23Remove unnecessary return keywordMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-12-23Remove DebugResult and DebugOption helpersMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-12-23Replace map_dbg() and map_dbg_str() with context() and inspect() callsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-12-21Rewrite imag-habit to propagate errors to main() instead of exit()ingMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-10-26imag-habit: implement ImagApplicationLeon Schuermann
Signed-off-by: Leon Schuermann <leon@is.currently.online>
2019-08-28[No-auto] bin/domain/habit: Fix Clippy warningsflip1995
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-28[Auto] bin/core/habit: Fix Clippy warningsflip1995
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30Update all dependenciesMatthias Beyer
This patch updates all dependencies but not "nom". Done with `cargo upgrade --all` and manual editing. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30Merge branch 'libimaghabit-dont-copy-comment-to-instance' into masterMatthias Beyer
2019-06-30Adapt imag-habit impl for `HabitInstance::get_comment()`Matthias Beyer
The implementation of `HabitInstance::get_comment()` was changed and therefore its semantics were changed. This patch adapts the call to the function for the new signature and implications. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30Add "done" marker in "list" outputMatthias Beyer
This patch adds a marker in the table when using the "list" command which marks when the task is already done for the list entry. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-29Update toml-query to 0.9.0Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-29Update dependency: toml: 0.4 -> 0.5Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-22Remove buildscriptsMatthias Beyer
When installing (a subcrate) from crates.io, it fails because it cannot find the buildscript. This is the quickfix, simply remove the buildscript itself and the setup of the buildscript in all Cargo.toml files. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11Fix negation errorMatthias Beyer
We Iterator::filter here, so we have to negate - because we list everything where _no_ instance exists yet. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11Add debug outputMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11Remove magic constants in trace_unwrap_exit/map_err_trace_exit_unwrap callsMatthias Beyer
This patch removes the magic constant we used when calling `trace_unwrap_exit()` or `map_err_trace_exit_unwrap()`. We used to call it with `1` as parameter, where the number was the exit code to use. Now the implementation of the function does it automatically (using 1 (one) as exit code). All calls of these functions were fixed. Thanks to vim this was easy. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-11Change id reporting API to return ExitCodeMatthias Beyer
Because this API only errors when write!() errors occur, we can return the exit code as an error here. This way the user of the API can immediately exit if there was an IO error, but the API automatically takes care of the right return value, returning (exiting) with zero (0) if there was an "Broken pipe" error and with one (1) otherwise, which is the expected behaviour here. All calls to that API were changed accordingly. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-09Fix: "status" subcommand might not be presentMatthias Beyer
If we call 'imag-habit' without a subcommand, we assume "today". Thus it might occur that the "status" subcommand match is not present, hence we have to assume `false` here as default value. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-01-03Update copyright yearsMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-11Forbid unsafe code in all cratesMatthias Beyer
2018-11-10Update version stringsMatthias Beyer
...for the next release, which will be imag 0.10.0! Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-09Update dependencies from git versions to proper versions.Matthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-09Make code more idomaticMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-06Add ID reporting in imag-habitMatthias Beyer
2018-11-06Optimize implementation: Less matchesMatthias Beyer
This patch simplifies the code to be not three nested matches but rather one match and then some function chaining. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-01Use new "ask" function interface with input/output stream paramsMatthias Beyer
In the imag-contact crate we had to rewrite the ask_continue!{} macro as a function for less headache, but besides that this is a rather straight-forward patch for adapting to the new interface. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30imag-habit: Move from error-chain to failureMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-06Update dependency: prettytable: 0.6 -> 0.8Matthias Beyer
2018-10-06Update dependency: prettytable: 0.6 -> 0.8Matthias Beyer
2018-09-27Update kairos to master branchMatthias Beyer
Because of the new error-chain version which kairos can depend on, for which kairos is not yet released.
2018-09-27Update dependency: kairos: 0.1 -> 0.2Matthias Beyer
2018-09-27Update dependency: log: 0.3 -> 0.4Matthias Beyer
2018-09-27Update dependency: toml-query: 0.6 -> 0.7Matthias Beyer
2018-06-27Fix: Use unused resultMatthias Beyer
2018-05-09Update version string: 0.8.0 -> 0.9.0Matthias Beyer
2018-05-01Refactor imag-habit to new store iterator interfaceMatthias Beyer
2018-04-19Update version numbers: 0.7.0 -> 0.8.0Matthias Beyer
2018-04-18Merge pull request #1380 from matthiasbeyer/minorMatthias Beyer
Minor patches
2018-04-17Fix documentation in crate metadataMatthias Beyer
2018-04-13Use clap with wrap_help featureMatthias Beyer
2018-04-13Use clap "^2.29" instead of ">=2.29"Matthias Beyer