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
1139295f
Commit
1139295f
authored
Sep 16, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Actually build the generated static library project in the integration spec.
parent
d3f97469
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
10 deletions
+19
-10
install.rb
lib/cocoa_pods/command/install.rb
+1
-1
installer.rb
lib/cocoa_pods/installer.rb
+5
-5
integration_spec.rb
spec/integration_spec.rb
+13
-4
No files found.
lib/cocoa_pods/command/install.rb
View file @
1139295f
...
@@ -41,7 +41,7 @@ module Pod
...
@@ -41,7 +41,7 @@ module Pod
raise
Help
,
"No Podfile found in current working directory."
raise
Help
,
"No Podfile found in current working directory."
end
end
end
end
Installer
.
new
(
spec
,
config
.
project_pods_root
).
install!
Installer
.
new
(
spec
).
install!
end
end
end
end
end
end
...
...
lib/cocoa_pods/installer.rb
View file @
1139295f
...
@@ -4,8 +4,8 @@ module Pod
...
@@ -4,8 +4,8 @@ module Pod
class
Installer
class
Installer
include
Config
::
Mixin
include
Config
::
Mixin
def
initialize
(
top_level_specification
,
pods_root
)
def
initialize
(
top_level_specification
)
@top_level_specification
,
@pods_root
=
top_level_specification
,
pods_root
@top_level_specification
=
top_level_specification
end
end
def
dependent_specification_sets
def
dependent_specification_sets
...
@@ -55,7 +55,7 @@ module Pod
...
@@ -55,7 +55,7 @@ module Pod
pattern
=
pattern
+
'*.{h,m,mm,c,cpp}'
if
pattern
.
directory?
pattern
=
pattern
+
'*.{h,m,mm,c,cpp}'
if
pattern
.
directory?
Dir
.
glob
(
pattern
.
to_s
).
each
do
|
file
|
Dir
.
glob
(
pattern
.
to_s
).
each
do
|
file
|
file
=
Pathname
.
new
(
file
)
file
=
Pathname
.
new
(
file
)
file
=
file
.
relative_path_from
(
@
pods_root
)
file
=
file
.
relative_path_from
(
config
.
project_
pods_root
)
xproj
.
add_source_file
(
file
)
xproj
.
add_source_file
(
file
)
end
end
end
end
...
@@ -64,8 +64,8 @@ module Pod
...
@@ -64,8 +64,8 @@ module Pod
end
end
def
write_files!
def
write_files!
xproj
.
create_in
(
@
pods_root
)
xproj
.
create_in
(
config
.
project_
pods_root
)
xcconfig
.
create_in
(
@
pods_root
)
xcconfig
.
create_in
(
config
.
project_
pods_root
)
end
end
end
end
end
end
spec/integration_spec.rb
View file @
1139295f
...
@@ -31,7 +31,7 @@ else
...
@@ -31,7 +31,7 @@ else
Pod
::
Source
.
reset!
Pod
::
Source
.
reset!
Pod
::
Spec
::
Set
.
reset!
Pod
::
Spec
::
Set
.
reset!
fixture
(
'spec-repos/master'
)
# ensure the archive is unpacked
fixture
(
'spec-repos/master'
)
# ensure the archive is unpacked
config
.
project_pods_root
=
SpecHelper
.
temporary_directory
+
'Pods'
config
.
project_pods_root
=
temporary_directory
+
'Pods'
config
.
repos_dir
=
fixture
(
'spec-repos'
)
config
.
repos_dir
=
fixture
(
'spec-repos'
)
end
end
...
@@ -40,27 +40,36 @@ else
...
@@ -40,27 +40,36 @@ else
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
config
.
repos_dir
=
SpecHelper
.
tmp_repos_path
end
end
it
"should
work
"
do
it
"should
activate required pods and create a working static library xcode project
"
do
spec
=
Pod
::
Spec
.
new
do
spec
=
Pod
::
Spec
.
new
do
dependency
'ASIWebPageRequest'
,
'< 1.8.1'
dependency
'ASIWebPageRequest'
,
'< 1.8.1'
dependency
'JSONKit'
,
'>= 1.0'
dependency
'JSONKit'
,
'>= 1.0'
dependency
'SSZipArchive'
,
'< 2'
dependency
'SSZipArchive'
,
'< 2'
end
end
installer
=
SpecHelper
::
Installer
.
new
(
spec
,
SpecHelper
.
temporary_directory
)
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
.
install!
installer
.
install!
(
config
.
project_pods_root
+
'Reachability.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'Reachability.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'ASIHTTPRequest.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'ASIHTTPRequest.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'ASIWebPageRequest.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'ASIWebPageRequest.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'JSONKit.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'JSONKit.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'SSZipArchive.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'SSZipArchive.podspec'
).
should
.
exist
puts
"
\n
[!] Compiling static library..."
Dir
.
chdir
(
config
.
project_pods_root
)
do
system
(
"xcodebuild > /dev/null 2>&1"
).
should
==
true
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
::
Spec
.
new
do
spec
=
Pod
::
Spec
.
new
do
dependency
'Reachability'
dependency
'Reachability'
end
end
installer
=
SpecHelper
::
Installer
.
new
(
spec
,
SpecHelper
.
temporary_directory
)
installer
=
SpecHelper
::
Installer
.
new
(
spec
)
installer
.
install!
installer
.
install!
(
config
.
project_pods_root
+
'Reachability.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'Reachability.podspec'
).
should
.
exist
(
config
.
project_pods_root
+
'ASIHTTPRequest.podspec'
).
should
.
not
.
exist
(
config
.
project_pods_root
+
'ASIHTTPRequest.podspec'
).
should
.
not
.
exist
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