App-Dochazka-CLI

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

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
- implement more resources

0.018  2014-10-20 08:32 CEST
- Parser.pm: fix brokenness in 'GET WHOAMI' and 'PUT EMPLOYEE'

0.019  2014-10-20 17:23 CEST
- Parser.pm: fix a silly bug

0.020  2014-10-20 22:09 CEST
- Parser.pm: add 'GET CURRENT PRIV' command
- bin/dochazka-cli: fix privilege brokenness; add status text to command output

0.021  2014-10-21 10:44 CEST
- Parser.pm: add 'GET EMPLOYEE COUNT' and get rid of conflicting 'GET
  EMPLOYEE [STRING]'

0.022  2014-10-21 16:26 CEST
- bin/dochazka-cli: show response body on NOTICE status as well as OK
- HTTP.pm: explicitly import GET PUT POST DELETE from HTTP::Request::Common
- Parser.pm: properly implement 'metaparam/:param' and 'not_implemented'
  resources

0.023  2014-10-21 22:24 CEST
- Parser.pm: fix $anything regex variable; support 'forbidden' resource; add
  other missing top-level resources so now all are supported

0.024  2014-10-22 16:42 CEST
- Parser.pm: add POST EMPLOYEE EID command

0.025  2014-10-23 10:55 CEST
- Parser.pm: eliminate "POST METAPARAM"; fix "DELETE METAPARAM" so it will
  actually work if/when implemented in the REST server

0.026  2014-10-23 13:54 CEST
- Parser.pm: make $anything really be anything; add "POST DOCU [RESOURCE]"
  command

0.027  2014-10-24 10:58 CEST
- complete development workflow for employee resources
- Parser.pm: add missing documentation and commands

0.028  2014-10-24 15:27 CEST

Changes  view on Meta::CPAN

- 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

0.150  2015-04-07 13:38 CEST
- Util.pm: add a 'truncate_to' function for limiting table columns that might
  run on, and on, and on...
- History.pm: use truncate_to; in _add_history look up sid when scode is given;
  in print_schedule_history print the right remark; remove quotes in
  set_history_remark
- Schedule.pm: make schedule_new return status object with http_status property
- t/001-init.t: create a schedule so we don't have to create one manually all
  the time

0.151  2015-04-07 17:08 CEST
- Guide.pm: start writing proper CLI documentation
- CLI.pm: move verbiage to Guide and link to it
- Parser.pm: fix RT#102671 (Trailing '0' was throwing the parser)
  https://rt.cpan.org/Ticket/Display.html?id=102671
- cleanup

0.152  2015-04-07 18:39 CEST
- TokenMap.pm: add PASSWORD token and distinguish it from PASSERBY
- CommandMap.pm: add some synonyms; add password-reset commands 'EMPLOYEE
  PASSWORD' and 'EMPLOYEE_SPEC PASSWORD'
- Commands/Employee.pm: add dummy handlers for the above commands
- Guide.pm: document some commands

0.153  2015-04-07 22:08 CEST
- Commands/Employee.pm: implement password change handlers

0.154  2015-04-09 10:13 CEST
- Build.PL: acknowledge Web::MREST dependency
- Guide.pm: document more commands/workflows

0.155  2015-04-09 10:20 CEST
- change all instances of 'App::Dochazka::REST::Model' to 'App::Dochazka::Model'

0.156  2015-04-09 10:27 CEST
- RestTest/Top.pm: fix dependency

0.157  2015-04-09 10:30 CEST
- t/cmd_admin/history.t: remove last vestiges of 'App::Dochazka::REST::Model'
  (replace with App::Dochazka::Model) because we want the CLI to be independent
  of the REST server

0.158  2015-04-10 20:07 CEST
- lay some groundwork for adding intervals

0.159  2015-04-13 11:16 CEST
- CommandMap.pm: add some command variants for entering new intervals
- Commands/Activity.pm: set up a command handler for "parse test"
- Commands/Interval.pm: add placeholder command handlers
- Guide.pm: mention the new commands
- Util.pm: implement 'parse_test' function; in 'truncate_to', do not attempt 
  truncate operation unless string is really longer than the maximum length

0.160  2015-04-13 13:43 CEST
- Test.pm: new module for reusable test components, ATM mainly do_parse_test
- Commands/Activity.pm: finesse how parse_test is called from command handler
- Util.pm: fix parse_test
- t/parser/commands.t: use do_parse_test

0.161  2015-04-13 13:45 CEST
- release.sh: suppress mv errors

0.162  2015-04-13 14:37 CEST
- Commands/Employee.pm: add parse_test boilerplate, re-arrange so command
  handlers are separated from helper functions; make sure names of helper
  functions start with _

0.163  2015-04-13 14:51 CEST
- found out that I had been (somewhat stupidly) sending the raw command string
  to parse_test, but this will not work with commands like "EMPLOYEE=worker" --
  should have been using the normalized command from the beginning -> fix

0.164  2015-04-13 17:40 CEST
- Commands/: reorganize routines and add parse_test support in remaining modules
- t/: add more do_parse_test calls

