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
d31b291e
Commit
d31b291e
authored
Nov 12, 2014
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[spec command] Fix weirdly indented code block
parent
f44ca638
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
spec.rb
lib/cocoapods/command/spec.rb
+18
-19
No files found.
lib/cocoapods/command/spec.rb
View file @
d31b291e
...
...
@@ -118,29 +118,28 @@ module Pod
def
podspecs_to_lint
@podspecs_to_lint
||=
begin
files
=
[]
@podspecs_paths
<<
'.'
if
@podspecs_paths
.
empty?
@podspecs_paths
.
each
do
|
path
|
if
path
=~
/https?:\/\//
require
'open-uri'
output_path
=
podspecs_tmp_dir
+
File
.
basename
(
path
)
output_path
.
dirname
.
mkpath
open
(
path
)
do
|
io
|
output_path
.
open
(
'w'
)
{
|
f
|
f
<<
io
.
read
}
files
=
[]
@podspecs_paths
<<
'.'
if
@podspecs_paths
.
empty?
@podspecs_paths
.
each
do
|
path
|
if
path
=~
/https?:\/\//
require
'open-uri'
output_path
=
podspecs_tmp_dir
+
File
.
basename
(
path
)
output_path
.
dirname
.
mkpath
open
(
path
)
do
|
io
|
output_path
.
open
(
'w'
)
{
|
f
|
f
<<
io
.
read
}
end
files
<<
output_path
elsif
(
pathname
=
Pathname
.
new
(
path
)).
directory?
files
+=
Pathname
.
glob
(
pathname
+
'**/*.podspec{.json,}'
)
raise
Informative
,
'No specs found in the current directory.'
if
files
.
empty?
else
files
<<
(
pathname
=
Pathname
.
new
(
path
))
raise
Informative
,
"Unable to find a spec named `
#{
path
}
'."
unless
pathname
.
exist?
&&
path
.
include?
(
'.podspec'
)
end
files
<<
output_path
else
if
(
pathname
=
Pathname
.
new
(
path
)).
directory?
files
+=
Pathname
.
glob
(
pathname
+
'**/*.podspec{.json,}'
)
raise
Informative
,
'No specs found in the current directory.'
if
files
.
empty?
else
files
<<
(
pathname
=
Pathname
.
new
(
path
))
raise
Informative
,
"Unable to find a spec named `
#{
path
}
'."
unless
pathname
.
exist?
&&
path
.
include?
(
'.podspec'
)
end
files
end
end
files
end
end
def
podspecs_tmp_dir
Pathname
(
File
.
join
(
Pathname
.
new
(
'/tmp'
).
realpath
,
'/CocoaPods/Lint_podspec'
))
...
...
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