Commit Graph

1163 Commits

Author SHA1 Message Date
Matthias Beyer 0610f0756a Add dep: crossbeam = 0.2.8 2016-03-16 16:46:52 +01:00
Matthias Beyer 3421e8d4d9 Add HookExecutionError error kind 2016-03-16 16:46:52 +01:00
Matthias Beyer 1c40be78a9 Add HookAccessor types for accessing mutable/nonmutable hook calling in a generic way 2016-03-16 16:46:52 +01:00
Matthias Beyer c9bca51273 doc: Add documentation for the Hook system 2016-03-16 16:46:51 +01:00
Matthias Beyer e1414beb8d Impl Into<HookError> for error kinds to convert errors in a simple way 2016-03-16 16:46:51 +01:00
Matthias Beyer 57831dceb0 Add HookErrorKind enums for Pre and Post errors 2016-03-16 16:46:51 +01:00
Matthias Beyer d7733aa13a Make hooks configurable
This introduces the Configurable trait and abstracts the
dependency-traits for each trait over a generic "Hook" trait, which
requires Configurable and Debug to be implemented, but has no own
functions.

Configuring is done _without_ the Runtime object, so we can be sure that
the hooks do not have access to the store object.
2016-03-16 16:46:51 +01:00
Matthias Beyer d9a4512821 Add debug output for hook exec functions 2016-03-16 16:46:51 +01:00
Matthias Beyer da3554d98e Add debug output for hook register functions 2016-03-16 16:46:51 +01:00
Matthias Beyer 6af5be15ad Hooks must implement Debug 2016-03-16 16:46:51 +01:00
Matthias Beyer bb0e7e2468 Implement: execute_post_delete_hooks() 2016-03-16 16:46:51 +01:00
Matthias Beyer f703e8a4cd Implement: execute_post_update_hooks() 2016-03-16 16:46:51 +01:00
Matthias Beyer 7014256407 Implement: execute_post_retrieve_hooks() 2016-03-16 16:46:51 +01:00
Matthias Beyer 5831d3bc7b Implement: execute_post_create_hooks() 2016-03-16 16:46:51 +01:00
Matthias Beyer 196be30d91 Implement: execute_post_read_hooks() 2016-03-16 16:46:51 +01:00
Matthias Beyer 09acddaef9 Implement: execute_pre_delete_hooks() 2016-03-16 16:46:51 +01:00
Matthias Beyer 5aa663987b Implement: execute_pre_update_hooks() 2016-03-16 16:46:51 +01:00
Matthias Beyer 94128f8bcc Implement: execute_pre_retrieve_hooks() 2016-03-16 16:46:50 +01:00
Matthias Beyer 3244b87c7e Implement: execute_pre_create_hooks() 2016-03-16 16:46:50 +01:00
Matthias Beyer 975a2bc8b9 Implement: execute_pre_read_hooks() 2016-03-16 16:46:50 +01:00
Matthias Beyer ac280ba616 Insert pre/post hook execution functions 2016-03-16 16:46:50 +01:00
Matthias Beyer 3cf2588104 Add error types for pre/post hooks 2016-03-16 16:39:39 +01:00
Matthias Beyer 17b1d6c390 Redefine hook trait system 2016-03-16 16:39:39 +01:00
Matthias Beyer 001c80b72d Hook: Add traits which must be implemented for Hook 2016-03-16 16:39:39 +01:00
Matthias Beyer b9127381b8 Add hook registering 2016-03-16 16:39:39 +01:00
Matthias Beyer d99d25a3e1 Add HookRegisterError kind 2016-03-16 16:39:14 +01:00
Matthias Beyer e969b8678e Add hook traits 2016-03-16 16:39:14 +01:00
Matthias Beyer 8c220af300 Merge pull request #193 from matthiasbeyer/imag-counter/init
Imag counter/init
2016-03-16 16:35:46 +01:00
Matthias Beyer 8d234440b5 doc: imag-counter 2016-03-15 15:01:10 +01:00
Matthias Beyer cd6e000be8 trace: Add missing newline 2016-03-12 16:06:10 +01:00
Matthias Beyer 361dec4cec Revert "Check whether the StoreId is inside the store, before doing anything on the FS"
This reverts commit 373502217e.
2016-03-12 16:06:10 +01:00
Matthias Beyer 09ac788e6f imag-counter: init 2016-03-12 16:06:10 +01:00
Matthias Beyer 2bc9f2ec25 libimagcounter: init 2016-03-12 16:06:10 +01:00
Matthias Beyer 9a918c9252 Merge pull request #242 from matthiasbeyer/libimagstore/revert-id_in_store-check
Revert "Check whether the StoreId is inside the store, before doing a…
2016-03-11 16:02:11 +01:00
Matthias Beyer b53f342fb8 Merge pull request #244 from matthiasbeyer/libimagstore/fix-add_implicit_directory_creating
Fix: implicitely create directories on file saving
2016-03-11 10:56:38 +01:00
Matthias Beyer 6d7065d10e Fix test: StoreId does not start with "/" anymore 2016-03-10 19:12:00 +01:00
Matthias Beyer a9a64d4ab6 Fix: implicitely create directories on file saving 2016-03-10 19:06:27 +01:00
Matthias Beyer a3a09ff4ee Fix store creation of libimagstore
The macro may not prefix the StoreId internal PathBuf with '/', so this
path is not absolute. This way we can introduce `storify_id()` which
creates a proper PathBuf into the store out of our StoreId object.

