Commit Graph

37 Commits

Author SHA1 Message Date
Leon Schuermann 870a09f1dc imag-mail: implement ImagApplication
Signed-off-by: Leon Schuermann <leon@is.currently.online>
2019-10-26 14:41:31 +02:00
flip1995 3036d87402 [No-auto] bin/domain/mail: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-28 18:18:41 +02:00
flip1995 419a5ffa77 [Auto] bin/core/mail: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-08-28 18:18:40 +02:00
Leon Schuermann ed457495c8 Introduce proper error handling in IdPathProvider
Prior to this change, the IdPathProvider implementation would be
responsible for exiting the process on insufficient / wrong arguments.
However, such error handling should be performed together with the
business logic and not in CLI-parsing related code.

This change introduces a clear separation: both parsing errors and
insufficient id path arguments can now be return from inside the
`get_ids`-method, and get passed up to the application logic to be
handled.

This change is reflected in all instances of IdPathProvider and their
surrounding code.

Signed-off-by: Leon Schuermann <leon.git@is.currently.online>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-24 21:03:34 +02:00
Matthias Beyer 1d89844613 Run 'cargo fix' for rust-2018
With this patch we move the codebase to Rust-2018.

The diff was generated by executing

    cargo fix --all --all-features --edition

on the codebase.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:20:59 +02:00
Matthias Beyer dfc02a5679 Move helper function to libimagentref::util
This moves the helper function for getting the `Config` object from the
configuration file via the runtime.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-20 16:22:52 +01:00
Matthias Beyer a959167b15 Rewrite imag-mail
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-20 16:22:52 +01:00
Matthias Beyer 198c59f717 Revert "Remove imag-mail"
This reverts commit f9a980c344.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-20 16:22:52 +01:00
Matthias Beyer f9a980c344 Remove imag-mail
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-17 11:09:49 +01:00
Matthias Beyer 90eaeb642a Remove magic constants in trace_unwrap_exit/map_err_trace_exit_unwrap calls
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-11 03:52:04 +01:00
Matthias Beyer f1a639ea8c Change id reporting API to return ExitCode
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-11 03:22:56 +01:00
Matthias Beyer 9185abcfa5 Update copyright years
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-01-03 18:41:36 +01:00
Matthias Beyer 9fca66aa89 Forbid unsafe code in all crates 2018-11-11 13:05:55 +01:00
Matthias Beyer be56f9fe75 Add ID reporting in imag-mail 2018-11-06 20:35:18 +01:00
Matthias Beyer 5821a55c14 imag-mail: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:29 +01:00
Matthias Beyer 7aca84dd5e Refactor imag-mail to new store iterator interface 2018-05-01 17:44:17 +02:00
Matthias Beyer 09d34783cb Fix imag-mail to list from appropriate collection 2018-04-24 13:40:42 +02:00
Matthias Beyer 51b9b5c0db Fix: Use qualification 2018-04-14 00:58:40 +02:00
Matthias Beyer e71019a2f2 Add lints 2018-04-14 00:39:43 +02:00
Matthias Beyer 8c1b4124c0 Handle unknown subcommands in binaries with Runtime::handle_unknown_subcommand 2018-04-04 19:34:13 +02:00
Matthias Beyer 50461b839a Use output stream from Runtime::stdout() 2018-03-04 13:57:44 +01:00
Matthias Beyer 876c1cb9af Fix broken pipe panics 2018-02-19 11:14:18 +01:00
Matthias Beyer 3341e3640c
Merge pull request #1224 from matthiasbeyer/git-version-in-version
Git version in version
2018-02-18 20:03:09 +01:00
Matthias Beyer 9469693763 Use new make_imag_version!() macro for building version string 2018-02-13 11:38:34 +01:00
Matthias Beyer 8128d3ade9 Fix imag-mail for new error interface 2018-02-12 21:19:48 +01:00
Matthias Beyer d5a9e4930d Update dates in license header
And add missing header in one file
2018-02-07 02:48:53 +01:00
Matthias Beyer bfc35e0517 Remove dependency "version"
Because the "version" crate is licensed as GPL, which would us require
to release imag as GPL, we remove the crate now.
2018-01-12 13:33:40 +01:00
Matthias Beyer c115215fa4 Merge branch 'master' into libimagerror/integration
This merge solved a _LOT_ of conflicts and was a rather complicated one,
as parts of the conflict-resolution involved rewriting of half the
stuff.

This merge commit fixes all the things so a `cargo check --all`
succeeds, but I did not yet check whether tests run without failure.
2017-09-04 23:02:45 +02:00
Matthias Beyer 2b845c773b imag-mail: Rewrite error handling 2017-09-03 21:33:54 +02:00
Matthias Beyer 7e4275c420 Remove unused crate import 2017-08-31 20:56:13 +02:00
Matthias Beyer 9a9a3f2f43 Merge branch 'libimagstore/remove-unused' into integrate-remove-unused
The merge conflicts which were resolved may roll back some changes from
the merged branch (unknowingly).

These will be fixed in the next commits
2017-08-31 20:56:08 +02:00
Matthias Beyer 00b8d5192c Remove unused variables 2017-08-31 10:57:19 +02:00
Matthias Beyer fabb990336 Remove unused imports 2017-08-31 10:57:19 +02:00
Matthias Beyer ae5255c7c7 Remove unused crate imports
This patch removes unused crate imports reported by newer rust versions.

Some crates were only required for tests, some only for tests with
macro_import - these things were fixed with feature gates.
2017-08-31 10:56:15 +02:00
Matthias Beyer 7ff3985eaf Fix imag-mail to use new Ref interface 2017-08-28 14:32:50 +02:00
Mario Krehl 8a63815854 Fix package name of libimagentryannotation
Fix: run `sed -i 's,libimagref,libimagentryref,g' (rg -l 'libimagref')`
Fix: run `sed -i 's,libimagannotation,libimagentryannotation,g' (rg -l 'libimagannotation')`
2017-08-27 15:13:25 +02:00
Matthias Beyer 59a3662ac4 Reorganize code in subdirs 2017-08-27 15:12:09 +02:00