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
a2a108c4
Commit
a2a108c4
authored
Sep 18, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Specs] Fix specification related specs.
parent
5e592de7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
specification.rb
lib/cocoapods/specification.rb
+1
-1
specification_spec.rb
spec/unit/specification_spec.rb
+10
-10
No files found.
lib/cocoapods/specification.rb
View file @
a2a108c4
...
@@ -321,7 +321,7 @@ module Pod
...
@@ -321,7 +321,7 @@ module Pod
def
compiler_flags
def
compiler_flags
flags
=
recursive_compiler_flags
.
dup
flags
=
recursive_compiler_flags
.
dup
flags
<<
'
-fobjc-arc'
if
requires_arc
flags
<<
'-fobjc-arc'
if
requires_arc
flags
.
join
(
' '
)
flags
.
join
(
' '
)
end
end
...
...
spec/unit/specification_spec.rb
View file @
a2a108c4
...
@@ -107,11 +107,11 @@ describe "A Pod::Specification loaded from a podspec" do
...
@@ -107,11 +107,11 @@ describe "A Pod::Specification loaded from a podspec" do
it
"adds compiler flags if ARC is required"
do
it
"adds compiler flags if ARC is required"
do
@spec
.
parent
.
should
==
nil
@spec
.
parent
.
should
==
nil
@spec
.
requires_arc
=
true
@spec
.
requires_arc
=
true
@spec
.
activate_platform
(
:ios
).
compiler_flags
.
should
==
"
-fobjc-arc"
@spec
.
activate_platform
(
:ios
).
compiler_flags
.
should
==
"-fobjc-arc"
@spec
.
activate_platform
(
:osx
).
compiler_flags
.
should
==
"
-fobjc-arc"
@spec
.
activate_platform
(
:osx
).
compiler_flags
.
should
==
"-fobjc-arc"
@spec
.
compiler_flags
=
"-Wunused-value"
@spec
.
compiler_flags
=
"-Wunused-value"
@spec
.
activate_platform
(
:ios
).
compiler_flags
.
should
==
"
-fobjc-arc -Wunused-value
"
@spec
.
activate_platform
(
:ios
).
compiler_flags
.
should
==
"
-Wunused-value -fobjc-arc
"
@spec
.
activate_platform
(
:osx
).
compiler_flags
.
should
==
"
-fobjc-arc -Wunused-value
"
@spec
.
activate_platform
(
:osx
).
compiler_flags
.
should
==
"
-Wunused-value -fobjc-arc
"
end
end
end
end
...
@@ -334,9 +334,9 @@ describe "A Pod::Specification subspec" do
...
@@ -334,9 +334,9 @@ describe "A Pod::Specification subspec" do
@spec
.
subspecs
.
first
.
parent
.
should
==
@spec
@spec
.
subspecs
.
first
.
parent
.
should
==
@spec
end
end
it
"automatically forwards top level attributes to the
top level parent
"
do
it
"automatically forwards top level attributes to the
subspecs
"
do
@spec
.
activate_platform
(
:ios
)
@spec
.
activate_platform
(
:ios
)
[
:version
,
:license
,
:authors
,
:compiler_flags
].
each
do
|
attr
|
[
:version
,
:license
,
:authors
].
each
do
|
attr
|
@spec
.
subspecs
.
first
.
send
(
attr
).
should
==
@spec
.
send
(
attr
)
@spec
.
subspecs
.
first
.
send
(
attr
).
should
==
@spec
.
send
(
attr
)
@spec
.
subspecs
.
first
.
subspecs
.
first
.
send
(
attr
).
should
==
@spec
.
send
(
attr
)
@spec
.
subspecs
.
first
.
subspecs
.
first
.
send
(
attr
).
should
==
@spec
.
send
(
attr
)
end
end
...
@@ -350,7 +350,7 @@ describe "A Pod::Specification subspec" do
...
@@ -350,7 +350,7 @@ describe "A Pod::Specification subspec" do
@subsubspec
.
resources
.
should
==
%w[ resource ]
@subsubspec
.
resources
.
should
==
%w[ resource ]
@subsubspec
.
compiler_flags
=
'-Wdeprecated-implementations'
@subsubspec
.
compiler_flags
=
'-Wdeprecated-implementations'
@subsubspec
.
compiler_flags
.
should
==
'
-fobjc-arc
-Wdeprecated-implementations'
@subsubspec
.
compiler_flags
.
should
==
'-Wdeprecated-implementations'
end
end
it
"allows to specify arc settings for subspecs"
do
it
"allows to specify arc settings for subspecs"
do
...
@@ -523,7 +523,7 @@ describe "A Pod::Specification, concerning its attributes that support different
...
@@ -523,7 +523,7 @@ describe "A Pod::Specification, concerning its attributes that support different
end
end
it
"returns the same list of compiler flags for each platform"
do
it
"returns the same list of compiler flags for each platform"
do
compiler_flags
=
'
-fobjc-arc -Wdeprecated-implementations
'
compiler_flags
=
'
-Wdeprecated-implementations -fobjc-arc
'
@spec
.
activate_platform
(
:ios
).
compiler_flags
.
should
==
compiler_flags
@spec
.
activate_platform
(
:ios
).
compiler_flags
.
should
==
compiler_flags
@spec
.
activate_platform
(
:osx
).
compiler_flags
.
should
==
compiler_flags
@spec
.
activate_platform
(
:osx
).
compiler_flags
.
should
==
compiler_flags
end
end
...
@@ -587,8 +587,8 @@ describe "A Pod::Specification, concerning its attributes that support different
...
@@ -587,8 +587,8 @@ describe "A Pod::Specification, concerning its attributes that support different
end
end
it
"returns the same list of compiler flags for each platform"
do
it
"returns the same list of compiler flags for each platform"
do
@spec
.
activate_platform
(
:ios
).
compiler_flags
.
should
==
'
-fobjc-arc -Wdeprecated-implementations
'
@spec
.
activate_platform
(
:ios
).
compiler_flags
.
should
==
'
-Wdeprecated-implementations -fobjc-arc
'
@spec
.
activate_platform
(
:osx
).
compiler_flags
.
should
==
'
-fobjc-arc -Wfloat-equal
'
@spec
.
activate_platform
(
:osx
).
compiler_flags
.
should
==
'
-Wfloat-equal -fobjc-arc
'
end
end
it
"returns the same list of dependencies for each platform"
do
it
"returns the same list of dependencies for each platform"
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