Module: Dependabot::Composer::NativeHelpers

Defined in:
lib/dependabot/composer/native_helpers.rb

Class Method Summary collapse

Class Method Details

.composer_helper_path(composer_version: "2") ⇒ Object



7
8
9
# File 'lib/dependabot/composer/native_helpers.rb', line 7

def self.composer_helper_path(composer_version: "2")
  File.join(composer_helpers_dir, "v#{composer_version}", "bin/run")
end

.composer_helpers_dirObject



11
12
13
# File 'lib/dependabot/composer/native_helpers.rb', line 11

def self.composer_helpers_dir
  File.join(native_helpers_root, "composer")
end

.native_helpers_rootObject



15
16
17
18
# File 'lib/dependabot/composer/native_helpers.rb', line 15

def self.native_helpers_root
  default_path = File.join(__dir__, "../../../..")
  ENV.fetch("DEPENDABOT_NATIVE_HELPERS_PATH", default_path)
end