Skip to content
This repository has been archived by the owner on Jun 13, 2019. It is now read-only.

[WIP] Refactor: easybib_crontab #287

Merged
merged 9 commits into from Apr 25, 2014
Merged

[WIP] Refactor: easybib_crontab #287

merged 9 commits into from Apr 25, 2014

Conversation

till
Copy link
Owner

@till till commented Apr 16, 2014

  • moved cron parsing logic into a library
  • exit early from provider code to avoid large if/else
  • todo:
    • test (this is just a WIP)
    • discuss this approach
    • consider introducing EasyBib::Cron::Entry
    • add a test to confirm parsing works as expected

 * moved cron parsing logic into a library
 * exit early from provider code to avoid large if/else

 * todo:
   * test (this is just a WIP)
   * discuss this approach
   * add a test to confirm parsing works as expected
@till till assigned fh Apr 16, 2014
@till till changed the title Refactor: easybib_crontab [WIP] Refactor: easybib_crontab Apr 16, 2014

cron_d cron_name do
action :create
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would take this even further and add:

module EasyBib
  module Cron
    module Entry
      def hour, minute, day, month, weekday, command
    end
  end
end

What do you think?

@till
Copy link
Owner Author

till commented Apr 16, 2014

@fh Let me know what you think, one thing I cannot figure out right now is a loading issue. The class is not found in the provider, but this seems to work otherwise.

@fh
Copy link
Contributor

fh commented Apr 23, 2014

This one works for me, at least the tests seem to be fine. Feel free to merge when you are satisfied, too :)

Fixes the following error in a chef-run:
DEBUG: LocalJumpError: easybib_crontab[gearmanworker] had an error: LocalJumpError: unexpected return
Return with next, because Ruby.
@till
Copy link
Owner Author

till commented Apr 24, 2014

@fh last test will break the build, let me know if you can check it out.

@fh
Copy link
Contributor

fh commented Apr 24, 2014

@till Just did, see xmpp :)

fh pushed a commit that referenced this pull request Apr 25, 2014
@fh fh merged commit 4380745 into master Apr 25, 2014
@fh fh deleted the refactor/easybib_crontab branch April 25, 2014 13:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants