Commit 57ec4645 authored by Fabio Pelosin's avatar Fabio Pelosin

[Installer] Call per install hooks before cleaning

parent c9105e1b
......@@ -4,6 +4,7 @@
###### Bug fixes
- Pre install hooks are called before the Pods are cleaned.
- Fixed and issue which prevent the inclusion of OTHER_CFLAGS and
OTHER_CPLUSPLUSFLAGS in the release builds of the Pods project.
......
......@@ -26,6 +26,8 @@ module Pod
# @return [Pod::Project] the `Pods/Pods.xcodeproj` project.
#
# @note This value is not yet set in the pre install callbacks.
#
def project
installer.pods_project
end
......
......@@ -18,6 +18,12 @@ module Pod
target_definition.dependencies
end
# @return [Pathname] The path of the Pods dir.
#
def sandbox_dir
sandbox.root
end
# @return [Pathname] The path of the prefix_header
#
def prefix_header_filename
......
......@@ -99,13 +99,14 @@ module Pod
UI.section "Downloading dependencies" do
create_file_accessors
install_pod_sources
run_pre_install_hooks
clean_pod_sources
end
end
def generate_pods_project
UI.section "Generating Pods project" do
prepare_pods_project
run_pre_install_hooks
install_file_references
install_targets
run_post_install_hooks
......@@ -240,15 +241,24 @@ module Pod
end
end
@pod_installers ||= []
pod_installer = PodSourceInstaller.new(sandbox, specs_by_platform)
pod_installer.clean = config.clean?
pod_installer.aggressive_cache = config.aggressive_cache?
pod_installer.generate_docs = config.generate_docs?
pod_installer.install_docs = config.install_docs?
pod_installer.install!
@pod_installers << pod_installer
@installed_specs.concat(specs_by_platform.values.flatten)
end
def clean_pod_sources
return unless @pod_installers
@pod_installers.each do |pod_installer|
pod_installer.clean!
end
end
# Creates the Pods project from scratch if it doesn't exists.
#
# @return [void]
......
......@@ -82,6 +82,16 @@ module Pod
def install!
download_source unless predownloaded? || local?
generate_docs if generate_docs?
end
# Cleans the installations if appropriate.
#
# @todo As the pre install hooks need to run before cleaning this
# method should be refactored.
#
# @return [void]
#
def clean!
clean_installation if clean? && !local?
end
......
......@@ -49,7 +49,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -60,7 +62,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods.xcconfig
- Debug:
......
......@@ -32,10 +32,10 @@ Downloading dependencies
Switched to a new branch 'activated-pod-commit'
-> Using Reachability (3.1.0)
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Running pre install hooks
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
......
......@@ -47,7 +47,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -58,7 +60,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods.xcconfig
- Debug:
......
......@@ -20,10 +20,10 @@ Comparing resolved specification to the sandbox manifest
Downloading dependencies
-> Installing PodTest (1.0)
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Running pre install hooks
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
......
......@@ -42,7 +42,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -53,7 +55,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods.xcconfig
- Debug:
......
......@@ -14,10 +14,10 @@ Comparing resolved specification to the sandbox manifest
Downloading dependencies
-> Installing Reachability (3.1.0)
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Running pre install hooks
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
......
......@@ -64,7 +64,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -75,7 +77,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods.xcconfig
- Debug:
......@@ -127,7 +131,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -138,7 +144,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods-SampleApp_2.xcconfig
- Debug:
......@@ -187,7 +195,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -198,7 +208,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods-test.xcconfig
- Debug:
......
......@@ -50,10 +50,10 @@ Downloading dependencies
HEAD is now at f7176f4 updated podspec
$ /usr/bin/git checkout -b activated-pod-commit 2>&1
Switched to a new branch 'activated-pod-commit'
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Running pre install hooks
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
......
......@@ -43,7 +43,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -54,7 +56,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods.xcconfig
- Debug:
......
......@@ -29,10 +29,10 @@ Downloading dependencies
HEAD is now at f7176f4 updated podspec
$ /usr/bin/git checkout -b activated-pod-commit 2>&1
Switched to a new branch 'activated-pod-commit'
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Running pre install hooks
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
......
......@@ -44,7 +44,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -53,7 +55,9 @@ Targets:
PRODUCT_NAME: $(TARGET_NAME)
IPHONEOS_DEPLOYMENT_TARGET: '6.0'
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
PODS_ROOT: ${SRCROOT}
ARCHS: $(ARCHS_STANDARD_32_BIT)
SKIP_INSTALL: 'YES'
......
......@@ -29,11 +29,11 @@ Downloading dependencies
HEAD is now at f7176f4 updated podspec
$ /usr/bin/git checkout -b activated-pod-commit 2>&1
Switched to a new branch 'activated-pod-commit'
- Running pre install hooks
- Podfile
Generating Pods project
- Creating Pods project
- Running pre install hooks
- Podfile
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
......
......@@ -42,7 +42,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -53,7 +55,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods.xcconfig
- Debug:
......
......@@ -32,10 +32,10 @@ Downloading dependencies
HEAD is now at f7176f4 updated podspec
$ /usr/bin/git checkout -b activated-pod-commit 2>&1
Switched to a new branch 'activated-pod-commit'
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Running pre install hooks
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
......
......@@ -43,7 +43,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -54,7 +56,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods.xcconfig
- Debug:
......
......@@ -18,10 +18,10 @@ Comparing resolved specification to the sandbox manifest
Downloading dependencies
-> Using Reachability (3.1.0)
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Running pre install hooks
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
......
......@@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:podspec: Reachability.podspec
SPEC CHECKSUMS:
Reachability: fc385e96bfc6d73ff55de863145498352d1c12ea
Reachability: c1e48cc25f8e7cba878c83ad1981d334ef325522
COCOAPODS: 0.17.0.rc2
......@@ -11,7 +11,6 @@ Pod::Spec.new do |s|
s.requires_arc = false
def s.pre_install(pod, target_definition)
# Replace strings in existing files
pod.source_files.each do |file|
replaced = file.read.gsub("kReachabilityChangedNotification", "kTEST")
......@@ -21,13 +20,10 @@ Pod::Spec.new do |s|
# Add new files
File.open(pod.root + "TestClass.h", 'w') { |file| file.write("// TEST") }
File.open(pod.root + "TestClass.m", 'w') { |file| file.write("// TEST") }
dependencies = target_definition.dependencies.map(&:to_s) * ", "
File.open(pod.root + "DependenciesList.txt", 'w') { |file| file.write(dependencies) }
end
def s.post_install(target)
def s.post_install(library)
dependencies = library.dependencies.map(&:to_s) * ", "
File.open(library.sandbox_dir + "DependenciesList.txt", 'w') { |file| file.write(dependencies) }
end
end
......@@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:podspec: Reachability.podspec
SPEC CHECKSUMS:
Reachability: fc385e96bfc6d73ff55de863145498352d1c12ea
Reachability: c1e48cc25f8e7cba878c83ad1981d334ef325522
COCOAPODS: 0.17.0.rc2
......@@ -46,7 +46,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -57,7 +59,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods.xcconfig
- Debug:
......
......@@ -32,11 +32,11 @@ Downloading dependencies
HEAD is now at f7176f4 updated podspec
$ /usr/bin/git checkout -b activated-pod-commit 2>&1
Switched to a new branch 'activated-pod-commit'
- Running pre install hooks
- Reachability
Generating Pods project
- Creating Pods project
- Running pre install hooks
- Reachability
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
......
......@@ -11,7 +11,6 @@ Pod::Spec.new do |s|
s.requires_arc = false
def s.pre_install(pod, target_definition)
# Replace strings in existing files
pod.source_files.each do |file|
replaced = file.read.gsub("kReachabilityChangedNotification", "kTEST")
......@@ -21,13 +20,10 @@ Pod::Spec.new do |s|
# Add new files
File.open(pod.root + "TestClass.h", 'w') { |file| file.write("// TEST") }
File.open(pod.root + "TestClass.m", 'w') { |file| file.write("// TEST") }
dependencies = target_definition.dependencies.map(&:to_s) * ", "
File.open(pod.root + "DependenciesList.txt", 'w') { |file| file.write(dependencies) }
end
def s.post_install(target)
def s.post_install(library)
dependencies = library.dependencies.map(&:to_s) * ", "
File.open(library.sandbox_dir + "DependenciesList.txt", 'w') { |file| file.write(dependencies) }
end
end
......@@ -55,7 +55,9 @@ Targets:
DEBUG_INFORMATION_FORMAT: dwarf-with-dsym
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
COPY_PHASE_STRIP: 'YES'
......@@ -63,7 +65,9 @@ Targets:
SDKROOT: macosx
PRODUCT_NAME: $(TARGET_NAME)
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
PODS_ROOT: ${SRCROOT}
ARCHS: $(ARCHS_STANDARD_64_BIT)
GCC_ENABLE_OBJC_EXCEPTIONS: 'YES'
......@@ -117,7 +121,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -128,7 +134,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods-iOS App.xcconfig
- Debug:
......
......@@ -26,10 +26,10 @@ Comparing resolved specification to the sandbox manifest
Downloading dependencies
-> Installing PodTest (1.0)
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Running pre install hooks
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
......
......@@ -43,7 +43,9 @@ Targets:
PODS_HEADERS_SEARCH_PATHS: ${PODS_BUILD_HEADERS_SEARCH_PATHS}
GCC_C_LANGUAGE_STANDARD: gnu99
OTHER_LDFLAGS: ''
OTHER_CFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
GCC_VERSION: com.apple.compilers.llvm.clang.1_0
ALWAYS_SEARCH_USER_PATHS: 'NO'
SDKROOT: iphoneos
......@@ -54,7 +56,9 @@ Targets:
INSTALL_PATH: $(BUILT_PRODUCTS_DIR)
SKIP_INSTALL: 'YES'
PODS_ROOT: ${SRCROOT}
OTHER_CPLUSPLUSFLAGS: -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS:
- -DNS_BLOCK_ASSERTIONS=1
- $(inherited)
ARCHS: $(ARCHS_STANDARD_32_BIT)
Base Configuration: Pods.xcconfig
- Debug:
......
......@@ -32,10 +32,10 @@ Downloading dependencies
HEAD is now at f7176f4 updated podspec
$ /usr/bin/git checkout -b activated-pod-commit 2>&1
Switched to a new branch 'activated-pod-commit'
- Running pre install hooks
Generating Pods project
- Creating Pods project
- Running pre install hooks
- Adding source files to Pods project
- Adding resources to Pods project
- Linking headers
......
......@@ -135,13 +135,13 @@ module Pod
pod 'SSZipArchive', '0.1.0'
pre_install do |installer|
memo = "PODS:#{installer.pods * ', '} TARGETS:#{installer.project.targets * ', '}"
memo = "PODS:#{installer.pods * ', '} LIBRARIES:#{installer.libraries.map(&:name) * ', '}"
File.open(installer.config.sandbox_root + 'memo.txt', 'w') {|f| f.puts memo}
end
end
Installer.new(config.sandbox, podfile).install!
File.open(config.sandbox_root + 'memo.txt','rb').read.should == "PODS:SSZipArchive (0.1.0) TARGETS:\n"
File.open(config.sandbox_root + 'memo.txt','rb').read.should == "PODS:SSZipArchive (0.1.0) LIBRARIES:Pods\n"
end
#--------------------------------------#
......
......@@ -22,6 +22,10 @@ module Pod
@rep.dependencies.should == [Dependency.new('AFNetworking')]
end
it "returns the sandbox dir" do
@rep.sandbox_dir.should == temporary_directory + 'Pods'
end
it "returns the path of the prefix header" do
@lib.support_files_root = temporary_directory
@rep.prefix_header_filename.should == temporary_directory + 'Pods-MyApp-prefix.pch'
......
......@@ -107,6 +107,7 @@ module Pod
it "cleans the paths non used by the installation" do
@installer.clean = true
@installer.install!
@installer.clean!
unused_file = config.sandbox.root + 'BananaLib/sub-dir/sub-dir-2/somefile.txt'
unused_file.should.not.exist
end
......@@ -114,6 +115,7 @@ module Pod
it "preserves important files like the LICENSE and the README" do
@installer.clean = true
@installer.install!
@installer.clean!
readme_file = config.sandbox.root + 'BananaLib/README'
readme_file.should.exist
end
......@@ -121,6 +123,7 @@ module Pod
it "doesn't performs any cleaning if instructed to do so" do
@installer.clean = false
@installer.install!
@installer.clean!
unused_file = config.sandbox.root + 'BananaLib/sub-dir/sub-dir-2/somefile.txt'
unused_file.should.exist
end
......
......@@ -44,17 +44,14 @@ module Pod
@installer.stubs(:integrate_user_project)
end
it "in runs the pre-install hooks before adding the file references" do
@installer.unstub(:generate_pods_project)
@installer.stubs(:prepare_pods_project)
@installer.stubs(:install_targets)
@installer.stubs(:run_post_install_hooks)
@installer.stubs(:write_pod_project)
@installer.stubs(:write_lockfiles)
it "in runs the pre-install hooks before cleaning the Pod sources" do
@installer.unstub(:download_dependencies)
@installer.stubs(:create_file_accessors)
@installer.stubs(:install_pod_sources)
def @installer.run_pre_install_hooks
@hook_called = true
end
def @installer.install_file_references
def @installer.clean_pod_sources
@hook_called.should.be.true
end
@installer.install!
......
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