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
4235dbe3
Commit
4235dbe3
authored
Apr 16, 2012
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spelling error and that podspecs don't have to be in the current working dir.
parent
b20d6402
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
spec.rb
lib/cocoapods/command/spec.rb
+8
-1
No files found.
lib/cocoapods/command/spec.rb
View file @
4235dbe3
...
@@ -55,13 +55,14 @@ module Pod
...
@@ -55,13 +55,14 @@ module Pod
puts
"
\n
The
#{
spec
.
name
}
specification contains all the required attributes."
.
green
if
spec
.
validate!
puts
"
\n
The
#{
spec
.
name
}
specification contains all the required attributes."
.
green
if
spec
.
validate!
warnings
=
[]
warnings
=
[]
warnings
<<
'The name of the specifica
iton should match the name of the podspec file'
if
spec
.
name
+
'.podspec'
!=
name
warnings
<<
'The name of the specifica
tion should match the name of the podspec file'
unless
path_matches_name?
(
file
,
spec
)
warnings
<<
'Missing license[:type]'
unless
spec
.
license
&&
spec
.
license
[
:type
]
warnings
<<
'Missing license[:type]'
unless
spec
.
license
&&
spec
.
license
[
:type
]
warnings
<<
'Missing license[:file] or [:text]'
unless
spec
.
license
&&
(
spec
.
license
[
:file
]
||
spec
.
license
[
:text
])
warnings
<<
'Missing license[:file] or [:text]'
unless
spec
.
license
&&
(
spec
.
license
[
:file
]
||
spec
.
license
[
:text
])
warnings
<<
"Github repositories should end in `.git'"
if
spec
.
source
[
:git
]
=~
/github.com/
&&
spec
.
source
[
:git
]
!~
/.*\.git/
warnings
<<
"Github repositories should end in `.git'"
if
spec
.
source
[
:git
]
=~
/github.com/
&&
spec
.
source
[
:git
]
!~
/.*\.git/
warnings
<<
"Github repositories should end in `.git'"
if
spec
.
source
[
:git
]
=~
/github.com/
&&
spec
.
source
[
:git
]
!~
/.*\.git/
warnings
<<
"Github repositories should end in `.git'"
if
spec
.
source
[
:git
]
=~
/github.com/
&&
spec
.
source
[
:git
]
!~
/.*\.git/
warnings
<<
"The description should end with a dot"
if
spec
.
description
&&
spec
.
description
!~
/.*\./
warnings
<<
"The description should end with a dot"
if
spec
.
description
&&
spec
.
description
!~
/.*\./
warnings
<<
"The summary should end with a dot"
if
spec
.
summary
!~
/.*\./
warnings
<<
"The summary should end with a dot"
if
spec
.
summary
!~
/.*\./
unless
warnings
.
empty?
unless
warnings
.
empty?
puts
"
\n
[!] The
#{
spec
.
name
}
specification raised the following warnings"
.
yellow
puts
"
\n
[!] The
#{
spec
.
name
}
specification raised the following warnings"
.
yellow
warnings
.
each
{
|
warn
|
puts
' - '
+
warn
}
warnings
.
each
{
|
warn
|
puts
' - '
+
warn
}
...
@@ -69,6 +70,12 @@ module Pod
...
@@ -69,6 +70,12 @@ module Pod
puts
puts
end
end
private
def
path_matches_name?
(
path
,
spec
)
(
path
.
dirname
+
"
#{
spec
.
name
}
.podspec"
).
to_s
==
@name
end
def
suggested_ref_and_version
(
repo
)
def
suggested_ref_and_version
(
repo
)
tags
=
Octokit
.
tags
(
:username
=>
repo
[
'owner'
][
'login'
],
:repo
=>
repo
[
'name'
]).
map
{
|
tag
|
tag
.
name
}
tags
=
Octokit
.
tags
(
:username
=>
repo
[
'owner'
][
'login'
],
:repo
=>
repo
[
'name'
]).
map
{
|
tag
|
tag
.
name
}
versions_tags
=
{}
versions_tags
=
{}
...
...
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