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

Merge branch 'disable-source-root'

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