Commit 7fc26df9 authored by Fabio Pelosin's avatar Fabio Pelosin

[SourcesManager] Adapt for YAMLHelper changes

parent 946380c7
GIT GIT
remote: https://github.com/CocoaPods/CLAide.git remote: https://github.com/CocoaPods/CLAide.git
revision: 2d1ade5e062be937e630920c7399dbe1bee48d93 revision: e64c76edd9dbc540776772097b78ae27720eccbb
branch: master branch: master
specs: specs:
claide (0.6.1) claide (0.6.1)
GIT GIT
remote: https://github.com/CocoaPods/Core.git remote: https://github.com/CocoaPods/Core.git
revision: 54327d78336f93e2301d1e8bf1c637c1a3271892 revision: 75028fcea7c8e02cff17ada95bb17f123ac949cc
branch: master branch: master
specs: specs:
cocoapods-core (0.33.1) cocoapods-core (0.33.1)
......
...@@ -269,8 +269,7 @@ module Pod ...@@ -269,8 +269,7 @@ module Pod
yaml_file = dir + 'CocoaPods-version.yml' yaml_file = dir + 'CocoaPods-version.yml'
return {} unless yaml_file.exist? return {} unless yaml_file.exist?
begin begin
yaml = Pathname.new(yaml_file).read YAMLHelper.load_file(yaml_file)
YAMLHelper.load(yaml)
rescue Informative => e rescue Informative => e
raise Informative, "There was an error reading '#{yaml_file}'.\n" \ raise Informative, "There was an error reading '#{yaml_file}'.\n" \
'Please consult http://blog.cocoapods.org/' \ 'Please consult http://blog.cocoapods.org/' \
......
...@@ -154,7 +154,7 @@ module Pod ...@@ -154,7 +154,7 @@ module Pod
end end
it 'raises when reading version information with merge conflict' do it 'raises when reading version information with merge conflict' do
Pathname.any_instance.stubs(:read).returns(merge_conflict_version_yaml) File.stubs(:read).returns(merge_conflict_version_yaml)
e = lambda { SourcesManager.version_information(SourcesManager.master_repo_dir) }.should.raise Informative e = lambda { SourcesManager.version_information(SourcesManager.master_repo_dir) }.should.raise Informative
e.message.should.match /Repairing-Our-Broken-Specs-Repository/ e.message.should.match /Repairing-Our-Broken-Specs-Repository/
end end
......
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