Commit f486920b authored by Marin Usalj's avatar Marin Usalj

fixed bad merge

parent fd6c3d71
...@@ -146,7 +146,7 @@ module Pod ...@@ -146,7 +146,7 @@ module Pod
# source. # source.
# #
def downloader def downloader
@downloader ||= Config.instance.downloader(root, root_spec.source.dup) @downloader ||= Config.downloader(root, root_spec.source.dup)
end end
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
......
...@@ -7,7 +7,7 @@ module Pod ...@@ -7,7 +7,7 @@ module Pod
@spec = fixture_spec('banana-lib/BananaLib.podspec') @spec = fixture_spec('banana-lib/BananaLib.podspec')
@spec.source = { :git => SpecHelper.fixture('banana-lib') } @spec.source = { :git => SpecHelper.fixture('banana-lib') }
specs_by_platform = { :ios => [@spec] } specs_by_platform = { :ios => [@spec] }
@installer = Installer::PodSourceInstaller.new(config.sandbox, specs_by_platform) @installer = Installer::PodSourceInstaller.new(environment.sandbox, specs_by_platform)
end end
#-------------------------------------------------------------------------# #-------------------------------------------------------------------------#
...@@ -29,16 +29,16 @@ module Pod ...@@ -29,16 +29,16 @@ module Pod
@spec.source = { :git => SpecHelper.fixture('banana-lib'), :tag => 'v1.0' } @spec.source = { :git => SpecHelper.fixture('banana-lib'), :tag => 'v1.0' }
@installer.install! @installer.install!
@installer.specific_source.should.be.nil @installer.specific_source.should.be.nil
pod_folder = config.sandbox.root + 'BananaLib' pod_folder = environment.sandbox.root + 'BananaLib'
pod_folder.should.exist pod_folder.should.exist
end end
it "downloads the head source if specified source" do it "downloads the head source if specified source" do
config.sandbox.store_head_pod('BananaLib') environment.sandbox.store_head_pod('BananaLib')
@spec.source = { :git => SpecHelper.fixture('banana-lib'), :tag => 'v1.0' } @spec.source = { :git => SpecHelper.fixture('banana-lib'), :tag => 'v1.0' }
@installer.install! @installer.install!
@installer.specific_source[:commit].should == "0b8b4084a43c38cfe308efa076fdeb3a64d9d2bc" @installer.specific_source[:commit].should == "0b8b4084a43c38cfe308efa076fdeb3a64d9d2bc"
pod_folder = config.sandbox.root + 'BananaLib' pod_folder = environment.sandbox.root + 'BananaLib'
pod_folder.should.exist pod_folder.should.exist
end end
...@@ -46,12 +46,12 @@ module Pod ...@@ -46,12 +46,12 @@ module Pod
@spec.source = { :git => SpecHelper.fixture('banana-lib'), :branch => 'topicbranch' } @spec.source = { :git => SpecHelper.fixture('banana-lib'), :branch => 'topicbranch' }
@installer.install! @installer.install!
@installer.specific_source[:commit].should == "446b22414597f1bb4062a62c4eed7af9627a3f1b" @installer.specific_source[:commit].should == "446b22414597f1bb4062a62c4eed7af9627a3f1b"
pod_folder = config.sandbox.root + 'BananaLib' pod_folder = environment.sandbox.root + 'BananaLib'
pod_folder.should.exist pod_folder.should.exist
end end
it "stores the checkout options in the sandbox" do it "stores the checkout options in the sandbox" do
config.sandbox.store_head_pod('BananaLib') environment.sandbox.store_head_pod('BananaLib')
@spec.source = { :git => SpecHelper.fixture('banana-lib'), :tag => 'v1.0' } @spec.source = { :git => SpecHelper.fixture('banana-lib'), :tag => 'v1.0' }
@installer.install! @installer.install!
sources = @installer.sandbox.checkout_sources sources = @installer.sandbox.checkout_sources
...@@ -92,14 +92,14 @@ module Pod ...@@ -92,14 +92,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 + 'BananaLib/sub-dir/sub-dir-2/somefile.txt' unused_file = environment.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 + 'BananaLib/README' readme_file = environment.sandbox.root + 'BananaLib/README'
readme_file.should.exist readme_file.should.exist
end end
...@@ -117,13 +117,13 @@ module Pod ...@@ -117,13 +117,13 @@ module Pod
end end
it "doesn't downloads the source if the pod has a local source" do it "doesn't downloads the source if the pod has a local source" do
config.sandbox.store_local_path('BananaLib', 'Some Path') environment.sandbox.store_local_path('BananaLib', 'Some Path')
@installer.expects(:download_source).never @installer.expects(:download_source).never
@installer.install! @installer.install!
end end
it "doesn't clean the installation if the pod has a local source" do it "doesn't clean the installation if the pod has a local source" do
config.sandbox.store_local_path('BananaLib', 'Some Path') environment.sandbox.store_local_path('BananaLib', 'Some Path')
@installer.expects(:clean_installation).never @installer.expects(:clean_installation).never
@installer.install! @installer.install!
end end
...@@ -176,7 +176,7 @@ module Pod ...@@ -176,7 +176,7 @@ module Pod
ios_spec = spec.dup ios_spec = spec.dup
osx_spec = spec.dup osx_spec = spec.dup
specs_by_platform = { :ios => [ios_spec], :osx => [osx_spec] } specs_by_platform = { :ios => [ios_spec], :osx => [osx_spec] }
@installer = Installer::PodSourceInstaller.new(config.sandbox, specs_by_platform) @installer = Installer::PodSourceInstaller.new(environment.sandbox, specs_by_platform)
@installer.send(:download_source) @installer.send(:download_source)
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}/", '')}
......
...@@ -190,15 +190,9 @@ module Pod ...@@ -190,15 +190,9 @@ module Pod
describe "#reference_for_path" do describe "#reference_for_path" do
before do before do
<<<<<<< HEAD
@project.add_pod_group('BananaLib', environment.sandbox.pod_dir('BananaLib'), false) @project.add_pod_group('BananaLib', environment.sandbox.pod_dir('BananaLib'), false)
@file = environment.sandbox.pod_dir('BananaLib') + "file.m" @file = environment.sandbox.pod_dir('BananaLib') + "file.m"
@group = @project.group_for_spec('BananaLib', :source_files)
=======
@project.add_pod_group('BananaLib', config.sandbox.pod_dir('BananaLib'), false)
@file = config.sandbox.pod_dir('BananaLib') + "file.m"
@group = @project.group_for_spec('BananaLib') @group = @project.group_for_spec('BananaLib')
>>>>>>> master
@project.add_file_reference(@file, @group) @project.add_file_reference(@file, @group)
end end
...@@ -234,34 +228,6 @@ module Pod ...@@ -234,34 +228,6 @@ module Pod
#-------------------------------------------------------------------------# #-------------------------------------------------------------------------#
<<<<<<< HEAD
describe "Private helpers" do
describe "#spec_group" do
before do
@project.add_pod_group('JSONKit', environment.sandbox.pod_dir('JSONKit'))
end
it "returns the Pod group for root specifications" do
group = @project.send(:spec_group, 'JSONKit')
group.hierarchy_path.should == '/Pods/JSONKit'
end
it "returns the group for subspecs" do
group = @project.send(:spec_group, 'JSONKit/Parsing')
group.hierarchy_path.should == '/Pods/JSONKit/Subspecs/Parsing'
end
end
end
#-------------------------------------------------------------------------#
=======
>>>>>>> master
end end
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