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
e1129142
Commit
e1129142
authored
Sep 29, 2014
by
Boris Bügling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved sanitizing of configuration names.
Fixes #2542
parent
fd8d01fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
project.rb
lib/cocoapods/project.rb
+1
-1
project_spec.rb
spec/unit/project_spec.rb
+6
-0
No files found.
lib/cocoapods/project.rb
View file @
e1129142
...
...
@@ -209,7 +209,7 @@ module Pod
#
def
add_build_configuration
(
name
,
type
)
build_configuration
=
super
values
=
[
"
#{
name
.
gsub
(
' '
,
'_'
).
upcase
}
=1"
]
values
=
[
"
#{
name
.
gsub
(
/[^a-zA-Z0-9_]/
,
'_'
).
upcase
}
=1"
]
settings
=
build_configuration
.
build_settings
definitions
=
Array
(
settings
[
'GCC_PREPROCESSOR_DEFINITIONS'
])
values
.
each
do
|
value
|
...
...
spec/unit/project_spec.rb
View file @
e1129142
...
...
@@ -233,6 +233,12 @@ module Pod
settings
[
'GCC_PREPROCESSOR_DEFINITIONS'
].
should
.
include
(
'RELEASE=1'
)
end
it
"doesn't create invalid preprocessor definitions for configurations"
do
configuration
=
@project
.
add_build_configuration
(
'Release-Foo.bar'
,
:release
)
settings
=
configuration
.
build_settings
settings
[
'GCC_PREPROCESSOR_DEFINITIONS'
].
should
.
include
(
'RELEASE_FOO_BAR=1'
)
end
it
"doesn't duplicate values"
do
original
=
@project
.
build_configuration_list
[
'Debug'
]
original_settings
=
original
.
build_settings
...
...
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