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
a3bce83e
Commit
a3bce83e
authored
Feb 10, 2012
by
Luke Redpath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started to expand the specs for the Pods.xcodeproj generation extensions.
parent
907fdd1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
xcodeproj_ext.rb
lib/cocoapods/xcodeproj_ext.rb
+9
-0
xcodeproj_ext_spec.rb
spec/unit/xcodeproj_ext_spec.rb
+19
-0
No files found.
lib/cocoapods/xcodeproj_ext.rb
View file @
a3bce83e
...
@@ -11,6 +11,15 @@ module Xcodeproj
...
@@ -11,6 +11,15 @@ module Xcodeproj
def
add_pod_group
(
name
)
def
add_pod_group
(
name
)
pods
.
groups
.
new
(
'name'
=>
name
)
pods
.
groups
.
new
(
'name'
=>
name
)
end
end
# Shortcut access to build configurations
def
build_configurations
objects
[
root_object
.
attributes
[
'buildConfigurationList'
]].
buildConfigurations
end
def
build_configuration
(
name
)
build_configurations
.
find
{
|
c
|
c
.
name
==
name
}
end
class
PBXNativeTarget
class
PBXNativeTarget
def
move_compile_phase_to_end!
def
move_compile_phase_to_end!
...
...
spec/unit/xcodeproj_ext_spec.rb
View file @
a3bce83e
...
@@ -32,4 +32,23 @@ describe 'Xcodeproj::Project' do
...
@@ -32,4 +32,23 @@ describe 'Xcodeproj::Project' do
}).
should
.
not
==
nil
}).
should
.
not
==
nil
@project
.
targets
.
first
.
buildPhases
.
should
.
include
phase
@project
.
targets
.
first
.
buildPhases
.
should
.
include
phase
end
end
shared
"for any platform"
do
it
"adds a Debug and Release build configuration"
do
@project
.
build_configurations
.
count
.
should
==
2
@project
.
build_configurations
.
map
(
&
:name
).
sort
.
should
==
%w{Debug Release}
.
sort
end
end
describe
"for the :ios platform"
do
before
do
@project
=
Xcodeproj
::
Project
.
for_platform
(
:ios
)
end
behaves_like
"for any platform"
it
"sets VALIDATE_PRODUCT to YES for the Release configuration"
do
@project
.
build_configuration
(
"Release"
).
buildSettings
[
"VALIDATE_PRODUCT"
].
should
==
"YES"
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