Class: SafeDb::Push
- Inherits:
-
Controller
- Object
- Controller
- SafeDb::Push
- Defined in:
- lib/controller/db/push.rb
Overview
A safe push will save the state of the local safe database in a backend location (currently only a Git repository).
This class does not require the user to be logged into a book. Naturally it expects safe remote –provision to have been called which creates the remote backend and then sets the git remote origin urls for fetch and push.
Instance Method Summary collapse
-
#execute ⇒ Object
Execute the business of pushing to a remote safe backend repository.
Methods inherited from Controller
#check_post_conditions, #check_pre_conditions, #flow, #initialize, #open_remote_backend_location, #post_validation, #pre_validation, #read_verse, #set_verse, #update_verse
Constructor Details
This class inherits a constructor from SafeDb::Controller
Instance Method Details
#execute ⇒ Object
Execute the business of pushing to a remote safe backend repository.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/controller/db/push.rb', line 16 def execute() # Only required when git pulling on a machine for # the very first time. This is used to grab the # github access token and repository user and repository # name for creating the push origin url. # ---------------------------------------------------------- # open_remote_backend_location() # ---------------------------------------------------------- puts "" puts "Pushing safe commits to the backend repository." puts "" GitFlow.push( Indices::MASTER_CRYPTS_FOLDER_PATH ) puts "" end |