~matthiasbeyer/imag

a7d53e47d1fe15ed7163d5612fef2976c9be9098 — Matthias Beyer 1 year, 10 months ago 1482f70
Update toml-query to 0.9.0

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
42 files changed, 56 insertions(+), 59 deletions(-)

M bin/core/imag-annotate/Cargo.toml
M bin/core/imag-category/Cargo.toml
M bin/core/imag-diagnostics/Cargo.toml
M bin/core/imag-edit/Cargo.toml
M bin/core/imag-git/Cargo.toml
M bin/core/imag-gps/Cargo.toml
M bin/core/imag-header/Cargo.toml
M bin/core/imag-ids/Cargo.toml
M bin/core/imag-link/Cargo.toml
M bin/core/imag-store/Cargo.toml
M bin/core/imag-tag/Cargo.toml
M bin/core/imag-view/Cargo.toml
M bin/core/imag/Cargo.toml
M bin/domain/imag-bookmark/Cargo.toml
M bin/domain/imag-contact/Cargo.toml
M bin/domain/imag-diary/Cargo.toml
M bin/domain/imag-habit/Cargo.toml
M bin/domain/imag-log/Cargo.toml
M bin/domain/imag-mail/Cargo.toml
M bin/domain/imag-todo/Cargo.toml
M bin/domain/imag-wiki/Cargo.toml
M lib/core/libimagrt/Cargo.toml
M lib/core/libimagstore/Cargo.toml
M lib/core/libimagstore/src/store.rs
M lib/domain/libimagcontact/Cargo.toml
M lib/domain/libimagdiary/Cargo.toml
M lib/domain/libimaghabit/Cargo.toml
M lib/domain/libimaglog/Cargo.toml
M lib/domain/libimagmail/Cargo.toml
M lib/domain/libimagnotes/Cargo.toml
M lib/domain/libimagtimetrack/Cargo.toml
M lib/domain/libimagtodo/Cargo.toml
M lib/domain/libimagwiki/Cargo.toml
M lib/entry/libimagentryannotation/Cargo.toml
M lib/entry/libimagentrycategory/Cargo.toml
M lib/entry/libimagentrydatetime/Cargo.toml
M lib/entry/libimagentryfilter/Cargo.toml
M lib/entry/libimagentrygps/Cargo.toml
M lib/entry/libimagentrylink/Cargo.toml
M lib/entry/libimagentryref/Cargo.toml
M lib/entry/libimagentrytag/Cargo.toml
M lib/entry/libimagentryutil/Cargo.toml
M bin/core/imag-annotate/Cargo.toml => bin/core/imag-annotate/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
log = "0.4.0"
url = "1.2"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
failure = "0.1"

libimagstore           = { version = "0.10.0", path = "../../../lib/core/libimagstore" }

