Commit graph

5608 commits

Author SHA1 Message Date
3b0b9c8d7b Update dependency: walkdir 1 -> 2 2018-09-30 15:04:29 +02:00
879dc25316 Merge branch 'coc'
I hope that we will never need a COC, but better have one in place
rather than not.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-09-27 16:43:57 +02:00
8ab5f55074 Merge branch 'optimize-travis'
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-09-27 16:43:33 +02:00
6b8c29163a
Merge pull request #1505 from matthiasbeyer/off-of-github
Update templates with "off-of-github" notice
2018-09-27 16:41:30 +02:00
01c5625706
Merge pull request #1504 from matthiasbeyer/dependency-update
Dependency update
2018-09-27 16:36:49 +02:00
89059bb7da Fix: Use VcardBuilder instead of Vcard itself
The current implementation does not panic on VcardBuilder::build(), so
we unwrap() that directly.

Should be fixed in future versions of either rust-vobject or here, so
that we error appropriately.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-09-27 15:05:45 +02:00
d9e4eaad3c Update kairos to master branch
Because of the new error-chain version which kairos can depend on, for
which kairos is not yet released.
2018-09-27 15:05:45 +02:00
1fa9b86531 Update dependency: lazy_static: 0.2 -> 1 2018-09-27 15:05:45 +02:00
e838f0d0e7 Update dependency: handlebars: 0.29.0 -> 1.0 2018-09-27 15:05:45 +02:00
f97d9e0d96 Temporarily set vobject to custom fork until we have a new release 2018-09-27 15:05:45 +02:00
946d9891e4 Update dependency: vobject: 0.{4,5} -> 0.6 2018-09-27 15:05:45 +02:00
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
c65e73acc8 Update dependency: kairos: 0.1 -> 0.2 2018-09-27 15:05:45 +02:00
abf6a3c384 Update dependency: handlebars: 0.29.0 -> 1.0 2018-09-27 15:05:45 +02:00
764a019817 Update dependency: log: 0.3 -> 0.4 2018-09-27 15:05:45 +02:00
3d12998603 Update dependency: toml-query: 0.6 -> 0.7 2018-09-27 15:05:44 +02:00
0a7afee454 Update dependency: error-chain: 0.11 -> 0.12 2018-09-27 15:05:25 +02:00
85c0b01fce Remove ISSUE_TEMPLATE as we're closing issues at github 2018-09-27 13:30:52 +02:00
9bce68b1bf
Merge pull request #1494 from matthiasbeyer/libimagstore/optimize-backend-iterator
Optimize the Store::entries() interface
2018-09-27 13:03:57 +02:00
d4872f6da3 Optimize the Store::entries() interface
The previous iterator was implemented to simply fetch _all_ pathes from
the filesystem, no matter what.

With this implementation, this changes. The iterator now has
functionality to optimize the iteration, if only a subdirectory of the
store is required, for example `$STORE/foo`.

This is done via functionality where the underlying iterator gets
altered.

First of all, the interface was changed to return a `Entries` object,
which itself only covers the libimagstore-internal `PathIterator` type.
This type was changed so that the backend implementation provides an
"PathIterBuilder`, which builds the actual iterator object for the
`PathIterator` type.

The intermediate `StoreIdConstructingIterator` was merged into
`PathIterator` for simplicity.

The `Entries` type got functionality similar to the
`StoreIdIteratorWithStore` type for easier transition to the new API.
This should probably be removed at a later point, though.

As the `walkdir::WalkDir` type is not as nice as it could be, iterators
for two collections in the store could be built like this (untested):

    store
        .entries()?
        .in_collection("foo")
        .chain(store.entries()?.in_collection("bar"))

Functionality to exclude subdirectories is not possible with the current
`walkdir::WalkDir` implementation and has to be done during iteration,
with filtering (as usual).

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-09-27 12:19:18 +02:00
d59dca1a23 Add StoreIdIterator::with_store() 2018-09-27 12:19:18 +02:00
df9e5d56ee Optimize travis caching for faster builds
According to [0] these new settings might help to optimize build times
on travis.

Lets see what happens.

