App-Dochazka-REST

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

- t/310-dispatch-top-get.t: add test case for 'bugreport' resource
- t/312-dispatch-top-put.t: add test case "set meta parameter via REST
  call"

0.191  2014-10-20 16:53 CEST
- Hackweek Day 1
- Build.PL: depend on latest version of App::Dochazka
- config/dispatch/dispatch_Employee_Config.pm: use refactored employee
  targets
- config/sql/employee_Config.pm: do not include 'priv' and 'schedule' in
  employee objects
- Dispatch/Employee.pm: refactor employee PUT and POST targets
- Model/Employee.pm: add 'overlay' method
- Resource.pm: instead of having 'priv' property directly in the current
  employee hash, we make a separate 'current_priv' property for it; 
  push the HTTP method onto the context hash ASAP (in service_available)
- t/316-dispatch-employee-post.t: add some "real" tests involving inserting
  and update employee objects
- t/317-dispatch-employee-put.t: fix broken tests

0.192  2014-10-20 22:15 CEST
- dispatch/dispatch_Employee_Config.pm: resources into alphabetical order; add
  'employee/current/priv' resource
- dispatch/dispatch_Message_en.conf, Dispatch/Employee.pm: add
  'employee/current/priv' resource
- Model/Shared.pm: add some log messages in course of debugging a problem with
  App::Dochazka::CLI

0.193  2014-10-21 08:35 CEST
- t/: fix accumulated brokenness in data model tests
- t/315-dispatch-employee-get.t: clean up comments and add a test case

0.194  2014-10-21 09:21 CEST
- Resource.pm: if method is GET and result is "No records found", return
  404 instead of 200 + status object
- t/: adapt tests to this change

0.195  2014-10-21 10:51 CEST
- Model/Employee.pm->noof_employees_by_priv: if $priv is not a valid
  privlevel, return 'OK' status + status code DISPATCH_NO_RECORDS_FOUND
  to trigger a 404 Not Found response; also, put 'count' property in the
  payload where it belongs
- t/315-dispatch-employee-get.t: adapt existing test case

0.196  2014-10-21 11:38 CEST
- config/dispatch_Top_Config.pm: make "echo" work with POST only; put
  resources in alphabetical order
- t/: remove 'echo' tests from top-level PUT and DELETE units

0.197  2014-10-21 11:47 CEST
- work on development-checklist
- t/: standardize method order (GET, PUT, POST, DELETE); adapt units

0.198  2014-10-21 12:10 CEST
- Dispatch.pm: document all target subroutines; put into alphabetical order
  by resource name/path

0.199  2014-10-21 16:31 CEST
- Hackweek Day 2
- dispatch_Message_en.conf: add DISPATCH_RESOURCE_NOT_IMPLEMENTED
- dispatch_Top_Config.pm: implement 'not_implemented' resource
- Dispatch.pm: implement 'not_implemented' resource, alphabetical order
  tweak
- t/: add missing top-level dispatch tests
- new ../development-checklist chart to clarify and streamline
  resource-implementation workflow

0.200  2014-10-21 22:29 CEST
- ../development-checklist: finish implementing top-level resources
- Dispatch.pm: when getting site and meta params, show file and line
  number along with other metadata; tweak resource documentation
- t/: some tests failing due to bug in App::CELL::Config->get_param_meta

0.201  2014-10-22 08:30 CEST
- Build.PL: require App::CELL 0.200 for bug fix
- t/: adjust two tests now that PUT metaparam/:param and PUT siteparam/:param
  are assigning the request body to the parameter directly

0.202  2014-10-22 16:47 CEST
- Hackweek Day 3
- lots of refinements to (plus documentation and test cases for) employee
  resources
- implement DELETE support for employee resources
- eliminate problematic "short-cut" 'employee/:nick' and 'employee/:eid'
  resources
- make it possible to update an employee property to null
- eliminate problematic 'overlay' method in Model/Employee.pm
- improve debug message in Resource.pm
- add negative and otherwise pathological test cases

0.203  2014-10-22 17:15 CEST
- t/317-dispatch-employee-post.t: got tests running again

0.204  2014-10-23 10:57 CEST
- t/: figure out how to run tests using 'prove -r'; make a 't/dispatch/'
  directory for dispatch tests; merge all top-level dispatch tests into a
  single file 't/dispatch/top.t'

0.205  2014-10-23 14:02 CEST
- Hackweek Day 4
- Build.PL: make Module::Build walk t/ directory recursively
- REST_MetaConfig.pm: make sure META_DOCHAZKA_VALID_RESOURCES is
  initialized to an empty hashref
- add on-line documentation infrastructure
- config/dispatch/dispatch_Top_Config.pm: add HTML documentation strings
  to all the top-level resources; add 'docu' resource definition
- Dispatch.pm: remove POD sections corresponding to the HTML documentation
  strings added to resource definition file; add target subroutine
  for 'docu' resource; use heredoc in _forbidden
- Resource.pm: enable validations to be specified in resource definitions
  (see Path::Router) -- untested; during path/router initialization build
  up META_DOCHAZKA_VALID_RESOURCES (hash of valid resources); push
  'documentation' property onto context
- t/dispatch/top.t: add tests for 'docu' resource

0.206  2014-10-23 14:31 CEST
- config/dispatch/dispatch_Employee_Config.pm: add HTML documentation
  strings to all the employee resources
- Dispatch/Employee.pm: remove POD documentation that has been moved to the
  resource definition file
