Module: EacGit::Executables::GitCommandExtensions
- Defined in:
- lib/eac_git/executables/git_command_extensions.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
6 7 8 |
# File 'lib/eac_git/executables/git_command_extensions.rb', line 6 def command(*args) super.envvar('PATH', path_with_git_subrepo) end |
#gem_root ⇒ Object
10 11 12 |
# File 'lib/eac_git/executables/git_command_extensions.rb', line 10 def gem_root '../..'.to_pathname.(__dir__) end |
#git_subrepo_root ⇒ Object
14 15 16 |
# File 'lib/eac_git/executables/git_command_extensions.rb', line 14 def git_subrepo_root gem_root.join('vendor', 'git-subrepo') end |
#path_with_git_subrepo ⇒ Object
18 19 20 21 22 |
# File 'lib/eac_git/executables/git_command_extensions.rb', line 18 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 |