Sha256: 1d118f7d9c1124f567f40313def6ca6d87f958f5f98a7fda93b38d629020505b
Contents?: true
Size: 700 Bytes
Versions: 7
Compression:
Stored size: 700 Bytes
Contents
module GitCompound module Worker # Worker that detects conflicting dependencies # class ConflictingDependencyChecker < Worker def initialize @components = [] end def visit_component(component) if conflict_exists?(component) raise ConflictingDependencyError, "Conflicting dependency detected in component `#{component.name}`!" end @components << component end private def conflict_exists?(component) @components.any? do |other| !(component == other && component.version == other.version) && component.path == other.path end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems