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
681b770d
Commit
681b770d
authored
Oct 24, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the integration spec actually build the libraries again.
parent
072db240
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
+23
-7
podfile.rb
lib/cocoapods/podfile.rb
+2
-0
integration_spec.rb
spec/integration_spec.rb
+21
-7
No files found.
lib/cocoapods/podfile.rb
View file @
681b770d
...
@@ -27,6 +27,8 @@ module Pod
...
@@ -27,6 +27,8 @@ module Pod
podfile
podfile
end
end
include
Config
::
Mixin
def
initialize
(
&
block
)
def
initialize
(
&
block
)
@targets
=
{
:default
=>
(
@target
=
Target
.
new
(
:default
))
}
@targets
=
{
:default
=>
(
@target
=
Target
.
new
(
:default
))
}
instance_eval
(
&
block
)
instance_eval
(
&
block
)
...
...
spec/integration_spec.rb
View file @
681b770d
...
@@ -38,8 +38,6 @@ else
...
@@ -38,8 +38,6 @@ else
config
.
silent
=
true
config
.
silent
=
true
config
.
repos_dir
=
fixture
(
'spec-repos'
)
config
.
repos_dir
=
fixture
(
'spec-repos'
)
config
.
project_pods_root
=
temporary_directory
+
'Pods'
config
.
project_pods_root
=
temporary_directory
+
'Pods'
def
config
.
ios?
;
true
;
end
def
config
.
osx?
;
false
;
end
FileUtils
.
cp_r
(
fixture
(
'integration/.'
),
config
.
project_pods_root
)
FileUtils
.
cp_r
(
fixture
(
'integration/.'
),
config
.
project_pods_root
)
end
end
...
@@ -51,6 +49,9 @@ else
...
@@ -51,6 +49,9 @@ else
# 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
"should activate 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
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
dependency
'ASIWebPageRequest'
,
'>= 1.8.1'
dependency
'ASIWebPageRequest'
,
'>= 1.8.1'
dependency
'JSONKit'
,
'>= 1.0'
dependency
'JSONKit'
,
'>= 1.0'
...
@@ -61,7 +62,7 @@ else
...
@@ -61,7 +62,7 @@ else
installer
.
install!
installer
.
install!
root
=
config
.
project_pods_root
root
=
config
.
project_pods_root
(
root
+
'Reachability.podspec'
).
should
.
exist
(
root
+
'Reachability.podspec'
).
should
.
exist
if
platform
==
:ios
(
root
+
'ASIHTTPRequest.podspec'
).
should
.
exist
(
root
+
'ASIHTTPRequest.podspec'
).
should
.
exist
(
root
+
'ASIWebPageRequest.podspec'
).
should
.
exist
(
root
+
'ASIWebPageRequest.podspec'
).
should
.
exist
(
root
+
'JSONKit.podspec'
).
should
.
exist
(
root
+
'JSONKit.podspec'
).
should
.
exist
...
@@ -72,15 +73,18 @@ else
...
@@ -72,15 +73,18 @@ else
project_file
=
(
root
+
'Pods.xcodeproj/project.pbxproj'
).
to_s
project_file
=
(
root
+
'Pods.xcodeproj/project.pbxproj'
).
to_s
NSDictionary
.
dictionaryWithContentsOfFile
(
project_file
).
should
==
installer
.
xcodeproj
.
to_hash
NSDictionary
.
dictionaryWithContentsOfFile
(
project_file
).
should
==
installer
.
xcodeproj
.
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
#
system("xcodebuild > /dev/null 2>&1").should == true
system
(
"xcodebuild > /dev/null 2>&1"
).
should
==
true
#system("xcodebuild").should == true
#system("xcodebuild").should == true
#
end
end
end
end
it
"does not activate pods that are only part of other pods"
do
it
"does not activate pods that are only part of other pods"
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
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
dependency
'Reachability'
dependency
'Reachability'
end
end
...
@@ -94,6 +98,9 @@ else
...
@@ -94,6 +98,9 @@ else
it
"adds resources to the xcode copy script"
do
it
"adds resources to the xcode copy script"
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
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
dependency
'SSZipArchive'
dependency
'SSZipArchive'
end
end
...
@@ -111,6 +118,9 @@ else
...
@@ -111,6 +118,9 @@ else
# TODO we need to do more cleaning and/or add a --prune task
# TODO we need to do more cleaning and/or add a --prune task
it
"overwrites an existing project.pbxproj file"
do
it
"overwrites an existing project.pbxproj file"
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
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
dependency
'JSONKit'
dependency
'JSONKit'
end
end
...
@@ -120,6 +130,9 @@ else
...
@@ -120,6 +130,9 @@ else
Pod
::
Source
.
reset!
Pod
::
Source
.
reset!
Pod
::
Spec
::
Set
.
reset!
Pod
::
Spec
::
Set
.
reset!
spec
=
Pod
::
Podfile
.
new
do
spec
=
Pod
::
Podfile
.
new
do
# first ensure that the correct info is available to the specs when they load
config
.
rootspec
=
self
self
.
platform
platform
self
.
platform
platform
dependency
'SSZipArchive'
dependency
'SSZipArchive'
end
end
...
@@ -131,6 +144,7 @@ else
...
@@ -131,6 +144,7 @@ else
project
=
Pod
::
Xcode
::
Project
.
new
(
config
.
project_pods_root
)
project
=
Pod
::
Xcode
::
Project
.
new
(
config
.
project_pods_root
)
project
.
source_files
.
should
==
installer
.
xcodeproj
.
source_files
project
.
source_files
.
should
==
installer
.
xcodeproj
.
source_files
end
end
end
end
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