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
73622564
Commit
73622564
authored
Oct 19, 2014
by
Steffen Matthischke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved sanitizing of configuration names which have a number prefix.
parent
ca511f0f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
project.rb
lib/cocoapods/project.rb
+1
-1
project_spec.rb
spec/unit/project_spec.rb
+2
-2
No files found.
lib/cocoapods/project.rb
View file @
73622564
...
@@ -209,7 +209,7 @@ module Pod
...
@@ -209,7 +209,7 @@ module Pod
#
#
def
add_build_configuration
(
name
,
type
)
def
add_build_configuration
(
name
,
type
)
build_configuration
=
super
build_configuration
=
super
values
=
[
"
#{
name
.
gsub
(
/[^a-zA-Z0-9_]/
,
'_'
).
upcase
}
=1"
]
values
=
[
"
#{
name
.
gsub
(
/[^a-zA-Z0-9_]/
,
'_'
).
gsub
(
/(^[0-9])/
,
'_\1'
).
upcase
}
=1"
]
settings
=
build_configuration
.
build_settings
settings
=
build_configuration
.
build_settings
definitions
=
Array
(
settings
[
'GCC_PREPROCESSOR_DEFINITIONS'
])
definitions
=
Array
(
settings
[
'GCC_PREPROCESSOR_DEFINITIONS'
])
values
.
each
do
|
value
|
values
.
each
do
|
value
|
...
...
spec/unit/project_spec.rb
View file @
73622564
...
@@ -234,9 +234,9 @@ module Pod
...
@@ -234,9 +234,9 @@ module Pod
end
end
it
"doesn't create invalid preprocessor definitions for configurations"
do
it
"doesn't create invalid preprocessor definitions for configurations"
do
configuration
=
@project
.
add_build_configuration
(
'Release-Foo.bar'
,
:release
)
configuration
=
@project
.
add_build_configuration
(
'
1
Release-Foo.bar'
,
:release
)
settings
=
configuration
.
build_settings
settings
=
configuration
.
build_settings
settings
[
'GCC_PREPROCESSOR_DEFINITIONS'
].
should
.
include
(
'RELEASE_FOO_BAR=1'
)
settings
[
'GCC_PREPROCESSOR_DEFINITIONS'
].
should
.
include
(
'
_1_
RELEASE_FOO_BAR=1'
)
end
end
it
"doesn't duplicate values"
do
it
"doesn't duplicate values"
do
...
...
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