Module: Dependabot::Utils
- Defined in:
- lib/dependabot/utils.rb
Constant Summary collapse
- BUMP_TMP_FILE_PREFIX =
"dependabot_"
- BUMP_TMP_DIR_PATH =
"tmp"
Class Method Summary collapse
- .always_clone_for_package_manager?(package_manager) ⇒ Boolean
- .register_always_clone(package_manager) ⇒ Object
- .register_requirement_class(package_manager, requirement_class) ⇒ Object
- .register_version_class(package_manager, version_class) ⇒ Object
- .requirement_class_for_package_manager(package_manager) ⇒ Object
- .version_class_for_package_manager(package_manager) ⇒ Object
Class Method Details
.always_clone_for_package_manager?(package_manager) ⇒ Boolean
40 41 42 |
# File 'lib/dependabot/utils.rb', line 40 def self.always_clone_for_package_manager?(package_manager) @cloning_package_managers.include?(package_manager) end |
.register_always_clone(package_manager) ⇒ Object
44 45 46 |
# File 'lib/dependabot/utils.rb', line 44 def self.register_always_clone(package_manager) @cloning_package_managers << package_manager end |
.register_requirement_class(package_manager, requirement_class) ⇒ Object
34 35 36 |
# File 'lib/dependabot/utils.rb', line 34 def self.register_requirement_class(package_manager, requirement_class) @requirement_classes[package_manager] = requirement_class end |
.register_version_class(package_manager, version_class) ⇒ Object
21 22 23 |
# File 'lib/dependabot/utils.rb', line 21 def self.register_version_class(package_manager, version_class) @version_classes[package_manager] = version_class end |
.requirement_class_for_package_manager(package_manager) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/dependabot/utils.rb', line 27 def self.requirement_class_for_package_manager(package_manager) requirement_class = @requirement_classes[package_manager] return requirement_class if requirement_class raise "Unsupported package_manager #{package_manager}" end |
.version_class_for_package_manager(package_manager) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/dependabot/utils.rb', line 14 def self.version_class_for_package_manager(package_manager) version_class = @version_classes[package_manager] return version_class if version_class raise "Unsupported package_manager #{package_manager}" end |