ok_to_remove?(full_name, check_dev=true)
public
Is is ok to remove a gemspec from the dependency list?
If removing the gemspec creates breaks a currently ok dependency, then it
is NOT ok to remove the gemspec.
# File lib/rubygems/dependency_list.rb, line 141
def ok_to_remove?(full_name, check_dev=true)
gem_to_remove = find_name full_name
siblings = @specs.find_all { |s|
s.name == gem_to_remove.name &&
s.full_name != gem_to_remove.full_name
}
deps = []
@specs.each do |spec|
check = check_dev ? spec.dependencies : spec.runtime_dependencies
check.each do |dep|
deps << dep if gem_to_remove.satisfies_requirement?(dep)
end
end
deps.all? { |dep|
siblings.any? { |s|
s.satisfies_requirement? dep
}
}
end