Commit Graph

57 Commits

Author SHA1 Message Date
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 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 4e516ee19d Update version strings
...for the next release, which will be imag 0.10.0!

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-10 11:56:37 +01:00
Matthias Beyer 17d4123898 Update dependencies from git versions to proper versions.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-11-09 22:14:11 +01:00
Matthias Beyer 1e6d58bf4c Add ID reporting in imag-view 2018-11-06 20:33:30 +01:00
Matthias Beyer 274811243f Move imag-view to ID provider infrastructure 2018-11-06 20:33:30 +01:00
Matthias Beyer c1bc5d4bf6 imag-view: Move from error-chain to failure
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:29 +01:00
Matthias Beyer 51730eed89 Update dependency: tempfile: 2 -> 3 2018-10-06 12:21:20 +02:00
Matthias Beyer e838f0d0e7 Update dependency: handlebars: 0.29.0 -> 1.0 2018-09-27 15:05:45 +02:00
Matthias Beyer 61738ac9ee Revert "Update dependency: handlebars: 0.29.0 -> 1.0"
This reverts commit a1f0872486995b80216e8a08a2176debdef3752a.

As updating handlebars needs some more involvement, we roll back to the
version we use currently and schedule the update for later.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-09-27 15:05:45 +02:00
Matthias Beyer abf6a3c384 Update dependency: handlebars: 0.29.0 -> 1.0 2018-09-27 15:05:45 +02:00
Matthias Beyer 3d12998603 Update dependency: toml-query: 0.6 -> 0.7 2018-09-27 15:05:44 +02:00
Matthias Beyer 664edc7943 Update version string: 0.8.0 -> 0.9.0 2018-05-09 11:39:33 +02:00
Matthias Beyer 829e425c12 Refactor imag-view to new store iterator interface 2018-05-01 17:44:05 +02:00
Matthias Beyer 95a4816604 Implement imag-view argument to put seperator between shown entries 2018-04-24 22:49:53 +02:00
Matthias Beyer c2fd3fa94e Add support for formatted markdown output
This patch also removes the (unused) "compile" subcommand and replaces
it with a flag "-c" / "--compile" which prints the output in formatted
to the terminal.

Compiling the output from markdown to HTML and showing in the browser is
not yet possible.
2018-04-24 18:06:45 +02:00
Matthias Beyer 653db333e6 Fix imag-view for new view_entry() interface 2018-04-24 16:46:23 +02:00
Matthias Beyer 10b71864f6 Fix: Do not automatically wrap text
We must use `ArgMatches::occurrences_of` here to check whether the
argument was actually passed.

If it was not passed, we do not wrap at all.
2018-04-22 14:17:12 +02:00
Matthias Beyer e80bf7b57d Add feature for wrapping output 2018-04-19 21:55:27 +02:00
Matthias Beyer d2dceb6640 Update version numbers: 0.7.0 -> 0.8.0 2018-04-19 10:05:53 +02:00
Matthias Beyer e29bbdb98d Fix: Make error message more explanatory 2018-04-18 17:41:34 +02:00
Matthias Beyer 4568b1f625
Merge pull request #1380 from matthiasbeyer/minor
Minor patches
2018-04-18 16:46:41 +02:00
Matthias Beyer 98f8366e4c Fix documentation in crate metadata 2018-04-17 15:55:08 +02:00
Matthias Beyer aeec10bf76 Use clap with wrap_help feature 2018-04-13 16:19:10 +02:00
Matthias Beyer b59c234588 Use clap "^2.29" instead of ">=2.29" 2018-04-13 16:17:43 +02:00
Matthias Beyer 5061faaa74 Add support for piping entry ids into command 2018-04-06 16:16:22 +02:00
Matthias Beyer f1cdb21430 Add support for viewing multiple entries 2018-04-06 15:30:12 +02: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 6b0930adec Use ErrFromStr convenience extension 2018-02-12 21:25:33 +01:00
Matthias Beyer efdfb2a308 Fix imag-view for new error interface 2018-02-12 21:19:48 +01:00
Matthias Beyer 30d2c28a22 Update version string: 0.6.0 -> 0.7.0 2018-02-11 14:22:24 +01:00
Matthias Beyer 8656a38c50 Update dependency: clap: 2.17 -> 2.29 2018-02-10 16:40:34 +01:00
Matthias Beyer 9d2900a7dc Compile clap with suggestions and color support 2018-02-10 16:40:34 +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 ae4ced9587 Show content by default 2018-02-01 21:47:09 +01:00
Matthias Beyer 7731b88c97 Remove map_err_trace_exit() calls in favour of map_err_trace_exit_unwrap() 2018-01-29 09:38:32 +01:00
Matthias Beyer 635d000344 log: 0.4.0-rc.1 -> 0.4.0 2018-01-15 11:21:52 +01:00
Matthias Beyer f209e12410 Update dependency: log: 0.3.* -> 0.4.0-rc.1 2018-01-15 11:20:07 +01:00
Matthias Beyer 0a78d43741 imag-view: Replace read with typed read 2018-01-13 01:14:03 +01:00
Matthias Beyer 0c4be78223 Update dependency: toml-query -> 0.6 2018-01-13 01:14:03 +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 3c8dd19d11 Update version strings: 0.5.0 -> 0.6.0 2017-12-25 19:17:07 +01:00
Matthias Beyer a20871eb5e Add badges in Cargo.toml of all crates 2017-10-31 15:03:30 +01:00
Matthias Beyer b237adfe19 Fix calls to Runtime::config() to use direct result 2017-10-31 09:25:14 +01:00
Matthias Beyer 758166637b Update toml-query: 0.3.* -> 0.4
This update is needed for the error-chain update, as the toml-query
0.4.0 release also bumps this dependency.
2017-10-12 22:13:04 +02:00
Matthias Beyer 815cde76d0 Rewrite .map_err_trace_exit().unwrap() with new helper fn 2017-10-12 20:15:46 +02:00