[0]: https://levans.fr/rust_travis_cache.html

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-09-27 10:48:16 +02:00
9ff075bb23 Add Code of Conduct 2018-09-27 10:18:42 +02:00
c791977aab
Merge pull request #1506 from matthiasbeyer/minor
Minor
2018-09-27 09:53:31 +02:00
ccbc2b2672
Merge pull request #1478 from matthiasbeyer/imag-diagnostics/progressbar
imag-diagnostics: Add a progressbar to the command
2018-09-27 08:48:22 +02:00
6bf49aa6b5 Fix: 'imag-contact show' should increase output counter 2018-09-27 08:09:39 +02:00
6a81c0afd1
Merge pull request #1507 from matthiasbeyer/update-rust
Update rust compiler versions
2018-09-27 07:53:48 +02:00
6f768fe4ad Add a progressbar to the command
Note: characters in config have to be escaped.
2018-09-27 07:40:10 +02:00
430186799b Remove store flush caching as it is not necessary anymore 2018-09-27 07:31:47 +02:00
1fdb90bc97 Update rust compiler versions 2018-09-26 16:26:27 +02:00
d12a35c84f Update templates with "off-of-github" notice 2018-08-26 04:25:38 +02:00
3a768b42de travis: Turn on email notifications
Because we do not use github for development anymore, but still for
travis, we enable notifications so we know whether our builds succeed

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
dc49b2265c Fix: Binary name
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
d2bf1751ac Fix: Binary name
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
9507db6d8e Fix: Binary name
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
ab32f21333 Fix: Binary name
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
2fa5b2f4bd Add script to check whether binaries are named correctly
It is a simple approach but it works: Read the name of the binary from
the Cargo.toml file and check whether the name appears in the path.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-26 04:24:57 +02:00
ea77faeae2 imagrc: Abbreviating is supported, remove old comment and update contact.list_format 2018-08-26 04:24:57 +02:00
b5c73d9c19 doc: Specify how imag-mail should look like 2018-08-26 04:24:57 +02:00
f4e0c1c5eb doc: Add more planned commands for imag-mail 2018-08-26 04:24:57 +02:00
104cbfbfa7 doc: Format for line length 2018-08-26 04:24:57 +02:00
6e56f469ae More verbose erroring in test 2018-08-26 04:24:57 +02:00
5b82d53fd2
Merge pull request #1502 from matthiasbeyer/libimagstore/fs-backend-no-fd-holding
Optimize backend impl to not hold open files
2018-08-26 04:16:04 +02:00
8b508fe4c3 Optimize backend impl to not hold open files
This patch changes the filesystem-backend implementation of libimagstore
to open files on each read/write rather than holding the file handle in
memory at all times.

Whenever a lot of imag store entries are read into memory, the imag
process may ran out of file descriptors. With this patch applied, a
`Store::get()` call on an entry which is not yet in the store cache
would cause the file to be read, but the FD being dropped after that.
Likewise, a `Store::update()` (which is also called if the imag entry is
dropped) would re-open the file on the filesystem and write the contents
from the imag store cache back to the file.

With this patch, opening hundrets or thousands of imag entries should be
no problem anymore, only the available memory should be a limit then.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-11 17:50:22 +02:00
f2916aa51a
Merge pull request #1501 from matthiasbeyer/update-travis-rust
Update rust version
2018-08-02 20:52:52 +02:00
e960f7d465 Update rust version
As a dependency apparently requires rust 1.26 as minimum version, we
bump here.

Rust 1.28 is out already, so no problems with that!
2018-08-02 19:59:56 +02:00
acdc1e84bc
Merge pull request #1495 from matthiasbeyer/imag-diary/fix-missing-header
Imag diary/fix missing header
2018-07-27 20:10:59 +02:00
b896bc2657 Fix: Do not create entries with Store::retrieve()
This patch fixes a bug where entries where created with
`Store::retrieve()` rather than with the API from libimagdiary.
This caused headers to be missing.

Now, the CLI is parsed for the values passed and a NaiveDateTime object
is crafted from that, which is then passed to libimagdiary.
2018-07-20 01:37:36 +02:00
22d63f0946 Add functionality to create entry at a certain time 2018-07-20 01:37:36 +02:00
2a62b6dffb
Merge pull request #1496 from matthiasbeyer/libimagstore/fix-use-backend
libimagstore: fix use backend
2018-07-20 01:35:20 +02:00