Class: Dependabot::PackageManagerBase

Inherits:
Object
  • Object
show all
Extended by:
T::Helpers, T::Sig
Defined in:
lib/dependabot/package_manager.rb

Instance Method Summary collapse

Instance Method Details

#deprecated?Boolean

Returns:

  • (Boolean)


57
58
59
60
61
62
# File 'lib/dependabot/package_manager.rb', line 57

def deprecated?
  # If the version is unsupported, the unsupported error is getting raised separately.
  return false if unsupported?

  deprecated_versions.include?(version)
end

#deprecated_versionsObject



30
31
32
# File 'lib/dependabot/package_manager.rb', line 30

def deprecated_versions
  []
end

#nameObject



17
# File 'lib/dependabot/package_manager.rb', line 17

def name; end

#raise_if_unsupported!Object



76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/dependabot/package_manager.rb', line 76

def raise_if_unsupported!
  return unless unsupported?

  # Example: v2.*, v3.*
  supported_versions_message = supported_versions.map { |v| "v#{v}.*" }.join(", ")

  raise ToolVersionNotSupported.new(
    name,
    version.to_s,
    supported_versions_message
  )
end

#support_later_versions?Boolean

Returns:

  • (Boolean)


94
95
96
# File 'lib/dependabot/package_manager.rb', line 94

def support_later_versions?
  false
end

#supported_versionsObject



48
49
50
# File 'lib/dependabot/package_manager.rb', line 48

def supported_versions
  []
end

#unsupported?Boolean

Returns:

  • (Boolean)


69
70
71
# File 'lib/dependabot/package_manager.rb', line 69

def unsupported?
  false
end

#unsupported_versionsObject



39
40
41
# File 'lib/dependabot/package_manager.rb', line 39

def unsupported_versions
  []
end

#versionObject



23
# File 'lib/dependabot/package_manager.rb', line 23

def version; end