Commit Graph

5984 Commits

Author SHA1 Message Date
Matthias Beyer 45d0d2d3bb Add test whether adding an URL works
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-23 21:07:29 +02:00
Matthias Beyer ad3c2c6249 Rewrite UrlLinker
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-23 21:07:13 +02:00
Matthias Beyer ed8546c7dd Reimplement link module with header Partial
This patch reimplements the "link" module using the
`toml_query::read::Partial` feature.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-23 21:06:45 +02:00
Matthias Beyer cdc90f7be7 Refactor: Remove notion of "external link"s
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-23 13:11:49 +02:00
Matthias Beyer 59ddb70345 Fix: Make sure links are sorted and deduplicated 2019-06-23 11:06:19 +02:00
Matthias Beyer d89a700fd1 Remove annotateable linking
This patch removes the annotateable linking feature from libimagentrylink.
It was not used anyways.

Also, this patch rewrites the complete linking code to use the
toml-query "typed" feature rather than constructing everything by
itself.

This removes a lot of unmaintainable boilerplate code.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-23 10:35:14 +02:00
Matthias Beyer 11c2cab916 Allow unused variable here 2019-06-22 12:00:07 +02:00
Matthias Beyer 1ffdb72315 Remove obsolete (internal) function 2019-06-22 12:00:02 +02:00
Matthias Beyer fd59d6d301 Merge branch 'libimagentrylink-interface-redesign' into master 2019-06-21 23:42:40 +02:00
Matthias Beyer 5dc6829354 Rename module: linker -> linkable
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-21 23:22:48 +02:00
Matthias Beyer ef17930c29 Rename interface
With this patch, the libimagentrylink library interface gets renamed.

The trait gets renamed to the more descriptive name "Linkable", the
functions get renamed to not contain any notion of "internal" anymore.

This patch also adapts the whole source tree for the new libimagentrylink
interface, also renaming variables to not contain "_internal_" anymore.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-21 23:22:47 +02:00
Matthias Beyer f21b6e53a2 Merge branch 'libimagentrylink-split' into master 2019-06-15 16:48:50 +02:00
Matthias Beyer a2433f315d Merge branch 'libimagentryview-propagate-io-errors' into master 2019-06-15 16:48:40 +02:00
Matthias Beyer 2268fd8091 Import toml-query with typed feature
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer 901502b67e Split "internal" module into several submodules
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer d02d53594e Fix debug output message 2019-05-31 12:48:00 +02:00
Matthias Beyer d2a5e8fb59 Rename functions: *_external_link -> *_url
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer 7f2e4c8442 Adapt tested path 2019-05-31 12:48:00 +02:00
Matthias Beyer 14ea375ca4 Fix imag-link for new url library 2019-05-31 12:48:00 +02:00
Matthias Beyer 8b66672772 Fix libimagentrymarkdown for new url lib 2019-05-31 12:48:00 +02:00
Matthias Beyer 8a5bc09b62 Fix libimagbookmark for new url library 2019-05-31 12:48:00 +02:00
Matthias Beyer c33c29e8e2 Fix import for new libimagentryurl lib
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer 098d25db89 Move code from external libimagentrylink module to libimagentryurl
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-31 12:48:00 +02:00
Matthias Beyer 5cb641044f Add libimagentryurl
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 17:51:33 +02:00
Matthias Beyer bb4f0ace6b Fix imag-diary to ignore broken pipes
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 11:12:47 +02:00
Matthias Beyer a157b23258 Fix imag-view to ignore broken pipes
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 11:12:46 +02:00
Matthias Beyer 3e22fbe352 Fix imports for new viewer interface
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 11:12:44 +02:00
Matthias Beyer 11955f699f Change interface of Viewer to propagate io errors
Because we need to catch errors that are caused by a borken pipe when
writing to stdout (for example), this patch changes the interface of the
Viewer trait to return an error enum that can be used to check whether
an IO error happened.

The calling code can then decide whether to ignore a broken pipe error
or whether to handle it properly.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 11:12:43 +02:00
Matthias Beyer cee7689e77 Replace deprecated functioncall
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 10:09:45 +02:00
Matthias Beyer 151e4d0aa8 Replace deprecated functioncall
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 10:09:43 +02:00
Matthias Beyer c27fec14bf Merge branch 'rewrite-logging-aggregation' into master 2019-05-30 10:08:45 +02:00
Matthias Beyer 5f5ce54edb Rewrite to use derive macro
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 09:39:22 +02:00
Matthias Beyer d5eb918523 travis: Update rustc
Because we depend on try_into in these patches, we have to bump the
rustc version to 1.34.0 minimum here.

And because we do support the last three rust stable compilers, this has
to wait.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 09:32:07 +02:00
Matthias Beyer a3f771ca65 Add comment why we do this
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 09:32:07 +02:00
Matthias Beyer fb8b50fa9a Remove boilerplate by enabling serde in "log" dependency
This patch adds the "serde" feature to the "log" dependency, so we can
deserialize logging levels directly into "log" types.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 09:32:07 +02:00
Matthias Beyer 185ec25b9e Rewrite logging config deserialization
This patch rewrites the logging config deserialization. It removes the
manual traversing of the config toml structure and replaces it with
types which implement `Deserialize`, which is way more convenient and
easy to read (and extend).

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-30 09:32:07 +02:00
Matthias Beyer b1330c9916 Merge branch 'update-toml-dependencies' 2019-05-30 09:30:40 +02:00
Matthias Beyer a7d53e47d1 Update toml-query to 0.9.0
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-29 18:39:25 +02:00
Matthias Beyer 1482f70320 Update dependency: toml: 0.4 -> 0.5
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-29 18:39:25 +02:00
Matthias Beyer b4e25df98a Merge branch 'minor' into master 2019-05-25 11:01:42 +02:00
Matthias Beyer d759e402a6 Add changelog for 0.9.3
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
(cherry picked from commit 6661b72e3d1a984f3010251698b7ee92be80af1a)
2019-05-25 10:43:59 +02:00
Matthias Beyer bce167d740 Update changelog for 0.9.2.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
(cherry picked from commit d828e5fd6ff2f13c0737260649c28a8fcaab6299)
2019-05-25 10:43:59 +02:00
Matthias Beyer 1c6b02454c Remove unused functions 2019-05-25 10:43:24 +02:00
Matthias Beyer b18c3e0361 Remove ununsed sourcefile
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-25 10:43:24 +02:00
Matthias Beyer 8bac396f09 Add imag-markdown to release script
Fixes: 632062caed ("Add imag-markdown")
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-25 10:43:24 +02:00
Matthias Beyer 5ff2c3e8e3 Remove lazy_static
we don't need lazy static here, so remove it and the dependency as well.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-25 10:43:24 +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 fcdded90b2 travis: Update rustc to 1.33.0 as minimum required version 2019-05-24 21:02:19 +02:00
Matthias Beyer 911133818c Fix: Negation error
We have to check whether the configuration is _not_ a String type.
Dump fail.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-23 17:13:10 +02:00
Matthias Beyer b7d91f0905 Remove buildscripts
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-05-22 22:18:57 +02:00