pbyrne / cron-checker

Source code for the Cron Checker site.
http://cronchecker.net/
Other
116 stars 17 forks source link

Move some logic from the controller to CronParsr #20

Closed pbyrne closed 10 years ago

pbyrne commented 10 years ago

Makes the controller simpler, with fewer edge cases. I'm not 100% happy with CronParser#error_message. I wonder if I'm missing another service object, like CronParseError. Also, I'd like to stop relying on CronParser#cron raising an exception when something's wrong.

pbyrne commented 10 years ago

The duplication of logic (checking for presence of the statement and checking the validity) between CronParser#cron and CronParser#error_message suggest that I'm missing something. Maybe the parser and the validator should be two separate concerns. Something to noodle.