App-Dochazka-CLI
view release on metacpan or search on metacpan
Revision history for App-Dochazka-CLI
0.001 2014-08-08 14:09 CEST
- first public release of embryonic CLI script
0.002 2014-08-08 14:17 CEST
- break parser out into a module
0.003 2014-08-08 14:31 CEST
- debugging
0.004 2014-08-08 15:35 CEST
- CLI.pm: add DESCRIPTION section to POD
0.005 2014-08-10 14:45 CEST
- fix bug "init routine not loading App-Dochazka-CLI sharedir"
- expand GET EMPLOYEE command:
- GET EMPLOYEE still returns current employee
- GET EMPLOYEE $INTEGER returns employee with EID $INTEGER
- GET EMPLOYEE $STRING returns employee with nick $STRING
- GET EMPLOYEE $STRING-CONTAINING-% runs a 'LIKE' search for multiple employees
- add ReadLine/History support using Term::ReadLine::Perl5
- split off 'send_req' routine into new App::Dochazka::CLI::HTTP module
- fix bug "'get employee NON-EXISTENT-NICK' should produce an error message;
instead, it says 'undef'"
0.006 2014-08-10 18:37 CEST
- Build.PL: add dependency HTTP::Cookies
- bin/dochazka-cli: use App::Dochazka::Model::Employee instead of inheriting from it
- HTTP.pm: construct LWP::UserAgent object with cookie_jar
- config/CLI_Config.pm: make a proper _Config.pm file for the application
0.007 2014-08-10 20:12 CEST
- bin/dochazka-cli: prompt for nick/password if not given in site configuration
- HTTP.pm: add 'init_ua' and 'cookie_jar' functions, use nick/password
prompted from user if not given in site config
- Parser.pm: add GET COO[KIES]
- Build.PL: update dependencies
0.008 2014-08-10 22:51 CEST
- fix bug "bin/dochazka-cli throws 'Odd number of arguments' error at startup"
0.009 2014-08-10 22:56 CEST
- Parser.pm: add GET SES[SION]
0.010 2014-08-11 16:15 CEST
- goodbye 'Term::ReadLine::Perl5' (depends on 'rlib' which cannot be
packaged due to licensing issues), hello 'Term::ReadLine::Gnu'
0.011 2014-10-17 23:01 CEST
- Build.PL: add Getopt::Long dependency
- get user and password from command-line options instead of from site
configuration
0.012 2014-10-18 10:06 CEST
- process command-line options: 'help', 'user', 'password'
- add dependencies: Getopt::Long, Pod::Usage
- log to $HOME/.dochazka-cli.log by default, user can override in /etc/dochazka-cli
- prompt for password if none specified on command line
0.013 2014-10-19 07:55 CEST
- CLI.pm: document commands and their syntax
- Parser.pm: work on top-level GET commands
0.014 2014-10-19 08:44 CEST
- move command POD to Parser.pm where it belongs
- Parser.pm: add a couple more top-level GET commands
0.015 2014-10-19 13:35 CEST
- HTTP.pm: fix send_req so it is capable of sending requests with methods other
than GET
- Parser.pm: add PUT and PUT HELP commands
0.016 2014-10-19 13:53 CEST
- HTTP.pm, Parser.pm: cleanup
0.017 2014-10-19 22:33 CEST
- Util.pm: in rest_error, derive the return status from the REST server's
return status
0.126 2015-03-24 21:35 CET
- Build.PL: make it look more like the Build.PL from App::Dochazka::REST
- t/cmd_...: add some very basic EMPLOYEE_SPEC tests
0.127 2015-03-25 07:05 CET
- t/cmd_..: make tests handle EIDs properly
0.128 2015-03-25 15:26 CET
- Parser.pm: make process_command distinguish REST test commands from normal
CLI commands and handle them accordingly
- return the real status and not some dumb DOCHAZKA_CLI_NORMAL_COMPLETION
- implement $METHOD employee search nick $SEARCH_KEY
0.129 2015-03-25 16:22 CET
- implement "GET schedule all" and "GET schedule all disabled" commands
0.130 2015-03-26 07:44 CET
- t/parse.t: add tests for newly supported rest_test commands
- came up with idea for building up new schedules in memory
- CommandMap.pm: add new SCHEDULE _DOW ... commands
- Parser.pm: add support for multiple instances of the same token within a
single command
- TokenMap.pm: add support for new _DOW and _TIME tokens
0.131 2015-03-27 08:58 CET
- Commands/Schedule.pm: basic infrastructure for building up a schedule in
memory for submission to the REST server
0.132 2015-03-27 21:33 CET
- add DUMP and MEMORY tokens
- add "SCHEDULE DUMP", "SCHEDULE MEMORY", and "SCHEDULE NEW" commands
- basic schedule-building and schedule-inserting functionality seems to work,
but no tests yet
0.133 2015-03-28 20:21 CET
- bin/dochazka-cli: improve reporting of non-OK statuses
- CommandMap.pm, RestTest/Schedule.pm, t/parse.t: add missing REST test command
"$METHOD SCHEDULE SID $NUMBER"
- Commands/Schedule.pm: do not push duplicate schedule entries into memsched
- TokenMap.pm: include an "ALL" day of week (meaning replicate this interval to
all five days MON-FRI)
0.134 2015-03-28 20:44 CET
- bin/dochazka-cli: further refine reporting of errors
- CLI_Message_en.conf: add an error message for when "schedule/new" is called
on empty memsched
- CommandMap.pm: add "SCHEDULE ALL _TIMERANGE" for accelerated schedule entry
in cases when the schedule for MON-FRI is the same on each day
- Commands/Schedule.pm: make sure there are memsched entries to begin with,
before sending REST call; implement "SCHEDULE ALL _TIMERANGE" command
0.135 2015-03-30 08:57 CEST
- implement "SCHEDULE CLEAR"
- cleanup, tweaks
0.136 2015-03-30 15:11 CEST
- resolve two tickets
- TokenMap.pm: expand EMPLOYEE_SPEC so we can do "nick=...", "sec_id=..." and
"eid=..."
- Util.pm: make "lookup_employee" handle expanded EMPLOYEE_SPEC
- t/cmd_admin/employee.t: add test cases for expanded EMPLOYEE_SPEC
0.137 2015-03-30 23:11 CEST
- start adding scode support
0.138 2015-03-31 17:18 CEST
- implement 'SCHEDULE FETCH ALL' command
- Commands/Schedule.pm: in 'schedule_new', give the user feedback when schedule
is successfully inserted (WIP: feedback should include info whether schedule
was actually inserted or only updated - if updated, there might be a conflict
between new scode and the original one; not clear what the program should do
in such a case)
0.139 2015-04-03 07:05 CEST
- implement 'SCHEDULE FETCH ALL DISABLED'
0.140 2015-04-03 19:47 CEST
- make 'SCHEDULE FETCH ALL [DISABLED]' display remarks, if present, and clearly
mark disabled schedules as such
0.141 2015-04-04 15:27 CEST
- implement commands:
- SCHEDULE_SPEC [SHOW]
- SCHEDULE_SPEC REMARK
- SCHEDULE_SPEC SCODE _TERM
0.142 2015-04-04 21:46 CEST
- start working on PRIV HISTORY and SCHEDULE HISTORY handlers
- TokenMap.pm: add privlevels and _PRIVLEVEL
- cleanup
0.143 2015-04-05 11:34 CEST
- add Text::Table dependency
- lay groundwork for "PRIV", "EMPLOYEE_SPEC PRIV", "SCHEDULE", "EMPLOYEE_SPEC SCHEDULE",
"EMPLOYEE_SPEC PRIV HISTORY", and "EMPLOYEE_SPEC SCHEDULE HISTORY"
- Commands/History.pm: implement handler for "[EMPLOYEE_SPEC] PRIV HISTORY"
- Commands/Employee.pm: use 'App::Dochazka::REST::Model::Employee' instead of
'App::Dochazka::Model::Employee'
0.144 2015-04-05 13:32 CEST
- Commands/History.pm: add "print_schedule_history" routine
- Commands/Priv.pm: new module containing "show_current_priv" handler routine
- implement "[EMPLOYEE_SPEC] PRIV" and "[EMPLOYEE_SPEC] SCHEDULE" handlers
0.145 2015-04-05 20:59 CEST
- add Shared.pm with shared routines (priv/schedule etc.)
- Commands/History.pm: look up and display scode and remark in schedule history
table
0.146 2015-04-06 18:41 CEST
- implement commands for adding priv and schedule history records
0.147 2015-04-06 22:15 CEST
- add commands for changing priv and schedule history remarks
0.148 2015-04-07 09:29 CEST
- Util.pm: in rest_error, handle case when payload is a string
0.149 2015-04-07 11:51 CEST
- CommandMap.pm: add synonyms
- Commands/History.pm: fix typo bug in set_history_remark
- Util.pm: make argument processing more robust
- t/parser/commands.t: add basic parse tests for missing interval commands;
update existing tests to current state
0.175 2015-04-16 09:51 CEST
- t/cmd_active/interval.t: start developing functional tests of INTERVAL
commands
- Commands/Interval.pm: eliminate more code duplication; arrive at a name
_tsrange_from_dates_and_times for helper function; add _print_interval helper
function
- Util.pm: make 'init_cli_client' call init_timepiece()
0.176 2015-04-16 14:07 CEST
- bin/dochazka-cli, Util.pm: special handling of REST_ERROR status code
- CommandMap.pm: re-vamp commands for fetching intervals
- Commands/Interval.pm: implement "interval_fetch_promptdate" handler,
"_print_intervals_tsrange" helper function
- TokenMap.pm: add months of the year
0.177 2015-04-16 15:13 CEST
- Commands/Misc.pm: new module for miscellaneous command handlers
- add commands (PROMPT, PROMPT DATE) for changing the prompt date
- Util.pm: add write 'determine_employee' routine
- CommandMap.pm, Commands/Interval.pm: add "EMPLOYEE_SPEC ..." variants for
"INTERVAL", "INTERVAL FETCH", and "INTERVAL _DATE"
- Commands/Employee.pm: eliminate code duplication by using determine_employee
- t/parser/commands.t: adapt to current state
0.178 2015-04-16 18:31 CEST
- Commands/Interval.pm: display fetched intervals in table form
0.179 2015-04-17 13:22 CEST
- add lots more commands for fetching/displaying attendance intervals
0.180 2015-04-17 13:50 CEST
- t/parser/commands.t: add basic parse tests for the new interval fetching
commands
- CommandMap.pm: fix typo uncovered by the new parse tests
0.181 2015-04-17 15:32 CEST
- add "REST Test" commands for the new 'schedule/intervals/...' resources
0.182 2015-04-18 18:16 CEST
- rename "SCHEDULE INTERVALS" commands, resources, etc. to "INTERVAL FILLUP"
0.183 2015-04-18 18:35 CEST
- make "INTERVAL FILLUP" REST-test commands take lower and upper date bounds
instead of tsrange
0.184 2015-04-18 20:03 CEST
- bin/dochazka-cli: use Data::Dumper to display payload when status is OK and
payload is not a number or string
- add INTERVAL FILLUP commands (piggyback on INTERVAL FETCH)
0.185 2015-04-27 16:59 CEST
- give active testing employee a schedule already in t/001-init.t;
get rid of unintuitive t/cmd_active/001-init.t
- use prompt date (century, year, month, etc.) instead of current date
(century, year, month, etc.)
- Test.pm: add a 'delete_interval' test routine
- t/cmd_active/interval.t: expand unit; use imported 'delete_interval' routine;
test that "PROMPT 2015-01-01" does change all the $prompt_... variables
0.186 2015-04-28 17:34 CEST
- t/util/: add two new units auth.t and determine_employee.t
- Util.pm: abolish 'quiet' parameter to authenticate_to_server and make routine
completely mute; validate a parameter; document routines better; refactor
authenticate_to_server for code readability and more reasonable return value;
lookup_employee: fix bugs uncovered by unit testing
- bin/dochazka-cli: move in authentication announcement from
authenticate_to_server
0.187 2015-04-29 19:47 CEST
- Util.pm, t/util/ts.t: more documentation improvement; remove deprecated
tsrange_from_timestamps routine; use $prompt_year instead of $current_year;
eliminate deprecated $current_{year,century,month} package variables
- CommandMap.pm, Parser.pm: move functions from CommandMap.pm to Parser.pm;
improve description of the semantic tree
- t/cmd_active/interval.t: add tests to fetch intervals created by this unit
- t/parser/: test generate_semantic_tree documentation
0.188 2015-04-29 20:43 CEST
- CLI.pm, Test.pm: improve readability
- t/util/truncate.t: unit tests for 'truncate_to'
0.189 2015-05-01 12:00 CEST
- Test.pm: rename delete_interval -> delete_interval_test; add fetch_interval_test
- t/cmd_active/interval.t: use fetch_interval_test
0.190 2015-06-28 15:29 CEST
- CommandMap.pm: put employee REST test commands in alphabetical order
- CommandMap.pm: add REST test commands for 'employee/list/?:priv' resource
- RestTest/Employee.pm: add dispatch targets for 'employee/list/?:priv' resource
- TokenMap.pm: add LIST token
0.191 2015-06-28 16:15 CEST
- CommandMap.pm: add EMPLOYEE LIST and EMPLOYEE LIST _TERM targets
- Commands/Employee.pm: implement the employee_list() function
- Guide.pm: document the EMPLOYEE LIST and EMPLOYEE LIST _TERM targets
0.192 2015-06-30 18:46 CEST
- t/cmd_admin/employee.t: convert comments to notes
- t/cmd_admin/employee.t: add basic tests of EMPLOYEE LIST command
- t/boilerplate.t: this unit's usefulness is questionable; drop it
- t/util/auth.t: avoid running any tests before first call to
authenticate_to_server(), because it might result in "plan skip_all"
0.193 2015-07-01 17:13 CEST
- implement REST test and normal commands for 'employee/team',
'employee/eid/:eid/team' and 'employee/nick/:nick/team' resources
0.194 2015-07-01 22:39 CEST
- implement "EMPLOYEE TEAM" and "EMPLOYEE_SPEC TEAM" commands
0.195 2015-07-04 19:43 CEST
- bin/dochazka-cli: honor sitedir option; prompt for password
0.196 2015-07-04 22:12 CEST
- bin/dochazka-cli: use init_prompt() instead of init_timepiece()
- bin/dochazka-cli: initialize prompt date every time prompt is displayed
- Util.pm: import init_timepiece() from App::Dochazka
0.223 2016-01-12 15:26 CET
- Testers.pm: have them first login with demo/demo
- bin/dochazka-cli: show prompt/commands in non-interactive mode
- CLI/Testers.pm: add testing session 1
0.224 2016-01-14 13:10 CET
- Build.PL: require Web::MREST::CLI 0.279 for bugfixes
- bin/dochazka-cli: add rudimentary custom completion function
https://github.com/smithfarm/dochazka-cli/issues/27 Fixes: #27
- CLI/Guide.pm: remove VERSION
0.225 2016-01-14 17:19 CET
- bin/dochazka-cli: tell JSON to not decode UTF-8
https://github.com/smithfarm/dochazka-cli/issues/24 Fixes: #24
0.226 2016-01-14 19:54 CET
- Build.PL: require Web::MREST::CLI 0.280 for UTF-8 bugfix
- Testers.pm: in PREREQUISITES describe non-Docker way
0.227 2016-01-14 20:16 CET
- Revert "Drop VERSION from CLI/Guide.pm"
0.228 2016-01-15 00:50 CET
- tests:
- t/cmd_admin/employee.t: improve debuggability (log to file, etc.)
- t/cmd_admin/employee-utf8.t: new test
- bin/dochazka-cli: beginnings of tab completion
0.229 2016-01-15 22:25 CET
- Extend copyright into 2016
- tab completion:
- TokenMap.pm: rename $regex_map -> $token_map, add $completion_map
- Completion.pm: working custom completion
- custom completion: fix various issues
- CommandMap: add some noop commands to fix tab completion
0.230 2016-01-16 20:35 CET
- tab completion:
- fix some minor glitches
- add tab completion tests
- drop a senseless dependency
- CLI/Testers.pm: clarify PREREQUISITES
0.231 2016-01-25 23:25 CET
- release.sh: save some typing by automating version number to OBS
- bin/dochazka-cli: make debug-level log messages visible in log
- Util.pm: put datelist helper functions in Util.pm
- Util.pm: stabilize and test datelist_from_token()
- TokenMap.pm: add _DATELIST (for use with INTERVAL FILLUP)
- CommandMap.pm: adapt FILLUP commands to redesigned REST resource
- Refactor INTERVAL FILLUP commands
- Commands/Interval.pm: basic INTERVAL FILLUP functionality
0.232 2016-01-26 07:47 CET
- Util.pm: use debug log level
- t/util/datelist.t: cleanup, initialize logger
0.233 2016-01-30 23:45 CET
- Remove INTERVAL FILLUP DATELIST ambiguity
- Commands/Interval.pm: expand statistics reported by INTERVAL FILLUP
- simplify INTERVAL FILLUP command syntax by removing _MONTH
- bin/dochazka-cli: drop annoying "Payload: undef" from output of certain commands
- Completion.pm: eliminate tab completion warning
- pod (Testers.pm): add sessions 2, 3, 4, and 5
0.234 2016-02-01 00:42 CET
- Testers.pm: add subsection headings in session 5
- bin/dochazka-cli: use Dumper to display non-scalar payloads
0.235 2016-02-02 10:39 CET
- Testers.pm: rewrite database initialization step
- Testers.pm: tell users to start the server; work on session 6
0.236 2016-02-04 11:17 CET
- doc: Guide.pm: fix activity disable/re-enable examples
- Testers.pm: finish session 6, start session 7
- Util.pm->normalize_date(): check sanity of resulting date
- Commands/Interval.pm: remove confusing partial interval message
0.237 2016-09-04 20:12 CEST
- Parser.pm: provide better parser state dumps in debug mode
- RestTest: implement GET configinfo
- Util.pm: report logfile location to user at startup
- Saner sitedir handling
- Travis CI
0.238 2016-09-15 13:33 CEST
- cleanup: drop ignore.txt
- build/ops: new file CLI_SiteConfig.pm.example
0.239 2017-10-18 22:54 CEST
- EMPLOYEE PROFILE: drop Dochazka EID...
- Use employee/self/full instead of employee/self/priv
- In employee/self/full resource, current_emp prop renamed to "emp"
- RestTest: add schedule/new RestTest commands
- TokenMap: allow three-letter month abbreviations in timestamp
0.240 2017-10-18 22:55 CEST
- build/ops: set OBS_PROJECT to Application:Dochazka
( run in 0.768 second using v1.01-cache-2.11-cpan-97f6503c9c8 )