Class: Grit::Repo
- Inherits:
-
Object
- Object
- Grit::Repo
- Defined in:
- lib/webpage-archivist/patches.rb
Overview
Patching the repo grit class to specify the work tree
Instance Method Summary collapse
- #add(*files) ⇒ Object
- #archive_zip(id, file) ⇒ Object
- #commit_index(message) ⇒ Object
- #remove(*files) ⇒ Object
Instance Method Details
#add(*files) ⇒ Object
21 22 23 |
# File 'lib/webpage-archivist/patches.rb', line 21 def add(*files) self.git.add({:chdir => self.git.work_tree}, *files.flatten) end |
#archive_zip(id, file) ⇒ Object
33 34 35 |
# File 'lib/webpage-archivist/patches.rb', line 33 def archive_zip(id, file) self.git.archive({:chdir => self.git.work_tree}, "--output=#{file}", id) end |
#commit_index(message) ⇒ Object
29 30 31 |
# File 'lib/webpage-archivist/patches.rb', line 29 def commit_index() self.git.commit({:chdir => self.git.work_tree}, '--allow-empty', '-m', ) end |
#remove(*files) ⇒ Object
25 26 27 |
# File 'lib/webpage-archivist/patches.rb', line 25 def remove(*files) self.git.rm({:chdir => self.git.work_tree}, *files.flatten) end |