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
de9fe2dc
Commit
de9fe2dc
authored
Jun 07, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Linter] Use the deployment target of the specification.
Closes #304.
parent
8d1430a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
spec.rb
lib/cocoapods/command/spec.rb
+6
-5
spec_spec.rb
spec/unit/command/spec_spec.rb
+11
-0
No files found.
lib/cocoapods/command/spec.rb
View file @
de9fe2dc
...
@@ -241,13 +241,14 @@ module Pod
...
@@ -241,13 +241,14 @@ module Pod
end
end
def
podfile_from_spec
def
podfile_from_spec
name
=
spec
.
name
name
=
spec
.
name
podspec
=
file
.
realpath
.
to_s
podspec
=
file
.
realpath
.
to_s
platform
_sym
=
@platform
.
to_sy
m
platform
=
@platfor
m
podfile
=
Pod
::
Podfile
.
new
do
podfile
=
Pod
::
Podfile
.
new
do
platform
(
platform
_sym
)
platform
(
platform
)
dependency
name
,
:podspec
=>
podspec
dependency
name
,
:podspec
=>
podspec
end
end
podfile
end
end
def
set_up_lint_environment
def
set_up_lint_environment
...
...
spec/unit/command/spec_spec.rb
View file @
de9fe2dc
...
@@ -106,4 +106,15 @@ describe "Pod::Command::Spec::Linter" do
...
@@ -106,4 +106,15 @@ describe "Pod::Command::Spec::Linter" do
linter
.
lint
.
should
==
false
linter
.
lint
.
should
==
false
linter
.
errors
.
join
(
' | '
).
should
.
include
"The resources did not match any file"
linter
.
errors
.
join
(
' | '
).
should
.
include
"The resources did not match any file"
end
end
it
"Uses the deployment target of the specification"
do
spec
,
file
=
write_podspec
(
stub_podspec
)
spec
.
stubs
(
:available_platforms
).
returns
([
Pod
::
Platform
.
new
(
:ios
,
"5.0"
)])
linter
=
Pod
::
Command
::
Spec
::
Linter
.
new
(
spec
)
linter
.
quick
=
true
linter
.
lint
podfile
=
linter
.
podfile_from_spec
deployment_target
=
podfile
.
target_definitions
[
:default
].
platform
.
deployment_target
deployment_target
.
to_s
.
should
==
"5.0"
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