0.165  2015-04-13 18:01 CEST
- add more equivalent variants of INTERVAL NEW commands
- add parser support for INTERVAL SHOW commands
- add lots of gratuitous test cases

0.166  2015-04-14 08:38 CEST
- add more intuitive command syntax for adding new intervals
- Commands/Interval.pm: start working on a handler implementation

0.167  2015-04-14 12:48 CEST
- add t/util/ for testing the Util.pm module
- Util.pm: come up with two new functions: tsrange_from_timestamps and
  normalize_timestamp; write some documentation
- Util.pm, t/util/ts.t: implement normalize_timestamp using TDD
- TokenMap.pm: in _TIMESTAMP, recognize "TODAY", "TOMORROW", and "YESTERDAY"
  and use named capture groups to extract the date part and time part
- Parser.pm: add and comment out some print statements for debugging

0.168  2015-04-14 13:52 CEST
- Commands/History.pm: change _TIMESTAMP to _DATESTAMP where necessary
- Commands/Interva.pm: implement handlers for adding new intervals
- Util.pm: implement tsrange_from_timestamps routine
- t/util/ts.t: add test cases for tsrange_from_timestamps 

0.169  2015-04-14 15:39 CEST
- t/cmd_active/001-init.t: new unit that creates a schedule history record for
  employee "worker", so he can insert attendance intervals
- Commands/History.pm: SCHEDULE_SPEC can be either scode or sid, but we forgot
  to convert to lowercase => fix
- Util.pm: truncate_to was generating a warning => fix
- t/cmd_admin/history.t: add schedule history test case

0.170  2015-04-15 09:36 CEST
- Guide.pm: add section on creating new employees
- Commands/Employee.pm: allow new password to be specified on the command line
  and be more verbose when asking employee to repeat it

0.171  2015-04-15 10:15 CEST
- make history commands take _DATE only (instead of deprecated _DATESTAMP)

0.172  2015-04-15 10:30 CEST
- get rid of _DATESTAMP completely, replace it with _TIMESTAMP
- replace the old _TIMESTAMP with _TIMESTAMPDEPR

0.173  2015-04-15 20:08 CEST
- Build.PL: bring in Date::Calc dependency
- CLI.pm, bin/dochazka-cli: re-name "prompt date" package variable from
  $current_date to $prompt_date
- Util.pm, t/util/ts.t: split normalize_timestamp into normalize_date and
  normalize_time; handle offsets
- CommandMap.pm, Commands/Interval.pm, t/parser/commands.t: re-vamp interval
  insertion commands; use normalize_date and normalize_time

0.174  2015-04-16 07:12 CEST
- Commands/Interval.pm: eliminate some code duplication
- CommandMap.pm: add some new interval insertion commands
- CLI_Message_en.conf: add some proper error messages
- 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

Changes  view on Meta::CPAN

- 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
- Util.pm: implement init_prompt()
- Commands/Misc.pm: use init_prompt() instead of init_timepiece()

0.197  2015-07-05 14:19 CEST
- bin/dochazka-cli: $sitedir fall back to /etc/dochazka-cli
- require latest version of App::Dochazka for $today
- change Supervisor: to Reports to: in EMPLOYEE PROFILE output

0.198  2015-07-21 16:13 CEST
- Define $VERSION only in CLI.pm and Guide.pm
- Rename App::Dochazka::Common and update copyright statement

0.199  2015-07-22 14:51 CEST
- Convert MREST_CLI_URI_BASE to a meta param
- bin/dochazka-cli
    - get home directory using File::HomeDir
    - add --version option and take optional URL as argument
    - prompt for username and password if not supplied

0.200  2015-07-23 08:54 CEST
- Util.pm: modify lookup_employee() to take hash of properties ...
- t/: make sure config is loaded in test suite
- Util.pm and t/: Rename App::Dochazka to App::Dochazka::Common
- Build.PL: rename App::Dochazka to App::Dochazka::Common
- bin/dochazka-cli: do not display password as it is typed and ignore password
  stored in config if username not taken from config
- Do not generate Makefile.PL anymore

0.201  2015-07-23 18:47 CEST
- t/: adapt to current state
- Util.pm: use GET employee/.../minimal in determine_employee()
- TokenMap.pm: add LDAP token
- Commands/RestTest/Employee.pm: implement employee/nick/:nick/ldap resource
- Commands/Employee.pm: implement employee_ldap()
- CommandMap.pm: enable LDAP commands
- Commands/Employee.pm: display supervisor nick instead of EID

0.202  2015-07-25 04:09 CEST
- release scripting modifications
- cleanup: Commands/Activity.pm: display "Entering (etc.)" only in debug mode.
- Implement EMPLOYEE_SPEC LDAP IMPORT command
- Commands/Employee.pm: report to admins whether LDAP user is also a Dochazka
  user
- t/: put config load test in the right place
- Commands/Employee.pm: export employee_ldap() function

