Commit 56c1f654 authored by Eloy Duran's avatar Eloy Duran

Make it work with RubyGems 1.3.6, which is the version that ships with OS X 10.7.

parent cb3fad63
Subproject commit 23a54f4021bcfebf284e3cb62decc7c832594285
Subproject commit 837311587d41f2aa885eb806e80094824750e08e
......@@ -98,6 +98,23 @@ module Pod
end
end
# Taken from RubyGems 1.3.7
unless public_method_defined?(:match?)
def match?(spec_name, spec_version)
pattern = name
if Regexp === pattern
return false unless pattern =~ spec_name
else
return false unless pattern == spec_name
end
return true if requirement.to_s == ">= 0"
requirement.satisfied_by? Gem::Version.new(spec_version)
end
end
# Taken from a newer version of RubyGems
unless public_method_defined?(:merge)
def merge other
......
......@@ -26,7 +26,8 @@ module Pod
def required_by(specification)
dependency = specification.dependency_by_top_level_spec_name(name)
unless @required_by.empty? || dependency.requirement.satisfied_by?(required_version)
# TODO we don’t actually do anything in our Version subclass. Maybe we should just remove that.
unless @required_by.empty? || dependency.requirement.satisfied_by?(Gem::Version.new(required_version.to_s))
# TODO add graph that shows which dependencies led to this.
raise Informative, "#{specification} tries to activate `#{dependency}', " \
"but already activated version `#{required_version}' " \
......
Subproject commit 07452eae307c48bda451c55c8955282a6043f1d7
Subproject commit 5e19daf9a13f708108483037f9cd2c778f239475
......@@ -59,6 +59,8 @@ describe "Pod::Installer" do
installer.target_installers.map(&:definition).map(&:name).should == [:not_empty]
end
# TODO remove this functionality? We create the header structure at `pod install`
# time nowadays, so that *is* before anything else already.
it "moves the compile and link phases to the end of the build phases list, so Pod headers are copied first and sources can use the same header dir structure" do
podfile = Pod::Podfile.new do
platform :osx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment