Module: EacGit::Executables::GitCommandExtensions
- Defined in:
- lib/eac_git/executables.rb
Instance Method Summary collapse
- #command(*args) ⇒ Object
- #gem_root ⇒ Object
- #git_subrepo_root ⇒ Object
- #path_with_git_subrepo ⇒ Object
Instance Method Details
#command(*args) ⇒ Object
24 25 26 |
# File 'lib/eac_git/executables.rb', line 24 def command(*args) super(*args).envvar('PATH', path_with_git_subrepo) end |
#gem_root ⇒ Object
28 29 30 |
# File 'lib/eac_git/executables.rb', line 28 def gem_root '../..'.to_pathname.(__dir__) end |
#git_subrepo_root ⇒ Object
32 33 34 |
# File 'lib/eac_git/executables.rb', line 32 def git_subrepo_root gem_root.join('vendor', 'git-subrepo') end |
#path_with_git_subrepo ⇒ Object
36 37 38 39 40 |
# File 'lib/eac_git/executables.rb', line 36 def path_with_git_subrepo ([git_subrepo_root.join('lib').to_path] + ENV['PATH'].if_present('').split(::File::PATH_SEPARATOR)) .join(::File::PATH_SEPARATOR) end |