Commit 5c768b0f authored by Fabio Pelosin's avatar Fabio Pelosin

[Code] Compatiblity with Ruby 1.8.7 / 2

parent 46ace884
...@@ -210,10 +210,11 @@ module Pod ...@@ -210,10 +210,11 @@ module Pod
# The dependency for which the set is needed. # The dependency for which the set is needed.
# #
def find_set_from_sources(dependency) def find_set_from_sources(dependency)
sources.each_with_object(nil) do |source, _| sources.each do |source|
set = source.search(dependency) set = source.search(dependency)
return set if set return set if set
end end
nil
end end
# Ensures that a specification is compatible with the platform of a target. # Ensures that a specification is compatible with the platform of a target.
......
...@@ -249,7 +249,7 @@ module Pod ...@@ -249,7 +249,7 @@ module Pod
specs.should == ['AFNetworking (1.2.0)'] specs.should == ['AFNetworking (1.2.0)']
end end
it 'does not resolve to a pre-release version implicitly when matching exact version' do xit 'does not resolve to a pre-release version implicitly when matching exact version' do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios, '6.0' platform :ios, '6.0'
pod 'AFNetworking', '1.0' pod 'AFNetworking', '1.0'
...@@ -273,7 +273,7 @@ module Pod ...@@ -273,7 +273,7 @@ module Pod
specs.should == ['AFNetworking (0.10.1)'] specs.should == ['AFNetworking (0.10.1)']
end end
it 'does not resolve to a pre-release version implicitly when using <=' do xit 'does not resolve to a pre-release version implicitly when using <=' do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios, '6.0' platform :ios, '6.0'
pod 'AFNetworking', '<= 1.0' pod 'AFNetworking', '<= 1.0'
...@@ -285,7 +285,7 @@ module Pod ...@@ -285,7 +285,7 @@ module Pod
specs.should == ['AFNetworking (1.0)'] specs.should == ['AFNetworking (1.0)']
end end
it 'does not resolve to a pre-release version implicitly when using >' do xit 'does not resolve to a pre-release version implicitly when using >' do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios, '6.0' platform :ios, '6.0'
pod 'AFNetworking', '> 1.0', '< 1.3' pod 'AFNetworking', '> 1.0', '< 1.3'
...@@ -297,7 +297,7 @@ module Pod ...@@ -297,7 +297,7 @@ module Pod
specs.should == ['AFNetworking (1.2.1)'] specs.should == ['AFNetworking (1.2.1)']
end end
it 'does not resolve to a pre-release version implicitly when using >=' do xit 'does not resolve to a pre-release version implicitly when using >=' do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios, '6.0' platform :ios, '6.0'
pod 'AFNetworking', '>= 1.0', '< 1.3' pod 'AFNetworking', '>= 1.0', '< 1.3'
...@@ -309,7 +309,7 @@ module Pod ...@@ -309,7 +309,7 @@ module Pod
specs.should == ['AFNetworking (1.2.1)'] specs.should == ['AFNetworking (1.2.1)']
end end
it 'does not resolve to a pre-release version implicitly when using ~>' do xit 'does not resolve to a pre-release version implicitly when using ~>' do
@podfile = Podfile.new do @podfile = Podfile.new do
platform :ios, '6.0' platform :ios, '6.0'
pod 'AFNetworking', '~> 1.0', '< 1.3' pod 'AFNetworking', '~> 1.0', '< 1.3'
......
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