Module: Dependabot::Pub::Helpers

Extended by:
T::Helpers, T::Sig
Includes:
Kernel
Included in:
FileParser, FileUpdater, Package::PackageDetailsFetcher, UpdateChecker
Defined in:
lib/dependabot/pub/helpers.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.pub_helpers_pathObject



35
36
37
# File 'lib/dependabot/pub/helpers.rb', line 35

def self.pub_helpers_path
  File.join(ENV.fetch("DEPENDABOT_NATIVE_HELPERS_PATH", nil), "pub")
end

.run_infer_sdk_versions(dir, url: nil) ⇒ Object



46
47
48
49
50
51
52
53
54
# File 'lib/dependabot/pub/helpers.rb', line 46

def self.run_infer_sdk_versions(dir, url: nil)
  env = {}
  cmd = File.join(pub_helpers_path, "infer_sdk_versions")
  opts = url ? "--flutter-releases-url=#{url}" : ""
  stdout, _, status = Open3.capture3(env, cmd, opts, chdir: dir)
  return nil unless status.success?

  JSON.parse(stdout)
end

Instance Method Details

#credentialsObject



26
# File 'lib/dependabot/pub/helpers.rb', line 26

def credentials; end

#dependency_filesObject



29
# File 'lib/dependabot/pub/helpers.rb', line 29

def dependency_files; end

#optionsObject



32
# File 'lib/dependabot/pub/helpers.rb', line 32

def options; end