Class: GroceryDelivery::Hooks
- Inherits:
-
Object
- Object
- GroceryDelivery::Hooks
- Defined in:
- lib/grocery_delivery/hooks.rb
Overview
Hook class for GD
Class Method Summary collapse
-
.atexit(_dryrun, _success, _msg) ⇒ Object
exit hooks.
- .get(file) ⇒ Object
-
.post_repo_up(_dryrun) ⇒ Object
This is code to run after we’ve updated the repo, but before we’ve done any work to parse it.
-
.postrun(_dryrun, _success, _msg) ⇒ Object
After we parse the updates to the repo and uploaded/deleted the relevent items from the local server.
-
.preflight_checks(_dryrun) ⇒ Object
This code will run once we’ve read our config and loaded our plugins but before anything else.
-
.prerun(_dryrun) ⇒ Object
This is run after we’ve gotten a lock, written a pidfile and initialized our repo object (but not touched the repo yet).
Class Method Details
.atexit(_dryrun, _success, _msg) ⇒ Object
exit hooks.
41 42 |
# File 'lib/grocery_delivery/hooks.rb', line 41 def self.atexit(_dryrun, _success, _msg) end |
.get(file) ⇒ Object
44 45 46 |
# File 'lib/grocery_delivery/hooks.rb', line 44 def self.get(file) class_eval(File.read(file), __FILE__, __LINE__) if File.exists?(file) end |
.post_repo_up(_dryrun) ⇒ Object
This is code to run after we’ve updated the repo, but before we’ve done any work to parse it.
32 33 |
# File 'lib/grocery_delivery/hooks.rb', line 32 def self.post_repo_up(_dryrun) end |
.postrun(_dryrun, _success, _msg) ⇒ Object
After we parse the updates to the repo and uploaded/deleted the relevent items from the local server.
37 38 |
# File 'lib/grocery_delivery/hooks.rb', line 37 def self.postrun(_dryrun, _success, _msg) end |
.preflight_checks(_dryrun) ⇒ Object
This code will run once we’ve read our config and loaded our plugins but before anything else. We don’t even have a lock yet.
22 23 |
# File 'lib/grocery_delivery/hooks.rb', line 22 def self.preflight_checks(_dryrun) end |
.prerun(_dryrun) ⇒ Object
This is run after we’ve gotten a lock, written a pidfile and initialized our repo object (but not touched the repo yet)
27 28 |
# File 'lib/grocery_delivery/hooks.rb', line 27 def self.prerun(_dryrun) end |