Class: SafeUpdate::GitRepo
- Inherits:
-
Object
- Object
- SafeUpdate::GitRepo
- Defined in:
- lib/safe_update/git_repo.rb
Instance Method Summary collapse
- #commit_gemfile_lock(message) ⇒ Object
- #discard_local_changes ⇒ Object
- #perform_safety_checks ⇒ Object
- #push ⇒ Object
Instance Method Details
#commit_gemfile_lock(message) ⇒ Object
17 18 19 20 |
# File 'lib/safe_update/git_repo.rb', line 17 def commit_gemfile_lock() `git add Gemfile.lock` `git commit -m '#{}'` end |
#discard_local_changes ⇒ Object
13 14 15 |
# File 'lib/safe_update/git_repo.rb', line 13 def discard_local_changes `git reset HEAD --hard` end |
#perform_safety_checks ⇒ Object
8 9 10 11 |
# File 'lib/safe_update/git_repo.rb', line 8 def perform_safety_checks check_for_staged_changes check_for_gemfile_lock_changes end |
#push ⇒ Object
22 23 24 |
# File 'lib/safe_update/git_repo.rb', line 22 def push `git push` end |