Commit graph

56 commits

Author SHA1 Message Date
Paul Beckingham
44dc19e21b TW-1667: hooks: upon failure indicate which hook failed
- Thanks to Daniel Shahaf.
2017-01-16 13:14:08 -05:00
Paul Beckingham
a50e65a134 Copyright update 2017-01-01 12:30:04 -05:00
Paul Beckingham
cdd1c4681d Hooks: C++11 2016-02-03 21:06:49 -05:00
Paul Beckingham
08d5db0b49 Hooks: Removed obsolete methods 2016-01-09 22:38:18 -05:00
Paul Beckingham
641d232dea Copyright: Updated to 2016 2015-12-31 15:06:43 -05:00
Wilhelm Schuermann
04d0c52a43 Hooks: Implement "Hooks v2" API
- All hook scripts now receive key:value pair command line arguments.
- Add only the basics: api, args, command, rc, data.  Possibly more to
  come.
2015-04-01 11:44:37 +02:00
Wilhelm Schuermann
7a64c19641 Resolve most compiler warnings 2015-03-29 22:05:38 +02:00
Paul Beckingham
5a060802e7 Hooks
- It is now an error for a failing hook script to fail to also generate some
  feedback.
- Updated NEWS file to mention stricter hook script controls.
2015-02-14 18:16:32 -05:00
Paul Beckingham
3cce6c23f5 Hooks
- Hooks now verify the expected number of JSON lines emitted by hook scripts.
2015-02-14 15:50:51 -05:00
Paul Beckingham
1cfdfbae52 Hooks
- Removed the ability for hooks to add tasks, or modify tasks that are outside
  the context of the current event. This makes hooks a local mechanism that
  operates only on local changes. Modifications/additions coming in via sync
  command are not processed by hooks.
2015-01-31 17:47:58 -05:00
Tomas Babej
8683574b18 Hooks: Make sure that original task is properly detected
On modify event uses UUID of the original task being modified
to determine which line should be interpreted as modification
of the task.

This was achieved by searching by a substring in a specific JSON
format, which, consenquently, failed on JSON strings of other (valid)
formats.
2015-01-25 10:28:04 -05:00
Paul Beckingham
b7ad091d00 Updated copyright to 2015 2015-01-01 00:00:41 -05:00
Paul Beckingham
719e9d242b Hooks
- Bug due to missing reference & in calls to callHookScript.  Dumbass.
2014-10-18 23:59:40 -04:00
Paul Beckingham
f1639e6862 Hooks
- Revised all event functions to use the new callHookScript method, which is
  now common to all events.
2014-10-18 23:47:32 -04:00
Paul Beckingham
b6be1cdc99 Hooks
- Factored out the code that determines if the JSON output from a hook script is
  actually JSON.
2014-10-18 16:55:26 -04:00
Paul Beckingham
7521dc56e8 Hooks
- Supports 'debug.hooks' configuration setting.
2014-10-06 23:04:44 -04:00
Paul Beckingham
ab72cdad4d Hooks
- Stubbed new ::onAdd and ::onModify interfaces.
2014-09-14 15:42:47 -04:00
Paul Beckingham
7e35508bb4 Hooks
- Added a run-time enable/disable control, for nested add/modify calls.
2014-09-09 23:36:45 -04:00
Paul Beckingham
5ce317bb48 Hooks
- Modified ::onExit to remove the indicator that data was modified. This is not
  supported.
2014-09-07 22:56:28 -04:00
Paul Beckingham
60260fb813 Hooks
- Removed obsolete ::execute method, instead relying on the util.cpp variant.
2014-08-30 23:53:59 -04:00
Paul Beckingham
4ef189d7b6 Hooks
- ::onExit now indicates whether changes were made.
2014-08-09 21:06:16 -04:00
Paul Beckingham
0ffc95e312 Hooks
- Added Hooks::list method to provide a list of known hooks.
2014-05-17 14:20:46 -04:00
Paul Beckingham
c86853fd03 Hooks
- Added helper method ::scripts to filter by event and accessibility.
2014-05-14 17:45:42 -04:00
Paul Beckingham
d30fb54a62 Hooks
- Implemented ::execute to run a command, feed it input, read it's output and
  return the exit status.