M bin/core/imag-category/Cargo.toml => bin/core/imag-category/Cargo.toml +1 -1
@@ 22,7 22,7 @@ maintenance                       = { status     = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
failure = "0.1"

libimagstore           = { version = "0.10.0", path = "../../../lib/core/libimagstore" }

M bin/core/imag-diagnostics/Cargo.toml => bin/core/imag-diagnostics/Cargo.toml +1 -1
@@ 16,7 16,7 @@ homepage      = "http://imag-pim.org"
[dependencies]
log  = "0.4"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
indicatif  = "0.9"
failure    = "0.1"


M bin/core/imag-edit/Cargo.toml => bin/core/imag-edit/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
log          =  "0.4"
version      =  "3"
toml         =  "0.5"
toml-query   =  "0.8"
toml-query   =  "0.9"
failure      =  "0.1"

libimagstore     = { version = "0.10.0", path = "../../../lib/core/libimagstore" }

M bin/core/imag-git/Cargo.toml => bin/core/imag-git/Cargo.toml +1 -1
@@ 22,7 22,7 @@ maintenance                       = { status     = "actively-developed" }
[dependencies]
log        = "0.4"
toml       = "0.5"
toml-query = "0.8"
toml-query = "0.9"

libimagrt    = { version = "0.10.0", path = "../../../lib/core/libimagrt" }
libimagerror = { version = "0.10.0", path = "../../../lib/core/libimagerror" }

M bin/core/imag-gps/Cargo.toml => bin/core/imag-gps/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
log = "0.4.0"
url = "1.2"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
failure = "0.1"

libimagstore     = { version = "0.10.0", path = "../../../lib/core/libimagstore" }

M bin/core/imag-header/Cargo.toml => bin/core/imag-header/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
log          =  "0.4"
version      =  "2.0.1"
toml         =  "0.5"
toml-query   =  "0.8"
toml-query   =  "0.9"
filters      =  "0.3"
failure      = "0.1"


M bin/core/imag-ids/Cargo.toml => bin/core/imag-ids/Cargo.toml +1 -1
@@ 24,7 24,7 @@ filters    = "0.3"
nom        = "3.2"
log        = "0.4"
toml       = "0.5"
toml-query = "0.8"
toml-query = "0.9"
is-match   = "0.1"
failure    = "0.1"


M bin/core/imag-link/Cargo.toml => bin/core/imag-link/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
log = "0.4.0"
url = "1.5"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
prettytable-rs = "0.8"
failure        = "0.1"


M bin/core/imag-store/Cargo.toml => bin/core/imag-store/Cargo.toml +1 -1
@@ 50,5 50,5 @@ default-features = false
features         = ["testing"]

[dev-dependencies.toml-query]
version          = "0.8"
version          = "0.9"


M bin/core/imag-tag/Cargo.toml => bin/core/imag-tag/Cargo.toml +1 -1
@@ 36,7 36,7 @@ default-features = false
features = ["color", "suggestions", "wrap_help"]

[dev-dependencies]
toml-query = "0.8"
toml-query = "0.9"
env_logger = "0.5"

[dev-dependencies.libimagutil]

M bin/core/imag-view/Cargo.toml => bin/core/imag-view/Cargo.toml +1 -1
@@ 22,7 22,7 @@ maintenance                       = { status     = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
handlebars = "1.0"
tempfile = "3"
failure = "0.1"

M bin/core/imag/Cargo.toml => bin/core/imag/Cargo.toml +1 -1
@@ 33,7 33,7 @@ maintenance                       = { status     = "actively-developed" }
walkdir = "2"
log = "0.4.0"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"

libimagerror = { version = "0.10.0", path = "../../../lib/core/libimagerror" }
libimagstore = { version = "0.10.0", path = "../../../lib/core/libimagstore" }

M bin/domain/imag-bookmark/Cargo.toml => bin/domain/imag-bookmark/Cargo.toml +1 -1
@@ 22,7 22,7 @@ maintenance                       = { status     = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
failure = "0.1"

libimagrt        = { version = "0.10.0", path = "../../../lib/core/libimagrt" }

M bin/domain/imag-contact/Cargo.toml => bin/domain/imag-contact/Cargo.toml +1 -3
@@ 44,8 44,6 @@ default-features = false
features = ["color", "suggestions", "wrap_help"]

[dependencies.toml-query]
#version          = "0.8"
version          = "0.9"
default-features = false
features         = ["typed"]
git              = "https://github.com/matthiasbeyer/toml-query"
branch           = "master"

M bin/domain/imag-diary/Cargo.toml => bin/domain/imag-diary/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
chrono = "0.4"
log = "0.4.0"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
itertools = "0.7"
failure = "0.1"


M bin/domain/imag-habit/Cargo.toml => bin/domain/imag-habit/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
chrono = "0.4"
log = "0.4"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
kairos = "0.3"
prettytable-rs = "0.8"
failure = "0.1"

M bin/domain/imag-log/Cargo.toml => bin/domain/imag-log/Cargo.toml +1 -1
@@ 22,7 22,7 @@ maintenance                       = { status     = "actively-developed" }
[dependencies]
log = "0.4"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
is-match = "0.1"
itertools = "0.7"
failure = "0.1"

M bin/domain/imag-mail/Cargo.toml => bin/domain/imag-mail/Cargo.toml +1 -1
@@ 37,7 37,7 @@ default-features = false
features = ["color", "suggestions", "wrap_help"]

[dependencies.toml-query]
version = "0.8"
version = "0.9"
default-features = false
features = ["typed"]


M bin/domain/imag-todo/Cargo.toml => bin/domain/imag-todo/Cargo.toml +1 -1
@@ 22,7 22,7 @@ maintenance                       = { status     = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
is-match = "0.1"
failure  = "0.1"


M bin/domain/imag-wiki/Cargo.toml => bin/domain/imag-wiki/Cargo.toml +1 -1
@@ 17,7 17,7 @@ homepage      = "http://imag-pim.org"
clap = ">=2.17"
log = "0.4"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
is-match = "0.1"
regex = "1"
filters = "0.3"

M lib/core/libimagrt/Cargo.toml => lib/core/libimagrt/Cargo.toml +1 -1
@@ 25,7 25,7 @@ toml = "0.5"
xdg-basedir = "1.0"
itertools = "0.7"
ansi_term = "0.11"
toml-query = "0.8"
toml-query = "0.9"
atty = "0.2"
failure        = "0.1"
failure_derive = "0.1"

M lib/core/libimagstore/Cargo.toml => lib/core/libimagstore/Cargo.toml +1 -1
@@ 29,7 29,7 @@ walkdir = "2"
is-match = "0.1"
serde = "1"
serde_json = "1"
toml-query = "0.8"
toml-query = "0.9"
failure    = "0.1"

libimagerror = { version = "0.10.0", path = "../../../lib/core/libimagerror" }

M lib/core/libimagstore/src/store.rs => lib/core/libimagstore/src/store.rs +15 -14
@@ 18,7 18,6 @@
//

use std::collections::HashMap;
use std::collections::BTreeMap;
use std::ops::Drop;
use std::path::PathBuf;
use std::result::Result as RResult;


@@ 774,11 773,13 @@ impl Entry {
    ///
    /// This function should be used to get a new Header, as the default header may change. Via
    /// this function, compatibility is ensured.
    pub fn default_header() -> Value { // BTreeMap<String, Value>
        let mut m = BTreeMap::new();
    pub fn default_header() -> Value { // Map<String, Value>
        use toml::map::Map;

        let mut m = Map::new();

        m.insert(String::from("imag"), {
            let mut imag_map = BTreeMap::<String, Value>::new();
            let mut imag_map = Map::new();

            imag_map.insert(String::from("version"),
                Value::String(String::from(env!("CARGO_PKG_VERSION"))));


@@ 930,12 931,12 @@ fn has_imag_version_in_main_section(t: &Value) -> Result<bool> {
mod test {
    extern crate env_logger;

    use std::collections::BTreeMap;
    use crate::storeid::StoreId;
    use crate::store::has_main_section;
    use crate::store::has_imag_version_in_main_section;

    use toml::Value;
    use toml::map::Map;

    fn setup_logging() {
        let _ = env_logger::try_init();


@@ 943,15 944,15 @@ mod test {

    #[test]
    fn test_imag_section() {
        let mut map = BTreeMap::new();
        map.insert("imag".into(), Value::Table(BTreeMap::new()));
        let mut map = Map::new();
        map.insert("imag".into(), Value::Table(Map::new()));

        assert!(has_main_section(&Value::Table(map)).unwrap());
    }

    #[test]
    fn test_imag_abscent_main_section() {
        let mut map = BTreeMap::new();
        let mut map = Map::new();
        map.insert("not_imag".into(), Value::Boolean(false));

        assert!(has_main_section(&Value::Table(map)).is_err());


@@ 959,16 960,16 @@ mod test {

    #[test]
    fn test_main_section_without_version() {
        let mut map = BTreeMap::new();
        map.insert("imag".into(), Value::Table(BTreeMap::new()));
        let mut map = Map::new();
        map.insert("imag".into(), Value::Table(Map::new()));

        assert!(has_imag_version_in_main_section(&Value::Table(map)).is_err());
    }

    #[test]
    fn test_main_section_with_version() {
        let mut map = BTreeMap::new();
        let mut sub = BTreeMap::new();
        let mut map = Map::new();
        let mut sub = Map::new();
        sub.insert("version".into(), Value::String("0.0.0".into()));
        map.insert("imag".into(), Value::Table(sub));



@@ 977,8 978,8 @@ mod test {

    #[test]
    fn test_main_section_with_version_in_wrong_type() {
        let mut map = BTreeMap::new();
        let mut sub = BTreeMap::new();
        let mut map = Map::new();
        let mut sub = Map::new();
        sub.insert("version".into(), Value::Boolean(false));
        map.insert("imag".into(), Value::Table(sub));


M lib/domain/libimagcontact/Cargo.toml => lib/domain/libimagcontact/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
failure      = "0.1"
log          = "0.4"
toml         = "0.5"
toml-query   = "0.8"
toml-query   = "0.9"
vobject      = "0.7"
uuid         = "0.7"
serde        = "1"

M lib/domain/libimagdiary/Cargo.toml => lib/domain/libimagdiary/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
chrono = "0.4"
log = "0.4.0"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
itertools = "0.7"
failure = "0.1"
filters = "0.3"

M lib/domain/libimaghabit/Cargo.toml => lib/domain/libimaghabit/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
chrono = "0.4"
log = "0.4"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
kairos     = "0.3"
failure    = "0.1"


M lib/domain/libimaglog/Cargo.toml => lib/domain/libimaglog/Cargo.toml +1 -1
@@ 21,7 21,7 @@ maintenance                       = { status     = "actively-developed" }

[dependencies]
toml       = "0.5"
toml-query = "0.8"
toml-query = "0.9"
failure    = "0.1"

libimagstore     = { version = "0.10.0", path = "../../../lib/core/libimagstore" }

M lib/domain/libimagmail/Cargo.toml => lib/domain/libimagmail/Cargo.toml +1 -1
@@ 22,7 22,7 @@ maintenance                       = { status     = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
mailparse = "0.6.5"
filters = "0.3"
failure = "0.1"

M lib/domain/libimagnotes/Cargo.toml => lib/domain/libimagnotes/Cargo.toml +1 -1
@@ 22,7 22,7 @@ maintenance                       = { status     = "actively-developed" }
[dependencies]
log = "0.4.0"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
failure = "0.1"

libimagstore     = { version = "0.10.0", path = "../../../lib/core/libimagstore" }

M lib/domain/libimagtimetrack/Cargo.toml => lib/domain/libimagtimetrack/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
filters = "0.3"
chrono = "0.4"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
lazy_static = "1.2"
is-match = "0.1"
failure  = "0.1"

M lib/domain/libimagtodo/Cargo.toml => lib/domain/libimagtodo/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
task-hookrs = "0.6.0"
uuid = "0.7"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
log = "0.4.0"
serde_json = "1"
failure = "0.1"

M lib/domain/libimagwiki/Cargo.toml => lib/domain/libimagwiki/Cargo.toml +1 -1
@@ 22,7 22,7 @@ maintenance                       = { status     = "actively-developed" }
[dependencies]
log         = "0.4"
toml        = "0.5"
toml-query  = "0.8"
toml-query  = "0.9"
filters     = "0.3"
failure     = "0.1"


M lib/entry/libimagentryannotation/Cargo.toml => lib/entry/libimagentryannotation/Cargo.toml +1 -1
@@ 22,7 22,7 @@ maintenance                       = { status     = "actively-developed" }
[dependencies]
lazy_static = "1.2"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
failure        = "0.1"
failure_derive = "0.1"
uuid           = { version = "0.7", features = ["v4"] }

M lib/entry/libimagentrycategory/Cargo.toml => lib/entry/libimagentrycategory/Cargo.toml +1 -1
@@ 22,7 22,7 @@ maintenance                       = { status     = "actively-developed" }
[dependencies]
log        = "0.4.0"
toml       = "0.5"
toml-query = "0.8"
toml-query = "0.9"
failure    = "0.1"

libimagerror     = { version = "0.10.0", path = "../../../lib/core/libimagerror" }

M lib/entry/libimagentrydatetime/Cargo.toml => lib/entry/libimagentrydatetime/Cargo.toml +1 -1
@@ 21,7 21,7 @@ maintenance                       = { status     = "actively-developed" }

[dependencies]
chrono = "0.4"
toml-query = "0.8"
toml-query = "0.9"
toml = "0.5"
failure = "0.1"


M lib/entry/libimagentryfilter/Cargo.toml => lib/entry/libimagentryfilter/Cargo.toml +1 -1
@@ 26,7 26,7 @@ log = "0.4.0"
regex = "1"
semver = "0.9"
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
failure        = "0.1"
failure_derive = "0.1"


M lib/entry/libimagentrygps/Cargo.toml => lib/entry/libimagentrygps/Cargo.toml +1 -1
@@ 21,7 21,7 @@ maintenance                       = { status     = "actively-developed" }

[dependencies]
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
serde_derive = "1"
serde = "1"
failure        = "0.1"

M lib/entry/libimagentrylink/Cargo.toml => lib/entry/libimagentrylink/Cargo.toml +1 -1
@@ 27,7 27,7 @@ url = "1.5"
sha-1 = "0.7"
hex = "0.3"
is-match = "0.1"
toml-query = "0.8"
toml-query = "0.9"
failure        = "0.1"
failure_derive = "0.1"


M lib/entry/libimagentryref/Cargo.toml => lib/entry/libimagentryref/Cargo.toml +1 -3
@@ 34,11 34,9 @@ libimagrt        = { version = "0.10.0", path = "../../../lib/core/libimagrt" }
libimagentryutil = { version = "0.10.0", path = "../../../lib/entry/libimagentryutil" }

[dependencies.toml-query]
#version          = "0.8"
version          = "0.9"
default-features = false
features         = ["typed"]
git              = "https://github.com/matthiasbeyer/toml-query"
branch           = "master"

[dev-dependencies]
env_logger = "0.5"

M lib/entry/libimagentrytag/Cargo.toml => lib/entry/libimagentrytag/Cargo.toml +1 -1
@@ 26,7 26,7 @@ toml = "0.5"
itertools = "0.7"
is-match = "0.1"
filters = "0.3"
toml-query = "0.8"
toml-query = "0.9"
failure    = "0.1"

libimagstore = { version = "0.10.0", path = "../../../lib/core/libimagstore" }

M lib/entry/libimagentryutil/Cargo.toml => lib/entry/libimagentryutil/Cargo.toml +1 -1
@@ 21,7 21,7 @@ maintenance                       = { status     = "actively-developed" }

[dependencies]
toml = "0.5"
toml-query = "0.8"
toml-query = "0.9"
filters = "0.3"
failure = "0.1"
log = "0.4"