Does not yet do verification whether the path is inside the store,
actually.
2016-03-10 18:46:26 +01:00
Matthias Beyer 3413646934 Revert "Check whether the StoreId is inside the store, before doing anything on the FS"
This reverts commit 373502217e
as this commit was introducing a bug.

The StoreId type says `/test/example` for a store id path, which is
completely valid, as the root (`/`) is the store itself. The
id_in_store() function assumed that the store-id is the full
(file-system) path to the store entry, which is false.

This commit does not introduce a fix but revert the check.
2016-03-10 18:14:53 +01:00
Matthias Beyer 7dde6c2a56 Merge pull request #235 from matthiasbeyer/libimagstore/update-glob
libimagstore: Update glob 0.2.10 -> 0.2.11
2016-03-07 17:58:27 +01:00
Matthias Beyer df1fd31771 libimagstore: Update glob 0.2.10 -> 0.2.11 2016-03-07 17:46:58 +01:00
Matthias Beyer 501f4f3111 Merge pull request #203 from matthiasbeyer/libimagutil/ismatch-util
Add ismatch!() macro
2016-03-07 17:22:13 +01:00
Matthias Beyer 20201d2358 Merge pull request #210 from matthiasbeyer/doc/libimagutil
Doc/libimagutil
2016-03-07 17:18:50 +01:00
Matthias Beyer 637faf2d66 Merge pull request #219 from matthiasbeyer/doc/add-module-files
Add module files for several modules
2016-03-07 17:14:30 +01:00
Matthias Beyer 71d6008105 Merge pull request #231 from matthiasbeyer/libimagrt/config-in-toml
Switch configuration language to TOML
2016-03-07 11:22:23 +01:00
Matthias Beyer 2fa10067fb Configuration is optional 2016-03-07 10:32:10 +01:00
Matthias Beyer 4f935c8ba1 Merge pull request #233 from matthiasbeyer/libimagstore/entry-header-get-header
EntryHeader: Function to get toml object
2016-03-07 10:29:14 +01:00
Matthias Beyer a02a0f2fde Merge pull request #167 from matthiasbeyer/doc/linking
doc: Add chapter on linking
2016-03-06 11:53:18 +01:00
Matthias Beyer 257fe1880e EntryHeader: Function to get toml object 2016-03-06 11:51:09 +01:00
Matthias Beyer fc46f1a8df doc: imag:// prefix should be optional 2016-03-06 11:18:31 +01:00