2014-05-14 00:03:02 -04:00
Paul Beckingham
631e4176c7 Hooks
- Added ::onAdd.
2014-05-13 22:04:35 -04:00
Paul Beckingham
2f5435c50f Hooks
- Added ::onModify.
- Stubbed out functionality in all three hook methods.
2014-05-13 21:49:56 -04:00
Paul Beckingham
12a2012f20 Hooks
- Scans <rc.data.location>/hooks for files on initialize.
2014-05-13 17:12:30 -04:00
Paul Beckingham
d12c519380 Hooks
- Added ::onExit.
2014-05-13 16:48:26 -04:00
Paul Beckingham
39c476134f Hooks
- Added ::onLaunch.
2014-05-13 16:34:23 -04:00
Paul Beckingham
6cff8d9ff6 Hooks
- Added ::initialize method.
2014-05-13 16:31:27 -04:00
Paul Beckingham
bfb19e0a64 Hooks
- Gutted the Hooks object.
- Commented out on-launch and on-exit triggers.
2014-05-13 16:23:50 -04:00
Paul Beckingham
523dce8f32 Code Cleanup
- Standardized headers.
2014-02-01 14:33:37 -05:00
Paul Beckingham
8ed92ca498 Copyright
- Bumped copyright to 2014, ready for release.
2014-01-01 13:32:22 -05:00
Paul Beckingham
d03c4cda8a Build Error
- Many files were missing an explicit cmake.h include.  Some were not including
  it at all.  Now it's used almost everywhere.

(cherry picked from commit 82ae86979c497e6d1d0c6b2b5a55aa379ec82c98)
2013-06-02 13:57:36 -04:00
Paul Beckingham
773b55d374 Code Cleanup
- Removed L10N define.  It served its purpose.
2013-04-07 23:50:51 -04:00
Federico Hernandez
7db5377d3b Removed the incomplete support for the Lua extensions. 2013-04-02 21:52:13 +02:00
Paul Beckingham
1dccd29643 Copyright 2013
- Updated copyright notices.
2013-03-04 17:47:12 -05:00
Paul Beckingham
6580095002 Copyright
- Year change.
2012-01-02 23:32:10 -05:00
Federico Hernandez
8116c6a103 License
- moving task from GPL to MIT license
  top level src directory
2011-10-08 00:04:01 +02:00
Paul Beckingham
dab06f8672 Code Cleanup
- All objects now use the same convention for naming members.  The
  consistency is a good thing.
2011-08-25 21:54:28 -04:00
Paul Beckingham
8fabffe18c Code Cleanup
- Eliminated '#include "x"' by changing all to '#include <x>'.
2011-05-28 00:19:59 -04:00
Paul Beckingham
f67706c28e L10N
- Added '#define L10N' marker to all source files that are localized.
2011-05-28 00:02:04 -04:00
Paul Beckingham
48eb4757f8 Hooks
- Removed all obsolete hooks, except from commands.cpp, which is being
  worked on in parallel.
- Implemented new on-launch and on-exit unit tests.
2011-04-17 21:09:58 -04:00
Paul Beckingham
17d1e59e29 Hooks
- Eliminated the concept of list hooks.
- Eliminated unnecessary API functions.
2011-04-13 23:20:55 -04:00
Federico Hernandez
4de854a3c3 CMake
- zapped autoh*ll from build system. No more pain.
2011-03-04 03:58:55 +01:00
Paul Beckingham
462caf5bd4 Copyright
- Updated copyright to 2011.
2010-12-31 22:03:05 -05:00
Federico Hernandez
02dcdf83b5 Fixed auto.h includes to point to top level dir for cmake 2010-12-28 21:12:30 +01:00
Paul Beckingham
31cf470cc8 Copyright
- Made all the copyright notices consistent.  It was bothering me.
2010-11-27 09:13:09 -05:00
Paul Beckingham
44fe227595 Product Name Change
- Converted all (appropriate) uses of 'task' to 'taskwarrior'.
2010-08-21 12:31:00 -04:00
Paul Beckingham
d87e7c6934 Performance
- Switched Hooks to a hash lookup, instead of linearly comparison.
2010-07-12 20:17:59 -04:00