lib/solve/artifact.rb in solve-3.1.1 vs lib/solve/artifact.rb in solve-4.0.0
- old
+ new
@@ -72,11 +72,11 @@
# artifact
# .depends('nginx')
# .depends('ntp', '~> 1.3')
#
# @return [Solve::Artifact]
- def depends(name, constraint = '>= 0.0.0')
+ def depends(name, constraint = ">= 0.0.0")
unless dependency?(name, constraint)
set_dependency(name, constraint)
end
self
@@ -89,28 +89,28 @@
# @param [Object] other
#
# @return [Boolean]
def ==(other)
other.is_a?(self.class) &&
- self.name == other.name &&
- self.version == other.version
+ name == other.name &&
+ version == other.version
end
alias_method :eql?, :==
# @param [Semverse::Version] other
#
# @return [Integer]
def <=>(other)
- self.version <=> other.version
+ version <=> other.version
end
private
- def get_dependency(name, constraint)
- @dependencies["#{name}-#{constraint}"]
- end
+ def get_dependency(name, constraint)
+ @dependencies["#{name}-#{constraint}"]
+ end
- def set_dependency(name, constraint)
- @dependencies["#{name}-#{constraint}"] = Dependency.new(self, name, constraint)
- end
+ def set_dependency(name, constraint)
+ @dependencies["#{name}-#{constraint}"] = Dependency.new(self, name, constraint)
+ end
end
end