0.203  2015-07-25 19:01 CEST
- Util.pm: make refresh_current_emp() handle server insanity more robustly
- Commands/Employee.pm: implement determine_priv() helper function
- t/: adapt test suite to current state
- t/cmd_passerby/employee.t: convert comments to note() calls
- CommandMap/Employee.pm: implement EMPLOYEE_SPEC SUPERVISOR _TERM command
- CommandMap.pm: add EMPLOYEE_SPEC SUPERVISOR _TERM command
- TokenMap.pm: add SUPERVISOR token
- Build.PL: update repository and bugtracker resources
- config/CLI_Config.pm: suppress more headers

0.204  2015-07-25 23:33 CEST
- Util.pm: in lookup_employee(), do not go on to sec_id check when nick check
  returns 403
- Shared.pm: rename show_current() to show_as_at() to generalize it
- Commands/: rename current routines to as_at in Priv.pm and Schedule.pm
- CommandMap.pm: rename current routines to as_at and add PRIV and SCHEDULE
  commands with _DATE parameter
- Util.pm: expose determine_employee() argument in debug log

0.205  2015-07-27 10:14 CEST
- Build.PL: require a recent version of Web::MREST
- bin/dochazka-cli: use JSON->encode, instead of Data::Dumper, to format
  statuses for display to user
- Add boilerplate for SCHEDULE ALL and SCHEDULE ALL DISABLED commands
- Shared.pm: refrain from displaying time in show_as_at()

0.206  2015-07-27 13:58 CEST
- CommandMap.pm: change second _DATE to _DATE1
  (fixes Github issue #5)

0.207  2015-07-27 14:08 CEST
- Build.PL: change Web::MREST dependency to Web::MREST::CLI

0.208  2015-07-27 14:43 CEST
- Util.pm: import normalize_filespec() from Web::MREST::CLI::UserAgent

0.209  2015-07-27 21:34 CEST
- Util.pm: make CRIT log message more reasonable
- Commands/Employee.pm: use Term::ReadKey noecho mode when user types his
  password
- Commands/Employee.pm: fix a regression in lookup_employee()

0.210  2015-07-28 12:32 CEST
- Improve error message when user enters attempts to enter a new interval with
  a non-existent activity code
  Fixes: https://github.com/smithfarm/dochazka-cli/issues/10

0.211  2015-07-30 15:23 CEST
- Util.pm: drop init_cli_client() in favor of the one from Web::MREST::CLI
- bin/dochazka-cli: enable --early-debug option
- t/: drop superfluous boilerplate units
- Routines that were in Web::MREST::CLI::UserAgent are now in Web::MREST::CLI

0.212  2015-07-30 16:14 CEST
- Commands/Employee.pm: make a _display_employee_ok() helper function
  to assemble the OK return staus from EMPLOYEE PROFILE
- t/cmd_admin/employee.t: add test cases for EMPLOYEE_SPEC SUPERVISOR _TERM
- Commands/Employee.pm: make EMPLOYEE_SPEC SUPERVISOR _TERM output prett

0.213  2015-07-31 11:14 CEST
- Commands/Interval.pm: implement a _fillup_dry_run() function to help fetch
  and format fillup intervals
- bin/dochazka-cli: reinstate --debug parameter

0.214  2015-07-31 23:22 CEST
- work on https://github.com/smithfarm/dochazka-cli/issues/12
  - Commands/Interval.pm: fix syntax errors introduced in 0.213
  - Commands/Interval.pm: make _fillup_dry_run() return prettier output

0.215  2015-08-02 16:57 CEST
- Build.PL: require latest version of Web::MREST:CLI

0.216  2015-08-11 19:05 CEST
- Commands/Interval.pm: add _interval_fillup_delete_print() helper function
- Commands/Interval.pm: remove "fetch_" from function names
- Build.PL: require newest App::Dochazka::Common
- Implement GET HOLIDAY $TSRANGE command

0.217  2015-08-16 23:23 CEST
- Implement INTERVAL FILLUP _TSRANGE command
- Commands/Interval.pm: temporary fix for _fillup_dry_run() exception
- CommandMap.pm: interval/fillup resources now take a tsrange instead of two dates
- t/parser/rest_test.t: interval/fillup resources take a tsrange now
- Add INTERVAL FETCH ... COMMIT commands
- Commands/Interval.pm: make handlers commit-aware

0.218  2015-12-11 12:13 CET
- t/cmd_active/employee.t: fix check for ACL_VIOLATION
- prerelease.sh: copy new prerelease script from REST
- global: do not convert warnings into errors
- tests: use Test::Warnings to check for unexpected warnings
- update release and prerelease scripts

0.219  2016-01-06 21:11 CET
- Guide.pm: tell how to look up individual schedules
- Commands/Interval.pm: be aware of partial intervals
- Commands/Interval.pm: get count from $status->{'count'}
- CommandMap.pm: fix INTERVAL DELETE
- plumb in INTERVAL SUMMARY commands
- bin/dochazka-cli: tweak how NON_OK error statuses are displayed



( run in 0.631 second using v1.01-cache-2.11-cpan-ceb78f64989 )