Class: FPM::Fry::Source::Git::Cache
- Inherits:
-
Struct
- Object
- Struct
- FPM::Fry::Source::Git::Cache
- Extended by:
- Forwardable
- Defined in:
- lib/fpm/fry/source/git.rb
Instance Attribute Summary collapse
-
#package ⇒ Object
Returns the value of attribute package.
-
#tempdir ⇒ Object
Returns the value of attribute tempdir.
Instance Method Summary collapse
Instance Attribute Details
#package ⇒ Object
Returns the value of attribute package
43 44 45 |
# File 'lib/fpm/fry/source/git.rb', line 43 def package @package end |
#tempdir ⇒ Object
Returns the value of attribute tempdir
43 44 45 |
# File 'lib/fpm/fry/source/git.rb', line 43 def tempdir @tempdir end |
Instance Method Details
#cachekey ⇒ Object
59 60 61 |
# File 'lib/fpm/fry/source/git.rb', line 59 def cachekey Exec::exec(package.git, "--git-dir=#{repodir}",'rev-parse','FETCH_HEAD^{tree}', logger: logger).chomp end |
#copy_to(dst) ⇒ Object
52 53 54 55 56 57 |
# File 'lib/fpm/fry/source/git.rb', line 52 def copy_to(dst) Exec[ package.git, "--git-dir=#{repodir}", "--work-tree=#{dst}",'checkout','FETCH_HEAD','--','*', chdir: dst, logger: logger ] end |
#prefix ⇒ Object
63 64 65 |
# File 'lib/fpm/fry/source/git.rb', line 63 def prefix "" end |