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
7b46404a
Commit
7b46404a
authored
Mar 04, 2012
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Xcode project generation and a few more specs.
parent
fde621d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
installer.rb
lib/cocoapods/installer.rb
+1
-1
integration_spec.rb
spec/integration_spec.rb
+8
-7
No files found.
lib/cocoapods/installer.rb
View file @
7b46404a
...
@@ -27,7 +27,7 @@ module Pod
...
@@ -27,7 +27,7 @@ module Pod
# Add all source files to the project grouped by pod
# Add all source files to the project grouped by pod
group
=
@project
.
add_pod_group
(
spec
.
name
)
group
=
@project
.
add_pod_group
(
spec
.
name
)
spec
.
expanded_source_files
.
each
do
|
path
|
spec
.
expanded_source_files
.
each
do
|
path
|
group
.
children
.
new
(
'path'
=>
path
.
to_s
)
group
.
files
.
new
(
'path'
=>
path
.
to_s
)
end
end
end
end
# Add a group to hold all the target support files
# Add a group to hold all the target support files
...
...
spec/integration_spec.rb
View file @
7b46404a
...
@@ -150,7 +150,7 @@ else
...
@@ -150,7 +150,7 @@ else
end
end
# TODO add a simple source file which uses the compiled lib to check that it really really works
# TODO add a simple source file which uses the compiled lib to check that it really really works
it
"
should activate
required pods and create a working static library xcode project"
do
it
"
activates
required pods and create a working static library xcode project"
do
spec
=
Pod
::
Podfile
.
new
do
spec
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
config
.
rootspec
=
self
...
@@ -191,7 +191,7 @@ else
...
@@ -191,7 +191,7 @@ else
root
=
config
.
project_pods_root
root
=
config
.
project_pods_root
(
root
+
'Pods.xcconfig'
).
read
.
should
==
installer
.
target_installers
.
first
.
xcconfig
.
to_s
(
root
+
'Pods.xcconfig'
).
read
.
should
==
installer
.
target_installers
.
first
.
xcconfig
.
to_s
project_file
=
(
root
+
'Pods.xcodeproj/project.pbxproj'
).
to_s
project_file
=
(
root
+
'Pods.xcodeproj/project.pbxproj'
).
to_s
NSDictionary
.
dictionaryWithContentsOfFile
(
project_file
).
should
==
installer
.
project
.
to_hash
Xcodeproj
.
read_plist
(
project_file
).
should
==
installer
.
project
.
to_hash
puts
"
\n
[!] Compiling static library..."
puts
"
\n
[!] Compiling static library..."
Dir
.
chdir
(
config
.
project_pods_root
)
do
Dir
.
chdir
(
config
.
project_pods_root
)
do
...
@@ -230,7 +230,8 @@ else
...
@@ -230,7 +230,8 @@ else
end
end
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
.
target_installers
.
first
.
build_specifications
.
first
.
resources
=
'LICEN*'
,
'Readme.*'
target_definition
=
installer
.
target_installers
.
first
.
target_definition
installer
.
build_specifications_for_target
(
target_definition
).
first
.
resources
=
'LICEN*'
,
'Readme.*'
installer
.
install!
installer
.
install!
contents
=
(
config
.
project_pods_root
+
'Pods-resources.sh'
).
read
contents
=
(
config
.
project_pods_root
+
'Pods-resources.sh'
).
read
...
@@ -316,7 +317,7 @@ else
...
@@ -316,7 +317,7 @@ else
end
end
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
.
install!
installer
.
install!
installer
.
configure
_project
(
projpath
)
Pod
::
ProjectIntegration
.
integrate_with
_project
(
projpath
)
xcworkspace
=
temporary_directory
+
'ASIHTTPRequest.xcworkspace'
xcworkspace
=
temporary_directory
+
'ASIHTTPRequest.xcworkspace'
workspace
=
Xcodeproj
::
Workspace
.
new_from_xcworkspace
(
xcworkspace
)
workspace
=
Xcodeproj
::
Workspace
.
new_from_xcworkspace
(
xcworkspace
)
...
@@ -326,14 +327,14 @@ else
...
@@ -326,14 +327,14 @@ else
libPods
=
project
.
files
.
find
{
|
f
|
f
.
name
==
'libPods.a'
}
libPods
=
project
.
files
.
find
{
|
f
|
f
.
name
==
'libPods.a'
}
project
.
targets
.
each
do
|
target
|
project
.
targets
.
each
do
|
target
|
target
.
build_configurations
.
each
do
|
config
|
target
.
build_configurations
.
each
do
|
config
|
config
.
base
C
onfiguration
.
path
.
should
==
'Pods/Pods.xcconfig'
config
.
base
_c
onfiguration
.
path
.
should
==
'Pods/Pods.xcconfig'
end
end
phase
=
target
.
frameworks_build_phases
.
first
phase
=
target
.
frameworks_build_phases
.
first
phase
.
files
.
map
{
|
build
File
|
buildF
ile
.
file
}.
should
.
include
libPods
phase
.
files
.
map
{
|
build
_file
|
build_f
ile
.
file
}.
should
.
include
libPods
# should be the last phase
# should be the last phase
target
.
build_phases
.
last
.
shell
S
cript
.
should
==
%{"${SRCROOT}/Pods/Pods-resources.sh"\n}
target
.
build_phases
.
last
.
shell
_s
cript
.
should
==
%{"${SRCROOT}/Pods/Pods-resources.sh"\n}
end
end
end
end
...
...
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