Commit 831b6689 authored by Kyle Fuller's avatar Kyle Fuller

Merge branch 'disable-source-root'

parents ad74b7f3 e1572e5b
...@@ -28,14 +28,14 @@ module Pod ...@@ -28,14 +28,14 @@ module Pod
sandbox.root.children.each do |child| sandbox.root.children.each do |child|
relative = child.relative_path_from(sandbox.root) relative = child.relative_path_from(sandbox.root)
case relative.to_s case relative.to_s
when 'Manifest.lock', 'Pods.xcodeproj', 'Sources', 'Headers', when 'Manifest.lock', 'Pods.xcodeproj', 'Headers',
'Target Support Files', 'Local Podspecs' 'Target Support Files', 'Local Podspecs'
next next
when 'BuildHeaders', 'PublicHeaders' when 'BuildHeaders', 'PublicHeaders'
delete(child) delete(child)
else else
if child.directory? && child.extname != '.xcodeproj' if child.directory? && child.extname != '.xcodeproj'
move(child, sandbox.sources_root + relative) next
else else
delete(child) delete(child)
end end
......
...@@ -29,8 +29,7 @@ module Pod ...@@ -29,8 +29,7 @@ module Pod
# | +-- Pods-prefix.pch # | +-- Pods-prefix.pch
# | +-- Pods.xcconfig # | +-- Pods.xcconfig
# | # |
# +-- Sources # +-- [Pod Name]
# | +-- [Pod Name]
# | # |
# +-- Manifest.lock # +-- Manifest.lock
# | # |
...@@ -173,7 +172,7 @@ module Pod ...@@ -173,7 +172,7 @@ module Pod
# the Pods are stored. # the Pods are stored.
# #
def sources_root def sources_root
root + 'Sources' root
end end
# @return [Pathname] the path for the directory where the # @return [Pathname] the path for the directory where the
......
Subproject commit 64203384a3ac363eab602bc6f09004d483f594e1 Subproject commit b7c1ab1a977958c5f6f657ee8577703d04f79fc4
...@@ -168,7 +168,7 @@ module Pod ...@@ -168,7 +168,7 @@ module Pod
it 'returns whether the folder containing the Pod with the given name exists' do it 'returns whether the folder containing the Pod with the given name exists' do
@analyzer.send(:folder_exist?, 'BananaLib').should.be.false @analyzer.send(:folder_exist?, 'BananaLib').should.be.false
path = temporary_directory + 'Pods/Sources/BananaLib' path = temporary_directory + 'Pods/BananaLib'
path.mkpath path.mkpath
@analyzer.send(:folder_exist?, 'BananaLib').should.be.true @analyzer.send(:folder_exist?, 'BananaLib').should.be.true
...@@ -176,7 +176,7 @@ module Pod ...@@ -176,7 +176,7 @@ module Pod
it 'returns whether the folder containing the Pod with the given name is empty' do it 'returns whether the folder containing the Pod with the given name is empty' do
@analyzer.send(:folder_empty?, 'BananaLib').should.be.true @analyzer.send(:folder_empty?, 'BananaLib').should.be.true
path = temporary_directory + 'Pods/Sources/BananaLib' path = temporary_directory + 'Pods/BananaLib'
path.mkpath path.mkpath
File.open(path + 'file', 'w') {} File.open(path + 'file', 'w') {}
@analyzer.send(:folder_empty?, 'BananaLib').should.be.false @analyzer.send(:folder_empty?, 'BananaLib').should.be.false
......
...@@ -2,16 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__) ...@@ -2,16 +2,6 @@ require File.expand_path('../../../spec_helper', __FILE__)
module Pod module Pod
describe Installer::Migrator do describe Installer::Migrator do
it 'performs a migration' do
manifest = stub(:cocoapods_version => Version.new('0.32'))
config.sandbox.stubs(:manifest).returns(manifest)
old_path = config.sandbox.root + 'ARAnalytics'
old_path.mkdir
Installer::Migrator.migrate(config.sandbox)
old_path.should.not.exist?
(config.sandbox.sources_root + 'ARAnalytics').should.exist?
end
it "doesn't perform migrations if they are not needed" do it "doesn't perform migrations if they are not needed" do
manifest = stub(:cocoapods_version => Version.new('999')) manifest = stub(:cocoapods_version => Version.new('999'))
config.sandbox.stubs(:manifest).returns(manifest) config.sandbox.stubs(:manifest).returns(manifest)
......
...@@ -119,14 +119,14 @@ module Pod ...@@ -119,14 +119,14 @@ module Pod
it 'cleans the paths non used by the installation' do it 'cleans the paths non used by the installation' do
@installer.install! @installer.install!
@installer.clean! @installer.clean!
unused_file = config.sandbox.root + 'Sources/BananaLib/sub-dir/sub-dir-2/somefile.txt' unused_file = config.sandbox.root + 'BananaLib/sub-dir/sub-dir-2/somefile.txt'
unused_file.should.not.exist unused_file.should.not.exist
end end
it 'preserves important files like the LICENSE and the README' do it 'preserves important files like the LICENSE and the README' do
@installer.install! @installer.install!
@installer.clean! @installer.clean!
readme_file = config.sandbox.root + 'Sources/BananaLib/README' readme_file = config.sandbox.root + 'BananaLib/README'
readme_file.should.exist readme_file.should.exist
end end
...@@ -169,13 +169,13 @@ module Pod ...@@ -169,13 +169,13 @@ module Pod
@installer.send(:download_source) @installer.send(:download_source)
paths = @installer.send(:clean_paths) paths = @installer.send(:clean_paths)
relative_paths = paths.map { |p| p.gsub("#{temporary_directory}/", '') } relative_paths = paths.map { |p| p.gsub("#{temporary_directory}/", '') }
paths_without_git = relative_paths.reject { |p| p.include? 'Pods/Sources/BananaLib/.git' } paths_without_git = relative_paths.reject { |p| p.include? 'Pods/BananaLib/.git' }
paths_without_git.sort.should == [ paths_without_git.sort.should == [
'Pods/Sources/BananaLib/BananaLib.podspec', 'Pods/BananaLib/BananaLib.podspec',
'Pods/Sources/BananaLib/libPusher', 'Pods/BananaLib/libPusher',
'Pods/Sources/BananaLib/sub-dir', 'Pods/BananaLib/sub-dir',
'Pods/Sources/BananaLib/sub-dir/sub-dir-2', 'Pods/BananaLib/sub-dir/sub-dir-2',
'Pods/Sources/BananaLib/sub-dir/sub-dir-2/somefile.txt', 'Pods/BananaLib/sub-dir/sub-dir-2/somefile.txt',
] ]
end end
...@@ -184,13 +184,13 @@ module Pod ...@@ -184,13 +184,13 @@ module Pod
paths = @installer.send(:used_files) paths = @installer.send(:used_files)
relative_paths = paths.map { |p| p.gsub("#{temporary_directory}/", '') } relative_paths = paths.map { |p| p.gsub("#{temporary_directory}/", '') }
relative_paths.sort.should == [ relative_paths.sort.should == [
'Pods/Sources/BananaLib/Classes/Banana.h', 'Pods/BananaLib/Classes/Banana.h',
'Pods/Sources/BananaLib/Classes/Banana.m', 'Pods/BananaLib/Classes/Banana.m',
'Pods/Sources/BananaLib/Classes/BananaLib.pch', 'Pods/BananaLib/Classes/BananaLib.pch',
'Pods/Sources/BananaLib/Classes/BananaPrivate.h', 'Pods/BananaLib/Classes/BananaPrivate.h',
'Pods/Sources/BananaLib/LICENSE', 'Pods/BananaLib/LICENSE',
'Pods/Sources/BananaLib/README', 'Pods/BananaLib/README',
'Pods/Sources/BananaLib/Resources/logo-sidebar.png', 'Pods/BananaLib/Resources/logo-sidebar.png',
] ]
end end
...@@ -208,13 +208,13 @@ module Pod ...@@ -208,13 +208,13 @@ module Pod
paths = @installer.send(:used_files) paths = @installer.send(:used_files)
relative_paths = paths.map { |p| p.gsub("#{temporary_directory}/", '') } relative_paths = paths.map { |p| p.gsub("#{temporary_directory}/", '') }
relative_paths.sort.should == [ relative_paths.sort.should == [
'Pods/Sources/BananaLib/Classes/Banana.h', 'Pods/BananaLib/Classes/Banana.h',
'Pods/Sources/BananaLib/Classes/Banana.m', 'Pods/BananaLib/Classes/Banana.m',
'Pods/Sources/BananaLib/Classes/BananaLib.pch', 'Pods/BananaLib/Classes/BananaLib.pch',
'Pods/Sources/BananaLib/Classes/BananaPrivate.h', 'Pods/BananaLib/Classes/BananaPrivate.h',
'Pods/Sources/BananaLib/LICENSE', 'Pods/BananaLib/LICENSE',
'Pods/Sources/BananaLib/README', 'Pods/BananaLib/README',
'Pods/Sources/BananaLib/Resources/logo-sidebar.png', 'Pods/BananaLib/Resources/logo-sidebar.png',
] ]
end end
......
...@@ -52,7 +52,7 @@ module Pod ...@@ -52,7 +52,7 @@ module Pod
path = config.sandbox.pod_dir('BananaLib') path = config.sandbox.pod_dir('BananaLib')
group = @project.add_pod_group('BananaLib', @path) group = @project.add_pod_group('BananaLib', @path)
group.source_tree.should == '<group>' group.source_tree.should == '<group>'
group.path.should == 'Sources/BananaLib' group.path.should == 'BananaLib'
Pathname.new(group.path).should.be.relative Pathname.new(group.path).should.be.relative
end end
......
...@@ -78,7 +78,7 @@ module Pod ...@@ -78,7 +78,7 @@ module Pod
it 'returns the directory where a Pod is stored' do it 'returns the directory where a Pod is stored' do
@sandbox.pod_dir('JSONKit').should == @sandbox.pod_dir('JSONKit').should ==
temporary_directory + 'Sandbox/Sources/JSONKit' temporary_directory + 'Sandbox/JSONKit'
end end
it 'returns the directory where a local Pod is stored' do it 'returns the directory where a local Pod is stored' do
......
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