- find bug "POST docu" returns same string, no matter which resource is
  specified (should return the documentation string stipulated for the

Changes  view on Meta::CPAN

- t/dispatch/top.t: run docu_check on each top-level resource

0.208  2014-10-24 08:43 CEST
- convert portion of employee dispatch tests to new structure

0.209  2014-10-24 10:49 CEST
- complete development workflow for employee resources
- dispatch_Employee_Config.pm: add missing documentation
- Dispatch/Employee.pm: fix bug "DELETE employee/nick/:nick actually
  inserts a new employee if :nick not found"
- t/: continue migrating dispatch tests to new structure; disable old
  units so ./Build test doesn't run them; add new unit
  t/dispatch/employee/nick.t

0.210  2014-10-24 15:33 CEST
- Hackweek Day 5
- implement privhistory resources using new development workflow
- merge 'privhistory/current' and 'privhistory/current/:tsrange' into a
  single resource 'privhistory/current/?:tsrange'
- dispatch/dispatch_Privhistory_Config.pm: put resources in alphabetical
  order; document resources; add more supported methods
- t/dispatch/privhistory: add privhistory tests in new structure
- Dispatch/Privhistory.pm: put targets in order according to their
  corresponding resources; rename _get_nick and _get_eid to _nick and _eid,
  respectively, and expand them to support PUT and DELETE
- Model/Privhistory.pm: add some debug messages

0.211  2014-10-24 22:40 CEST
- Hackweek Day 5, continued
- config/sql/dbinit_Config.pm: add UNIQUE (eid, effective) constraint to
  privhistory table to avoid duplicate entries in a given employee's
  privhistory listing
- dispatch_Message_en.conf: add DISPATCH_PRIVHISTORY_COULD_NOT_SPAWN
- Dispatch/Privhistory.pm: implement support for PUT and DELETE requests in
  _eid and _nick targets
- Model/Employee.pm: fix bug "get 500 Server Error when I send a request for
  bogus resource 'privhistory/eid/asdf'"
- t/dispatch/privhistory/: add quite a few tests

0.212  2014-10-25 23:23 CEST
- update MANIFEST to current state
- change 'privhistory' to 'priv'
- add new 'priv/current/?:ts' resource
- t/: start adapting tests

0.213  2014-10-26 22:36 CET
- config/dispatch/priv_Config.pm: add "priv/current/eid/:eid/?:ts" and
  "priv/current/nick/:nick/?:ts" resources; unclear how privhistory records
  will be added and deleted
- dispatch_Message_en.conf: remove duplicate message
- Dispatch/Privhistory.pm: repurpose _current_priv so it works for the new
  resources added in this commit; rename _eid and _nick to _history_eid and
  _history_nick, respectively

0.214  2014-10-27 13:12 CET
- config/dispatch/top_Config.pm: add 'cli' property to all top-level
  resource definitions; put into alphabetical order; rename 'privhistory'
  to 'priv'
- Dispatch.pm: make 'docu' resource return "resource => ''" when called
  without an argument, instead of "resource => undef"; make
  "not_implemented" resource include HTTP method in payload

0.215  2014-10-27 13:39 CET
- config/dispatch/employee_Config.pm, config/dispatch/priv_Config.pm: add
  'cli' properties to all resource definitions
- ../development-checklist: complete manual CLI testing of all top-level
  and employee resources

0.216  2014-10-27 14:29 CET
- config/dispatch/priv_Config.pm: fix 'priv/eid/:eid/?:ts' and
  'priv/nick/:nick/?:ts' resource definitions
- config/dispatch_Message_en.conf: add DISPATCH_EMPLOYEE_CURRENT_PRIV_AT_TIMESTAMP
- Dispatch/Privhistory.pm: fix bugs in _current_priv
- Model/Shared.pm: fix bugs in priv_by_eid and _st_by_eid

0.217  2014-10-27 17:53 CET
- config/dispatch/priv_Config.pm: eliminate duplicate 'priv' resource
  definition that was giving me grief; fix two wrong ACL profiles;
  eliminate 'priv/history/?:tsrange' and replace it with
  'priv/history/current/?:tsrange'; add 'priv/history/phid/:phid' resource
- config/dispatch/top_Config.pm: tweak resource documentation
- dispatch_Message_en.conf: tweak priv-related messages
- Dispatch/Privhistory.pm: tweak priv-related messages, add
  'priv/history/phid/:phid' resource target
- t/: add new tests; adapt existing tests to current state

0.218  2014-10-27 20:31 CET
- config/dispatch_Message_en.conf: tweak bad/missing parameter message
- Dispatch/Employee.pm: handle non-integer EID values more gracefully
- Test.pm: add descriptions to docu_check tests
- t/dispatch/employee/eid.t: add descriptions to tests; add some new "negative"
  test cases

0.219  2014-10-27 22:33 CET
- t/: clean up units; merge all employee tests into a single unit (employee.t);
  merge all priv tests into a single unit (priv.t)
- config/dispatch/priv_Config.pm: alphabetical order tweak
- Test.pm: export all the test functions (EXPORT instead of EXPORT_OK); bring
  in create_testing_employee and delete_testing_employee
- STATUS: all top-level, employee, and priv resources implemented and tested,
  ready to start work on activity, interval, etc. resources

0.220  2014-10-28 09:35 CET
- MANIFEST: add Dispatch/Activity.pm
- config/dispatch/activity_Config.pm: add 'activity/all' resource definition
- config/dispatch/top_Config.pm: add 'activity' resource definition; rename
  '_not_implemented' target to 'not_implemented' because we are now exporting
  it from Dispatch/Shared.pm
- config/dispatch_Config.pm: uncomment DISPATCH_RESOURCES_ACTIVITY
- Dispatch.pm: import not_implemented target from Dispatch/Shared.pm
- Dispatch/Employee.pm: fix debug messages
- Dispatch/Privhistory.pm: import priv_by_eid from the right module
- Dispatch/Shared.pm: export 'not_implemented' routine
- Resource.pm: add 'use App::Dochazka::REST::Dispatch::Activity' so activity
  targets will work

0.221  2014-10-28 12:08 CET
- MANIFEST: add t/dispatch/activity.t 
- config/sql/: add 'SQL_ACTIVITY_SELECT_ALL'; add 'disabled'
  field to 'activities' table; adapt SQL statements where appropriate
- t/dispatch/activity.t: new unit for activity dispatch tests

0.222  2014-10-28 21:51 CET
- config/dispatch/activity_Config.pm: activate 'activity/all' resource for GET
  requests
- config/sql/activity_Config.pm: divide 'activity/all' SELECT into two variants
  (with and without disabled activities)
- Dispatch/Activity.pm: implement _get_all_without_disabled and
  _get_all_including_disabled dispatch targets
- Model/Activity.pm: eliminate superfluous 'use' lines; implement
  'get_all_activities' routine
- t/dispatch/activity.t: add tests for GET activity/all

0.223  2014-10-28 22:37 CET
- REST_MetaConfig.pm: add META_DOCHAZKA_RESOURCE_ACLS
- config/dispatch/top_Config.pm: bring comments up-to-date
- Dispatch.pm: modify "_help_post" ('docu' dispatch target) to display ACL
  profile of queried resource as well as its documentation
- Resource.pm: modify path initializer to populate META_DOCHAZKA_RESOURCE_ACLS

0.224  2014-10-29 08:07 CET
- activity_Config.pm: add 'activity/all/disabled' resource definition
- Dispatch/Activity.pm: comment out 'get_all' target
- t/dispatch/activity.t: add basic tests for 'activity/all/disabled'; add FIXME
  lines for future tests

0.225  2014-10-29 09:33 CET
- dispatch/activity_Config.pm: add 'activity/aid/:aid' resource definition
- t/dispatch/activity.t: add initial tests for 'activity/aid/:aid'

0.226  2014-10-29 10:34 CET
- Build.PL: require 0.172 of App::Dochazka (for 'disabled' field)
- config/sql/activity_Config.pm: make SELECTs return disabled field
- t/dispatch/activity.t: add some tests for 'activity/aid/:aid' resource (GET)
- Dispatch/Activity.pm: implement 'activity/aid/:aid' resource for GET requests

0.227  2014-10-29 13:54 CET
- Dispatch/{Employee,Activity}.pm: fix bug where PUT request with request body
  consisting of just a number or just a string (e.g. '9', or '"asdf"') was
  causing the server to vomit 500
- activity_Config.pm: support PUT and DELETE requests for 'activity/aid/:aid';
  add resource definition for 'activity/code/:code'
- dispatch_Message_en.conf: add DISPATCH_CODE_DOES_NOT_EXIST
- Dispatch/Activity.pm: support PUT and DELETE requests for 'activity/aid/:aid';
  add support for 'activity/code/:code'
- Model/Activity.pm: fix 'update' routine to support the new 'disabled' field
- Model/Shared.pm: make a note in 'cud' routine that order of attrs must match
  the '?' characters in the SQL statement
- Test.pm: add 'create_testing_activity' and 'delete_testing_activity'
- t/dispatch/activity.t: add a bunch of tests

0.228  2014-10-29 16:43 CET
- Dispatch/Activity.pm: trying to get _insert_activity to deal gracefully with

Changes  view on Meta::CPAN


0.237  2014-11-01 14:11 CET
- rename Dispatch/Privhistory.pm to Dispatch/Priv.pm to match 'priv' resource

0.238  2014-11-03 10:30 CET
- add many schedule-related resources to development-checklist
- in new schedule_Config.pm file with schedule resource definitions
  copied from priv_Config.pm, edit resource descriptions and documentation
  strings 
- in Model/Privhistory.pm, move 'get_privhistory' routine to Model/Shared.pm
  and generalize into 'get_history'; make 'get_privhistory' and
  'get_schedhistory' in Model/{Privhistory, Schedhistory}.pm be wrappers for this
  new shared routine
- t/: adapt to current state

0.239  2014-11-03 12:15 CET
- renamed all 'priv/current/...' and 'schedule/current/...' resources
  to 'priv/self/...' and 'schedule/self/...', respectively
- Dispatch/Priv.pm: renamed _get_current to _get_history_self; move
  _current_priv logic to Dispatch/Shared.pm->current because we will call it
  from Dispatch/Schedule.pm as well;
- Dispatch/Schedule.pm: ongoing adaptations
- t/: adapt to current state

0.240  2014-11-03 16:19 CET
- MANIFEST: add Dispatch/Schedule.pm, t/dispatch/schedule.t
- activity_Config.pm: add 'activity/help' resource definition
- priv_Config.pm, etc.: rename some resources and targets
  (in particular s/current/self/ in resource names)
- dispatch_Config.pm, Resource.pm: activate schedule resources
- dispatch_Message_en.pm: add new DISPATCH_EMPLOYEE_SCHEDULE and
  DISPATCH_EMPLOYEE_SCHEDULE_AS_AT messages
- config/sql/schedule_Config.pm: add new SQL_SCHEDHISTORY_SELECT_RANGE_BY_EID
  and SQL_SCHEDHISTORY_SELECT_RANGE_BY_NICK params
- Dispatch/Shared.pm: adapt 'current' routine to work for both priv and
  schedule resources
- Model/Shared.pm: fix some bugs
- Resource.pm: activate schedule resources
- t/dispatch/activity.t: add tests for 'activity/help'
- t/dispatch/schedule.t: add tests for "/schedule/eid/:eid/?:ts",
  "/schedule/help", "/schedule/nick/:nick/?:ts", and "/schedule/self/?:ts"
  resources

0.241  2014-11-03 22:32 CET
- Dispatch/Shared.pm: "numify" $eid in return value payload from dispatch
  target 'current'; check for hashref instead of scalar now that we are
  converting the schedule from JSON string into Perl hashref
- Model/Schedule.pm: rename 'get_json' to 'get_schedule_json' and add
  'decode_schedule_json' for converting the schedule JSON string into a Perl
  hashref
- Model/Shared.pm: return decoded schedule (hashref) from schedule_by_eid
- t/dispatch/schedule.t: uncomment/adapt some tests
- t/: get model units to run cleanly again

0.242  2014-11-04 08:30 CET
- config/dispatch/schedule_Config.pm: put resource definitions in alphabetical order;
  add missing POD; add missing 'schedule/intervals' resource definition

0.243  2014-11-04 09:56 CET
- schedule_Config.pm, Dispatch/Schedule.pm: make 'schedule/history/...'
  resources use "not_implemented" dispatch target so they don't vomit 500

0.244  2014-11-04 11:32 CET
- schedule_Config.pm: split 'schedule/intervals/?:shid' into two separate
  resources for parsing clarity

0.245  2014-11-04 17:50 CET
- Build.PL: require App::Dochazka 0.175 for 'ssid' (instead of 'scratch_sid')
- schedule_Config.pm: 'schedule/intervals' is POST and DELETE only; activate
  DELETE on 'schedule/intervals/:sid'; rename ':shid' parameter to ':sid'
- rename 'scratch_sid' field/property of intervals to 'ssid'
- dispatch_Message_en.conf: add DISPATCH_SCHEDINTVLS_MISSING,
  DISPATCH_SCHEDULE_INSERT_OK, DISPATCH_SCHEDULE_NO_UPDATE
- Dispatch/Schedule.pm: add _intervals_post and _intervals_delete dispatch
  targets
- move 'expurgate' logic to Model/Shared.pm and implement a wrapper method
  in each model module
- Model/Schedintvls.pm: fix 'insert' method so it returns a sensible status
  payload
- Test.pm: in docu_check, run 'payload' tests only if there is a payload;
  add as-yet untested 'create_testing_schedule' and 'delete_testing_schedule'
  routines
- t/: add new 'intervals.t' unit; adapt existing units to current state

0.246  2014-11-04 21:08 CET
- stabilization after the last commit
- t/dispatch/intervals.t: add some tests called for by development workflow

0.247  2014-11-04 22:21 CET
- add 'DISPATCH_SCHEDULE_EXISTS' message
- add 'schedule/all' and 'schedule/all/disabled' resource definitions
- add 'disabled' field to 'schedules' table
- Dispatch/Schedule.pm: when schedule already exists, return
  'DISPATCH_SCHEDULE_OK'
- t/dispatch/intervals.t: test for 'DISPATCH_SCHEDULE_OK' when inserting the
  same schedule a second time

0.248  2014-11-05 11:05 CET
- Build.PL: require App::Dochazka 0.176 to ensure Schedule objects have a
  'disabled' property
- config/dispatch/schedule_Config.pm: activate 'schedule/all' and 
  'schedule/all/disabled' resources
- config/sql/schedule_Config.pm: add 'disabled' field to SQL statements;
  add two new SQL statements to get all schedule records
- Dispatch/Schedule.pm: import 'get_all_schedules' and
  'get_all_schedules_including_disabled' routines
- Model/Schedule.pm: implement 'get_all_schedules' and
  'get_all_schedules_including_disabled' routines

0.249  2014-11-05 12:18 CET
- give 'schedule/all/...' dispatch targets more sensible names
- enable POST on 'schedule/intervals/:sid', including documentation
- t/dispatch/schedule.t: add 405 tests for 'schedule/all/...'

0.250  2014-11-05 17:54 CET
- Build.PL: require App::Dochazka 0.177 for TO_JSON method; require
  App::CELL 0.201 to get rid of Data::Structure::Util
- Resource.pm: get rid of wacky debug code; add 'convert_blessed' to our
  JSON 'encode' method call now that we have TO_JSON methods in all models;
  this obviates the need to call 'unblessed'
- Data::Structure::Util does not work with perl 5.20, so it needs to go;

Changes  view on Meta::CPAN


0.280  2014-11-14 11:29 CET
- employee_Config.pm: fix 'employee/self' acl_profile property
- Dispatch/Employee.pm: request body needs to be a hashref - check for that
  where we really care about it - in _put_post_delete_employee_by_eid
- Dispatch/Shared.pm: pre_update_comparison was causing DOCHAZKA_BAD_INPUT to
  be returned if no fields would actually change on update, but this might be
  confusing - change it to allow updates in such cases
- t/dispatch/employee.t: add test cases for POST employee/{current,self} by
  inactive and active employees; adapt tests to current state

0.281  2014-11-14 16:42 CET
- finish implementation (including test cases) of POST dispatch
  target for 'employee/{current,self}' resource

0.282  2014-11-14 21:36 CET
- dbinit_Config.pm: add trigger clause to make 'sid' field immutable
- Docs/Workflow.pm: add verbiage
- t/model/schedule.t: add test case verifying that 'update' method does not
  change the database even if the 'sid' field is changed

0.283  2014-11-18 07:45 CET
- REST_Message_en.conf: add finer-grained notice messages for 'cud'
- Model/Shared.pm: in cud, check return value of '$sth->execute' and
  return finer-grained notices to distinguish various edge cases
- t/: adapt to current state

0.284  2014-11-18 11:01 CET
- unit tests: move existing '002-root' and '003-current-priv' units to 
  new t/sql directory; add new 't/sql/immutable_id.t' unit to test 
  new triggers to make 'eid', 'iid', etc. fields immutable
- config/sql/dbinit_Config.pm: add "immutability" triggers for 'employees.eid',
  'schedhistory.shid' and 'privhistory.phid'

0.285  2014-11-18 11:53 CET
- dbinit_Config.pm, t/sql/immutable_id.t: finish making '*id' fields immutable

0.286  2014-11-18 12:49 CET
- dispatch_Config.pm, interval_Config.pm: add basic set of 'intervals'
  resources

0.287  2014-11-18 15:33 CET
- config/dispatch/HTTP_Message_en.conf: make a separate message file for codes
  that map directly to an HTTP error code
- config/, lib/: transform DOCHAZKA_BAD_INPUT and DOCHAZKA_INSUFFICENT_PRIV into 
  special status codes that map directly to HTTP error codes
- Resource.pm: when target returns certain status codes (see package variable
  %status_http_map), translate them directly into HTTP error codes
- t/: adapt to current state

0.288  2014-11-19 10:05 CET
- Dispatch/Lock.pm: lay groundwork for locks
- t/dispatch/interval.t: new tests 
- interval_Config.pm, dispatch_Message_en.conf: minor fixes
- Dispatch/Interval.pm: add special ACL handling
- Model/Interval.pm: fix bug (wrong order of properties in call to 'cud')
- Test.pm: let 'req' handle any user as long as "passhash" property is
  set the same as "nick"

0.289  2014-11-19 11:08 CET
- interval_Config.pm: make not-implemented resources use 'not_implemented'
  dispatch target
- t/dispatch/interval.pm: add some missing boilerplate tests

0.290  2014-11-19 11:23 CET
- interval_Config.pm: 'interval/nick/:nick/:tsrange' resource was broken due to
  missing EOH - fixed
- t/dispatch/interval.t: $base for 'interval/nick/:nick/:tsrange' resource was
  set to wrong value - fixed

0.291  2014-11-19 15:19 CET
- HTTP_Message_en.conf, Resources.pm: add 404 status trigger
- interval_Config.pm: call the hypothetical error code DISPATCH_TOO_MANY_RECORDS_FOUND
- top_Config.pm: fix factual error in documentation 
- dispatch_Message_en.conf: add DISPATCH_TOO_MANY_RECORDS_FOUND definition 
- Dispatch/Shared.pm->history: trigger 404 when no records found
- Model/Employee.pm: return DISPATCH_NO_RECORDS_FOUND with status level 'NOTICE'
- t/dispatch/history.t: explore more possibilities for entering an invalid EID; 
  adapt to current state (status-triggered 404 errors)
- t/dispatch/interval.t: add basic tests for 'interval/self/:tsrange'

0.292  2014-11-19 16:40 CET
- dispatch/interval_Config.pm: enable _fetch_* dispatch targets
- sql/interval_Config.pm: add SQL_INTERVAL_SELECT_BY_EID_AND_TSRANGE
- Dispatch/Interval.pm: implement _fetch_* dispatch targets
- Model/Interval.pm: implement a fetch_by_eid_and_tsrange function
- Model/Shared.pm: load_multiple had no provision for binding parameters -
  fixed
- t/dispatch/interval.t: add some basic tests for
  '/interval/eid/:eid/:tsrange', 'interval/nick/:nick/:tsrange' and
  '/interval/self/:tsrange'

0.293  2014-11-19 18:05 CET
- Dispatch/Interval.pm: let _new set EID to that of current user
  if no EID specified in request body
- t/dispatch/interval.t: add tests under 'interval/new' resource

0.294  2014-11-19 22:59 CET
- Dispatch.pm: adapt _docu* dispatch targets so they expect to receive argument
  in 'resource' property
- Dispatch/Interval.pm: pass argument with DISPATCH_PARAMETER_BAD_OR_MISSING to
  report which property is missing
- Resource.pm: only that JSON is not malformed that converts into a hashref
- Test.pm: adapt to current state
- t/dispatch/intervals.t: add two tests under 'interval/new'

0.295  2014-11-20 11:50 CET
- rename resource 'schedule/interval' to 'schedule/new'
- Resource.pm: no longer accept content bodies that do not convert cleanly into
  a hashref - this required some minor retooling of the following resources that
  had been accepting bare scalars or JSON arrays:
  - 'docu' and 'docu/html'
  - 'metaparam' and 'siteparam'
  - 'schedule/new'
- Dispatch.pm->_param_post now saves the pre-change value and attempts to
  restore it if the new value is not set properly
- t/: adapt to current state

0.296  2014-11-20 14:01 CET
- split 'metaparam' / 'metaparam/:param'

Changes  view on Meta::CPAN

0.298  2014-11-20 21:51 CET
- sql/lock_Config.pm: fix typos in SQL_LOCK_UPDATE
- Dispatch/Lock.pm: in '_new', make eid not required in request body 
- Dispatch/Shared.pm: fix bugs in interval+lock shared routines
- add several debug log messages; comment out one debug log message
- t/dispatch/interval_lock.t: test both 'interval/..' and 'lock/..'
  for all resources

0.299  2014-11-23 12:13 CET
- REST.pm: add caveat about tsranges with unbounded intervals
- Test.pm: add dbi_err routine to eliminate code duplication in units
- t/dispatch/: use the new 'dbi_err' routine everywhere

0.300  2014-11-23 14:50 CET
- t/300-ACL.t: add unit to vet the 'check_acl' routine
- Dispatch/ACL.pm: refactor the 'check_acl' routine
- Dispatch/Shared.pm: stop re-implementing check_acl in the 'make_default'
  routine
- Resource.pm: fix bug: "ACL profile of '/forbidden' resource is set to
  bogus scalar 'undefined' instead of undef"; adapt to check_acl refactor
- t/dispatch/history.t: add more tests; improve comments

0.301  2014-11-23 23:24 CET
- Dispatch/ACL.pm: make 'check_acl_context' return OK status when the
  request passes its check
- Dispatch/Shared.pm: block out an 'interval_sanity' routine (WIP)
- Dispatch/{Interval,Lock}.pm: adapt to current state

0.302  2014-11-24 14:43 CET
- dbinit_Config.pm: add 'no_intervals_after' and 'intvl_ok' stored PL/pgSQL procedures
- Dispatch/Interval.pm: make '_insert_interval' validate its arguments using Params::Validate
- Dispatch/Shared.pm: test attendance and lock intervals for bad string 'infinity';
  add 'lock_sanity' routine to perform analogous role to 'interval_sanity'

0.303  2014-11-24 16:47 CET
- config/sql/: globally replace tsrange with tstzrange and TIMESTAMP
  WITHOUT TIME ZONE to TIMESTAMP WITH TIME ZONE, etc.; add triggers to
  'intervals' and 'locsk' so all new 'intvl' values are vetted at insert/update
  using the 'intvl_ok' stored procedure
- Dispatch/Shared.pm: tweak '_no_infinity'
- t/: with the change to "WITH TIME ZONE", some return values have "+01"
  appended, so adapt tests in those cases
- t/dispatch/interval_lock.t: add a new section tests that examine handling
  of bogus tstzrange values that might be provided by the user

0.304  2014-11-24 17:13 CET
- Dispatch/Shared.pm: export lock_sanity
- Dispatch/Lock.pm: add 'lock_sanity' call to '_new'
- t/dispatch/interval_lock.t: fix tests broken by migration to 'WITH TIME ZONE';
  add a positive test illustrating a suspicious-looking interval that is acceptable
- t/model/: add '+01' to some timestamp literals because they are now timestamptz

0.305  2014-11-24 18:11 CET
- dbinit_Config.pm: notice that we already have a 'valid_intvl' trigger; revamp
  'intervals' and 'locks' triggers to use it
- t/dispatch/interval_lock.t: add a group of tests to keep track of which
  pathological tsranges ('intervals' in Dochazka terms) we are successfully
  checking for

0.306  2014-11-26 09:31 CET
- dbinit_Config.pm: add 'intvl_not_locked' trigger before update or insert on
  'intervals' table - checks to make sure the interval would not overlap with
  any existing lock
- Model/Shared.pm: fix bug where 'load' routine was needlessly adding 
  'count => 1' to the payload, which is supposed to be just an object
- t/: some tests started to fail because we were creating intervals and locks
  with the same intervals - fixed by changing the lock interval
- t/dispatch/interval_lock.t: now that we have a functioning trigger, add tests
  that attempt to insert intervals that conflict with a lock
- t/model/triggers: add new subdirectory for trigger tests
- t/model/triggers/immutable_id.t: new unit to test triggers that make ID
  fields immutable

0.307  2014-11-26 16:40 CET
- Model/: make 'update' methods return 'DOCHAZKA_ID_MISSING_IN_UPDATE' if id
  property missing
- Test.pm: add new 'gen_$class' multi-purpose routines
- t/model/general/id.t: use 'gen_$class' routines
- t/model/general/reset.t: expand to test 'reset' method in all classes

0.308  2014-11-27 11:11 CET
- Build.PL: require App::Dochazka 0.184 for 'attrs' and 'get' methods
- dbinit_Config.pm: add checks for presence of 'infinity' in tsranges
- Test.pm: bring in 'test_sql_success' and 'test_sql_failure' functions
  so we aren't duplicating them in the units
- t/model/employee.t: cleanup; eliminate some duplicated code (low-hanging
  fruit)
- t/model/general/reset.t: finishing touches
- t/sql/: cleanup
- t/sql/schedintvl.t: new tests for intvl triggers

0.309  2014-11-27 17:09 CET
- dbinit_Config.pm: have 'schedule_at_timestamp' return NULL instead of {} when
  there is no schedule in effect
- Model/Shared.pm: make decode_schedule_json handle the above NULL value
- t/: fix all the tests that were expecting {} but now get undef instead

0.310  2014-11-27 22:04 CET
- dbinit_Config.pm: add 'schedule_policy' trigger function to prevent users
  from introducing intervals in time periods when the employee has no or
  ambiguous scheduling
- t/dispatch/interval_lock.t: adapt to the above trigger (ensure testing user
  has a schedule and the schedule is in effect)
- t/: disable a bunch of tests broken by introduction of this trigger

0.311  2014-11-27 23:04 CET
- dbinit_Config.pm: expand no_lock_conflict to handle DELETE as well as INSERT/UPDATE
- t/model/{interval,lock}.t: adapt to current state
- t/model/lock.t: add test confirming that it is no longer possible to delete a
  locked interval

0.312  2014-11-28 11:27 CET
- t/dispatch/interval_lock.t: add some tests simulating: (1) create interval,
  (2) lock it, (3) attempt to update it - interval is locked, (4) attempt to
  delete it - interval is locked
- dbinit_Config.pm: add another trigger and run into problems because I didn't realize PostgreSQL
  executes triggers in alphabetical order

0.313  2014-11-28 12:20 CET
- dbinit_Config.pm: rename triggers so "alphabetical order" is aligned with
  "order of intended execution"

Changes  view on Meta::CPAN

- t/dispatch/employee.t: adapt tests to new ACL policy

0.408  2015-02-21 15:58 CET
- Model/Employee.pm: add load_by_sec_id routine
- t/model/employee.t: add rudimentary unit tests for load_by_sec_id
- Shared.pm: change all instances of $self to $d_obj since none of the routines
  in this module use method calls; add sec_id to shared_first_pass_lookup

0.409  2015-02-22 16:36 CET
- implement shared_get_employee and use it to implement three resource handlers

0.410  2015-02-23 20:42 CET
- t/dispatch/employee.t: add rudimentary tests of "employee/sec_id/:sec_id"
  resource

0.411  2015-02-24 10:55 CET
- Build.PL: no longer re-create README on each build
- README: instead, point would-be readers to metacpan.org
- REST.pm: work on POD

0.412  2015-03-20 21:35 CET
- config/sql/dbinit_Config.pm: add disabled_to_zero trigger to convert NULL
  values to "false" in the disabled field
- t/sql/disabled_to_zero.t: test disabled_to_zero trigger

0.413  2015-03-24 21:30 CET
- allow single-character nicks

0.414  2015-03-25 16:24 CET
- Dispatch.pm: convert "hardcoded text as status codes" into proper status
  codes

0.415  2015-03-30 17:29 CEST
- require App::Dochazka 0.186 for 'scode' property in schedule class
- make test suite tolerate 'scode' property
- t/sql/schedule_Config.pm: add scode property to all SQL statements where it
  makes sense
- implement 'schedule/scode/:scode' property with basic test cases

0.416  2015-04-01 09:39 CEST
- t/dispatch/schedule.t: trying to verify with tests that the new schedule
  insert logic really does what we want

0.417  2015-04-02 22:06 CEST
- use TDD to get what we want: POST schedule/new ignores scode value when given
  schedule exactly matches an existing schedule with a different (non-NULL)
  scode

0.418  2015-04-03 09:08 CEST
- SQL: split 'disabled_to_zero' function/triggers into separate variants for
  insert and update; confidently add 'NOT NULL' constraint to 'disabled' fields
- t/sql/disabled_to_zero.t: adapt to current state
- t/model/schedule.t: add notes the way it should have been from the beginning

0.419  2015-04-03 18:06 CEST
- ResourceDefs.pm: change ACL of 'GET schedule/all' so inactives and actives
  can do it, too
- t/dispatch/schedule.t: add appropriate test cases

0.420  2015-04-04 21:18 CEST
- SQL: implement 'not_before_1892' function to enforce sane timestamp policy
  (no dates before 1892 in the database)
- t/: adapt tests; add test cases

0.421  2015-04-05 13:34 CEST
- REST/Shared.pm: in 'shared_get_privsched', return 404 if no priv/schedule
  assigned (instead of returning 200 OK with a null priv/schedule) 
- t/dispatch/schedule.t: adapt tests

0.422  2015-04-05 20:45 CEST
- dbinit_Config.pm: make schedule_at_timestamp return SID instead of the
  schedule JSON itself
- Model/Shared.pm: schedule_by_eid returns SID
- REST/Shared.pm: shared_get_privsched looks up the SID and returns the
  entire schedule
- t/dispatch/schedule.t: adapt tests affected by the above change
- t/sql/disabled_to_zero.t: clean up after ourselves

0.423  2015-04-06 13:42 CEST
- REST/Shared.pm: make shared_employee_acl_part2 declare 403 status with a
  proper App::CELL::Status instead of a hard-coded string

0.424  2015-04-06 18:59 CEST
- ResourceDefs.pm: allow inactives and actives to view their own privilege
  and schedule histories; fix spelling of the word 'schedule' in the 'cli'
  property

0.425  2015-04-06 22:15 CEST
- ResourceDefs.pm, config/sql/: modifications to allow POST (update) on
  'priv/history/phid/:phid' and 'schedule/history/shid/:shid'
- Model/Privhistory.pm, Model/Schedhistory.pm: add update method
- UPDATE privhistory does not work as it should
- tests not running cleanly

0.426  2015-04-07 07:15 CEST
- dbinit_Config.pm: fix bug in 'root_immutable_old' that was causing
  NEW.* values to be replaced with OLD.* on updates
- t/sql/privhistory.t: add test case for the above bug
- t/sql/root.t: replace comments with note()s

0.427  2015-04-07 09:14 CEST
- dbinit_Config.pm: fix DBINIT_MAKE_ROOT_IMMUTABLE triggers that were causing
  UPDATE and DELETE operations to silently fail
- REST/Dispatch.pm: add targets for POST operations on
  'priv/history/phid/:phid' and 'schedule/history/shid/:shid'
- REST/Shared.pm: add 'shared_update_history' routine
- t/dispatch/: adapt tests, add tests

0.428  2015-04-14 15:40 CEST
- REST/Shared.pm: include nick in error message

0.429  2015-04-14 17:06 CEST
- fix bug "GET interval/eid/:eid/:tsrange and interval/nick/:nick/:tsrange
  should work for active employees on themselves"
  https://rt.cpan.org/Ticket/Display.html?id=103538
  http://paste.opensuse.org/7703631

0.430  2015-04-16 10:34 CEST
- fix bug "Unexpected error in t/sql/current.t"
  https://rt.cpan.org/Ticket/Display.html?id=103766
  http://paste.opensuse.org/8781484

Changes  view on Meta::CPAN

0.462  2015-07-08 09:59 CEST
- Dispatch.pm: convert _handler_get_interval() into _handler_get_intlock() and
  use it for both locks and intervals; eliminate duplicated code; POD cleanup;
  make separate handler_get_interval_iid() and handler_get_lock_lid() functions
  so we can allow supervisors to peek
- ResourceDefs.pm: separate GET handlers for 'interval/iid/:iid' and
  'lock/lid/:lid'

0.463  2015-07-09 09:56 CEST
- Build.PL: add App::Dochazka 0.189 as build depenency
- t/dispatch/supervisor.t: add more tests

0.464  2015-07-10 16:50 CEST
- ResourceDefs.pm: change ACL profile of GET lock/eid/:eid/:tsrange
  and GET lock/nick/:nick/:tsrange to 'active', so active employees
  can view their locks and supervisors can view the locks of their
  reports
- t/dispatch/supervisor.t: add more tests

0.465  2015-07-10 17:34 CEST
- t/dispatch/interval_lock.t: do not rely on IID having a particular value,
  since this only holds if/when tests are run in a particular order

0.466  2015-07-12 22:24 CEST
- t/dispatch/supervisor.t: test that inactive supervisors cannot see their
  peons' attendance data

0.467  2015-07-21 15:27 CEST
- REST.pm: define $VERSION in top-level module only
- Adapt to rename of App::Dochazka to App::Dochazka::Common
- release.sh: new release script

0.468  2015-07-21 16:01 CEST
- Update Copyright statement to include 2015
- release.sh: add "osc update"

0.469  2015-07-22 22:17 CEST
- implement new resources:
  - GET employee/eid/:eid/minimal
  - GET employee/nick/:nick/minimal
  - GET employee/sec_id/:sec_id/minimal
- t/dispatch/employee.t: add some basic test cases for the new
  GET employee/.../minimal resources
- t/: adapt test suite to App::Dochazka::Common rename

0.470  2015-07-23 14:50 CEST
- t/dispatch/employee.t: disable tests that broke when employees were allowed to modify their email address
- t/201-LDAP.t: expanded tests
- ResourceDefs.pm: add employee/nick/:nick/ldap resource
- LDAP.pm: make ldap_search() look up a property; implement populate_employee()
- Dispatch.pm: add handler_get_employee_ldap() for GET employee/nick/:nick/ldap
- Auth.pm: populate certain employee attributes from LDAP upon successful LDAP autocreate
- REST_Config.pm: default value for DOCHAZKA_LDAP_POPULATE_MATRIX
- Build.PL: require App::Dochazka::Common 0.191 for "set()" method
- Dispatch.pm: increase granularity of employee/.../minimal ACL check
- No longer auto-generate Makefile.PL

0.471  2015-07-23 16:55 CEST
- t/201-LDAP.t: add simple test cases for GET employee/nick/:nick/ldap
- ResourceDefs.pm: enable PUT on employee/nick/:nick/ldap
- LDAP.pm: fix populate_employee() so it returns not_ok if nick is not in LDAP
- Dispatch.pm: implement handler_get_employee_ldap and handler_put_employee_ldap
- Auth.pm: fix DOCHAZKA_LDAP_AUTOCREATE_AS code path

0.472  2015-07-24 17:06 CEST
- doc: config/REST_Config.pm: tell users to not add a nick property to
  DOCHAZKA_LDAP_POPULATE_MATRIX
- t/: test POST employee/nick without required nick property
- Dispatch.pm: return 400 if POST employee/nick without nick property
  (fixes github issue #2) 
- Dispatch.pm: handler_put_employee_ldap() return 404 if nick not found in LDAP

0.473  2015-07-25 03:45 CEST
- REST_SiteConfig.pm: add config file for overriding Web::MREST core params
  since those are set first
- REST.pm: add a version() package method
- GET version now reports App::Dochazka::REST version instead of Web::MREST
  version (Github issue #3)
- t/sql/disabled_to_zero.t: fix issue where test was not cleaning up after itself
- Dispatch.pm: write a debug message if LDAP is enabled
- MANIFEST: refrain from packaging release script

0.474  2015-07-25 16:33 CEST
- t/001-init.t: skip all tests if PostgreSQL server unreachable
- REST/Test.pm: make initialize_unit() do skip_all if PostgreSQL server unreachable
- ConnBank.pm: catch exceptions in conn_status()
- REST.pm: init() routine is no longer used; move it to REST/Test.pm
- bin/dochazka-rest: enable passing of command-line options to mrest script
  (resolves github issue #4)
- Build.PL: require Web::MREST 0.274 for bin/mrest command-line options
- bin/dochazka-rest: process command-line options using GNU getopt
- REST.pm: update init_no_db() documentation to reflect current state
- release scripting mods

0.475  2015-07-25 16:57 CEST
- Build.PL: set repository and bugtracker URLs

0.476  2015-07-25 17:49 CEST
- REST/Test.pm: use conn_up() instead of conn_status()
- ConnBank.pm: add conn_up() and rewrite conn_status() as a wrapper
- Auth.pm: drop obsolete call to App::Dochazka::REST::init()
- Auth.pm: call App::Dochazka::REST::ConnBank::init_singleton() instead of deprecated App::Dochazka::REST::init()
- ConnBank.pm: make init_singleton() use values from site configuration
- ConnBank.pm: make init_singleton() be idempotent

0.477  2015-07-25 20:13 CEST
- ResourceDefs.pm: change ACL profile to passerby in two places
- config/dispatch_Message_en.conf: fix DISPATCH_KEEP_TO_YOURSELF message which
  was no longer accurate

0.478  2015-07-29 17:22 CEST
- Import normalize_filespec() from Web::MREST::CLI, where it now resides
- Dispatch.pm: do not report passhash and salt back to users

0.479  2015-07-30 14:41 CEST
- Build.PL: require Web::MREST 0.279 for early debugging feature
  Fixes: https://github.com/smithfarm/dochazka-rest/issues/13
- REST.pm: document the early debugging feature
- Test.pm: drop call to init_no_db(); use Web::MREST::init() only
- Dispatch.pm: be more careful with DOCHAZKA_EMPLOYEE_MINIMAL_FIELDS
- REST.pm: drop init_no_db() which is no longer used



( run in 0.985 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )