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
b86625e6
Commit
b86625e6
authored
May 03, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Platform#==] Check for deployment target.
parent
43e79bd6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
platform.rb
lib/cocoapods/platform.rb
+1
-1
platform_spec.rb
spec/unit/platform_spec.rb
+5
-0
No files found.
lib/cocoapods/platform.rb
View file @
b86625e6
...
@@ -30,7 +30,7 @@ module Pod
...
@@ -30,7 +30,7 @@ module Pod
if
other_platform_or_symbolic_name
.
is_a?
(
Symbol
)
if
other_platform_or_symbolic_name
.
is_a?
(
Symbol
)
@symbolic_name
==
other_platform_or_symbolic_name
@symbolic_name
==
other_platform_or_symbolic_name
else
else
self
==
(
other_platform_or_symbolic_name
.
name
)
self
.
name
==
(
other_platform_or_symbolic_name
.
name
)
&&
self
.
deployment_target
==
other_platform_or_symbolic_name
.
deployment_target
end
end
end
end
...
...
spec/unit/platform_spec.rb
View file @
b86625e6
...
@@ -18,6 +18,11 @@ describe Pod::Platform do
...
@@ -18,6 +18,11 @@ describe Pod::Platform do
@platform
.
should
==
Pod
::
Platform
.
new
(
:ios
)
@platform
.
should
==
Pod
::
Platform
.
new
(
:ios
)
end
end
it
"can be compared for equality with another platform with the same symbolic name and the same deployment target"
do
@platform
.
should
.
not
==
Pod
::
Platform
.
new
(
:ios
,
'4.0'
)
Pod
::
Platform
.
new
(
:ios
,
'4.0'
).
should
==
Pod
::
Platform
.
new
(
:ios
,
'4.0'
)
end
it
"can be compared for equality with a matching symbolic name (backwards compatibility reasons)"
do
it
"can be compared for equality with a matching symbolic name (backwards compatibility reasons)"
do
@platform
.
should
==
:ios
@platform
.
should
==
:ios
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