Class: GitPusshuTen::Local
- Inherits:
-
Object
- Object
- GitPusshuTen::Local
- Defined in:
- lib/gitpusshuten/local.rb
Instance Method Summary collapse
-
#create_tmp_dir! ⇒ Object
Create tmp_dir.
-
#execute(command) ⇒ Object
Performs a command on the local machien.
-
#gitpusshuten_dir ⇒ Object
Returns the .gitpusshuten local directory.
-
#remove_tmp_dir! ⇒ Object
Removes everything inside the tmp_dir.
-
#tmp_dir ⇒ Object
Returns the .gitpusshuten tmp directory.
Instance Method Details
#create_tmp_dir! ⇒ Object
Create tmp_dir
24 25 26 |
# File 'lib/gitpusshuten/local.rb', line 24 def create_tmp_dir! FileUtils.mkdir_p(tmp_dir) end |
#execute(command) ⇒ Object
Performs a command on the local machien
6 7 8 |
# File 'lib/gitpusshuten/local.rb', line 6 def execute(command) %x[#{command}] end |
#gitpusshuten_dir ⇒ Object
Returns the .gitpusshuten local directory
12 13 14 |
# File 'lib/gitpusshuten/local.rb', line 12 def gitpusshuten_dir File.join(Dir.pwd, '.gitpusshuten') end |
#remove_tmp_dir! ⇒ Object
Removes everything inside the tmp_dir
30 31 32 |
# File 'lib/gitpusshuten/local.rb', line 30 def remove_tmp_dir! FileUtils.rm_rf(tmp_dir) end |
#tmp_dir ⇒ Object
Returns the .gitpusshuten tmp directory
18 19 20 |
# File 'lib/gitpusshuten/local.rb', line 18 def tmp_dir File.join(gitpusshuten_dir, 'tmp') end |