Matthias Beyer
2185d44011
Update all dependencies
...
This patch updates all dependencies but not "nom".
Done with `cargo upgrade --all` and manual editing.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-06-30 16:44:23 +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
f540a317b0
Add more context in error messages
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-05-18 00:55:10 +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
427eac76fe
Add Ref::get_path_with_basepath_setting()
...
This function can be used to override the basepath setting from the
header of the entry so that another basepath is used for looking
up/constructing the actual filepath.
This might come in handy at some point.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-04-22 14:40:07 +02:00
Matthias Beyer
cf234437d7
Implement Partial for Config
...
With this implemented, we can fetch the appropriate configuration easily
from the configuration.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-04-22 13:06:26 +02:00
Matthias Beyer
2854e88dcc
Rename: "ref.collection" to "ref.basepath"
...
The setting in the header should reflect the name of the setting in the
configuration file, for a better user experience.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-04-22 13:06:26 +02:00
Matthias Beyer
7ae2d926cc
Use toml-query master branch during development
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-04-22 13:06:26 +02:00
Matthias Beyer
d32f41aeab
Outsource hashing itself so that we can re-use it
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-22 11:23:57 +01:00
Matthias Beyer
b2fbf1e462
Add debug and trace output
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-20 23:14:43 +01: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
0a62548173
Add function to get relative file path
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-20 14:43:21 +01:00
Matthias Beyer
ed862db76f
Fix: Strip the prefix of the path
...
The previous implementation did not strip the prefix of the "relpath"
header value, which resulted in the whole path being in the header,
which is obviously wrong.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-20 12:31:37 +01:00
Matthias Beyer
04e006154c
Fix: Use "ref.relpath" as path to header value
...
The header value for the relative path is at "ref.relpath". This fixes
the wrong selector.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-19 21:51:44 +01:00
Matthias Beyer
db7121ccba
Rewrite library
...
* Remove old code
* Rewrite with tests
This implements a fassade pattern for ref library
With the fassade, we can specify the hasher in a rather easy way, which
is not possible with default generics for traits.
The "default" part in "default generic type" is not properly implemented
yet (as visible in the tests), as I don't know how to realize this.
For simplicity, the `hasher` module exports a `default` module with a
`DefaultHasher` type, which resolves to the `Sha1Hasher`.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-17 11:09:48 +01:00
Matthias Beyer
642702b724
Rewrite: StoreId::new_baseless() -> StoreId::new()
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-02-15 20:53:28 +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
9b48dc27cd
libimagentryref: Move from error-chain to failure
...
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-10-30 18:46:28 +01:00
Matthias Beyer
3d12998603
Update dependency: toml-query: 0.6 -> 0.7
2018-09-27 15:05:44 +02:00
Matthias Beyer
0a7afee454
Update dependency: error-chain: 0.11 -> 0.12
2018-09-27 15:05:25 +02:00
newpavlov
04b3e7243d
replaced rust-crypto with RustCrypto crates
2018-07-18 19:51:05 +03:00
Matthias Beyer
664edc7943
Update version string: 0.8.0 -> 0.9.0
2018-05-09 11:39:33 +02:00
Matthias Beyer
d2dceb6640
Update version numbers: 0.7.0 -> 0.8.0
2018-04-19 10:05:53 +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
731b97cccb
Fix: Pass the right path variable here
...
The ref library passed the wrong variable as path which caused the
setting in the entries to be wrong.
This patch fixes this.
2018-04-13 14:06:15 +02:00
Matthias Beyer
6f33e4e322
Add debug output
2018-03-23 10:05:58 +01:00
Matthias Beyer
3d7be3a1e0
Merge pull request #1349 from matthiasbeyer/libimagentryref/fixes
...
Fix: Allocating of buffer does not work as expected with Vec::with_ca…
2018-03-21 18:04:37 +01:00
Matthias Beyer
d2eb4936b1
Fix: Allocating of buffer does not work as expected with Vec::with_capacity()
2018-03-20 16:51:19 +01:00
Matthias Beyer
5ceeacd6c8
Provide Ref::make_ref() for making a ref out of an existing entry
2018-03-19 14:18:02 +01:00
Matthias Beyer
027c4b3287
Remove usage of libimagentrylist
2018-02-20 15:02:46 +01:00
Matthias Beyer
1153fb180b
Add function to delete a reference header entry
2018-02-19 12:14:32 +01:00
Matthias Beyer
fd6a7f877a
Remove private macro
2018-02-19 12:14:32 +01:00
Matthias Beyer
a1a85f40d0
Add default generators
2018-02-19 12:14:32 +01:00
Matthias Beyer
2328c8b2b0
Take AsRef<str> rather than &String
2018-02-19 12:14:32 +01:00
Matthias Beyer
cbb47cffcb
Implement Ref functions
2018-02-19 12:14:32 +01:00
Matthias Beyer
ed69fd4b35
Enrich error types
2018-02-19 12:14:32 +01:00
Matthias Beyer
81a8826740
Add impl for RefStore::{get,create,retrieve}_ref()
2018-02-19 12:14:32 +01:00
Matthias Beyer
1014f58cfc
Rewrite interface
2018-02-19 12:14:32 +01:00
Matthias Beyer
73af121882
Remove old concepts
2018-02-19 12:14:32 +01:00
Matthias Beyer
30d2c28a22
Update version string: 0.6.0 -> 0.7.0
2018-02-11 14:22:24 +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
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
a34cae03e5
libimagentryref: 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