Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
57ec4645
Commit
57ec4645
authored
Feb 28, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Installer] Call per install hooks before cleaning
parent
c9105e1b
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
149 additions
and
68 deletions
+149
-68
CHANGELOG.md
CHANGELOG.md
+1
-0
installer_representation.rb
lib/cocoapods/hooks/installer_representation.rb
+2
-0
library_representation.rb
lib/cocoapods/hooks/library_representation.rb
+6
-0
installer.rb
lib/cocoapods/installer.rb
+11
-1
pod_source_installer.rb
lib/cocoapods/installer/pod_source_installer.rb
+10
-0
Pods.xcodeproj.yaml
...ntegration/install_add_pod/after/Pods/Pods.xcodeproj.yaml
+6
-2
execution_output.txt
spec/integration/install_add_pod/after/execution_output.txt
+1
-1
Pods.xcodeproj.yaml
...on/install_external_source/after/Pods/Pods.xcodeproj.yaml
+6
-2
execution_output.txt
...ration/install_external_source/after/execution_output.txt
+1
-1
Pods.xcodeproj.yaml
...ation/install_local_source/after/Pods/Pods.xcodeproj.yaml
+6
-2
execution_output.txt
...tegration/install_local_source/after/execution_output.txt
+1
-1
Pods.xcodeproj.yaml
...n/install_multiple_targets/after/Pods/Pods.xcodeproj.yaml
+18
-6
execution_output.txt
...ation/install_multiple_targets/after/execution_output.txt
+1
-1
Pods.xcodeproj.yaml
spec/integration/install_new/after/Pods/Pods.xcodeproj.yaml
+6
-2
execution_output.txt
spec/integration/install_new/after/execution_output.txt
+1
-1
Pods.xcodeproj.yaml
.../install_podfile_callbacks/after/Pods/Pods.xcodeproj.yaml
+6
-2
execution_output.txt
...tion/install_podfile_callbacks/after/execution_output.txt
+2
-2
Pods.xcodeproj.yaml
...ntegration/install_podspec/after/Pods/Pods.xcodeproj.yaml
+6
-2
execution_output.txt
spec/integration/install_podspec/after/execution_output.txt
+1
-1
Pods.xcodeproj.yaml
...gration/install_remove_pod/after/Pods/Pods.xcodeproj.yaml
+6
-2
execution_output.txt
...integration/install_remove_pod/after/execution_output.txt
+1
-1
Podfile.lock
spec/integration/install_spec_callbacks/after/Podfile.lock
+1
-1
DependenciesList.txt
...on/install_spec_callbacks/after/Pods/DependenciesList.txt
+0
-0
Reachability.podspec
..._callbacks/after/Pods/Local Podspecs/Reachability.podspec
+3
-7
Manifest.lock
...tegration/install_spec_callbacks/after/Pods/Manifest.lock
+1
-1
Pods.xcodeproj.yaml
...ion/install_spec_callbacks/after/Pods/Pods.xcodeproj.yaml
+6
-2
execution_output.txt
...gration/install_spec_callbacks/after/execution_output.txt
+2
-2
Reachability.podspec
...ration/install_spec_callbacks/before/Reachability.podspec
+3
-7
Pods.xcodeproj.yaml
...tegration/install_subspecs/after/Pods/Pods.xcodeproj.yaml
+12
-4
execution_output.txt
spec/integration/install_subspecs/after/execution_output.txt
+1
-1
Pods.xcodeproj.yaml
spec/integration/update/after/Pods/Pods.xcodeproj.yaml
+6
-2
execution_output.txt
spec/integration/update/after/execution_output.txt
+1
-1
integration_spec.rb
spec/integration_spec.rb
+2
-2
library_representation_spec.rb
spec/unit/hooks/library_representation_spec.rb
+4
-0
pod_source_installer_spec.rb
spec/unit/installer/pod_source_installer_spec.rb
+3
-0
installer_spec.rb
spec/unit/installer_spec.rb
+5
-8
No files found.
CHANGELOG.md
View file @
57ec4645
...
...
@@ -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.
...
...
lib/cocoapods/hooks/installer_representation.rb
View file @
57ec4645
...
...
@@ -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
...
...
lib/cocoapods/hooks/library_representation.rb
View file @
57ec4645
...
...
@@ -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
...
...
lib/cocoapods/installer.rb
View file @
57ec4645
...
...
@@ -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]
...
...
lib/cocoapods/installer/pod_source_installer.rb
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration/install_add_pod/after/Pods/Pods.xcodeproj.yaml
View file @
57ec4645
...
...
@@ -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
:
...
...
spec/integration/install_add_pod/after/execution_output.txt
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration/install_external_source/after/Pods/Pods.xcodeproj.yaml
View file @
57ec4645
...
...
@@ -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
:
...
...
spec/integration/install_external_source/after/execution_output.txt
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration/install_local_source/after/Pods/Pods.xcodeproj.yaml
View file @
57ec4645
...
...
@@ -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
:
...
...
spec/integration/install_local_source/after/execution_output.txt
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration/install_multiple_targets/after/Pods/Pods.xcodeproj.yaml
View file @
57ec4645
...
...
@@ -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
:
...
...
spec/integration/install_multiple_targets/after/execution_output.txt
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration/install_new/after/Pods/Pods.xcodeproj.yaml
View file @
57ec4645
...
...
@@ -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
:
...
...
spec/integration/install_new/after/execution_output.txt
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration/install_podfile_callbacks/after/Pods/Pods.xcodeproj.yaml
View file @
57ec4645
...
...
@@ -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'
...
...
spec/integration/install_podfile_callbacks/after/execution_output.txt
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration/install_podspec/after/Pods/Pods.xcodeproj.yaml
View file @
57ec4645
...
...
@@ -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
:
...
...
spec/integration/install_podspec/after/execution_output.txt
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration/install_remove_pod/after/Pods/Pods.xcodeproj.yaml
View file @
57ec4645
...
...
@@ -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
:
...
...
spec/integration/install_remove_pod/after/execution_output.txt
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration/install_spec_callbacks/after/Podfile.lock
View file @
57ec4645
...
...
@@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:podspec: Reachability.podspec
SPEC CHECKSUMS:
Reachability:
fc385e96bfc6d73ff55de863145498352d1c12ea
Reachability:
c1e48cc25f8e7cba878c83ad1981d334ef325522
COCOAPODS: 0.17.0.rc2
spec/integration/install_spec_callbacks/after/Pods/
Reachability/
DependenciesList.txt
→
spec/integration/install_spec_callbacks/after/Pods/DependenciesList.txt
View file @
57ec4645
File moved
spec/integration/install_spec_callbacks/after/Pods/Local Podspecs/Reachability.podspec
View file @
57ec4645
...
...
@@ -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
spec/integration/install_spec_callbacks/after/Pods/Manifest.lock
View file @
57ec4645
...
...
@@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:podspec: Reachability.podspec
SPEC CHECKSUMS:
Reachability:
fc385e96bfc6d73ff55de863145498352d1c12ea
Reachability:
c1e48cc25f8e7cba878c83ad1981d334ef325522
COCOAPODS: 0.17.0.rc2
spec/integration/install_spec_callbacks/after/Pods/Pods.xcodeproj.yaml
View file @
57ec4645
...
...
@@ -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
:
...
...
spec/integration/install_spec_callbacks/after/execution_output.txt
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration/install_spec_callbacks/before/Reachability.podspec
View file @
57ec4645
...
...
@@ -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
spec/integration/install_subspecs/after/Pods/Pods.xcodeproj.yaml
View file @
57ec4645
...
...
@@ -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
:
...
...
spec/integration/install_subspecs/after/execution_output.txt
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration/update/after/Pods/Pods.xcodeproj.yaml
View file @
57ec4645
...
...
@@ -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
:
...
...
spec/integration/update/after/execution_output.txt
View file @
57ec4645
...
...
@@ -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
...
...
spec/integration_spec.rb
View file @
57ec4645
...
...
@@ -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
#--------------------------------------#
...
...
spec/unit/hooks/library_representation_spec.rb
View file @
57ec4645
...
...
@@ -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'
...
...
spec/unit/installer/pod_source_installer_spec.rb
View file @
57ec4645
...
...
@@ -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
...
...
spec/unit/installer_spec.rb
View file @
57ec4645
...
...
@@ -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_referen
ces
def
@installer
.
clean_pod_sour
ces
@hook_called
.
should
.
be
.
true
end
@installer
.
install!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment