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
1f1cc97a
Commit
1f1cc97a
authored
May 31, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Spec] Fine-tuning template.
parent
81ab80a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
spec.rb
lib/cocoapods/command/spec.rb
+3
-2
spec_spec.rb
spec/functional/command/spec_spec.rb
+4
-4
No files found.
lib/cocoapods/command/spec.rb
View file @
1f1cc97a
...
@@ -330,6 +330,7 @@ module Pod
...
@@ -330,6 +330,7 @@ module Pod
text
=
@file
.
read
text
=
@file
.
read
messages
=
[]
messages
=
[]
messages
<<
"Missing license type"
unless
license
[
:type
]
messages
<<
"Missing license type"
unless
license
[
:type
]
messages
<<
"Sample license type"
if
license
[
:type
]
&&
license
[
:type
]
=~
/\(example\)/
messages
<<
"The summary is not meaningful"
if
spec
.
summary
=~
/A short description of/
messages
<<
"The summary is not meaningful"
if
spec
.
summary
=~
/A short description of/
messages
<<
"The description is not meaningful"
if
spec
.
description
&&
spec
.
description
=~
/An optional longer description of/
messages
<<
"The description is not meaningful"
if
spec
.
description
&&
spec
.
description
=~
/An optional longer description of/
messages
<<
"The summary should end with a dot"
if
@spec
.
summary
!~
/.*\./
messages
<<
"The summary should end with a dot"
if
@spec
.
summary
!~
/.*\./
...
@@ -440,7 +441,7 @@ module Pod
...
@@ -440,7 +441,7 @@ module Pod
data
[
:name
]
=
repo
[
'name'
]
data
[
:name
]
=
repo
[
'name'
]
data
[
:summary
]
=
repo
[
'description'
].
gsub
(
/["]/
,
'\"'
)
data
[
:summary
]
=
repo
[
'description'
].
gsub
(
/["]/
,
'\"'
)
data
[
:homepage
]
=
repo
[
'homepage'
]
||
repo
[
'html_url'
]
data
[
:homepage
]
=
(
repo
[
'homepage'
]
&&
!
repo
[
'homepage'
].
empty?
)
?
repo
[
'homepage'
]
:
repo
[
'html_url'
]
data
[
:author_name
]
=
user
[
'name'
]
||
user
[
'login'
]
data
[
:author_name
]
=
user
[
'name'
]
||
user
[
'login'
]
data
[
:author_email
]
=
user
[
'email'
]
||
'email@address.com'
data
[
:author_email
]
=
user
[
'email'
]
||
'email@address.com'
data
[
:source_url
]
=
repo
[
'clone_url'
]
data
[
:source_url
]
=
repo
[
'clone_url'
]
...
@@ -506,7 +507,7 @@ Pod::Spec.new do |s|
...
@@ -506,7 +507,7 @@ Pod::Spec.new do |s|
# Specify the location from where the source should be retreived.
# Specify the location from where the source should be retreived.
#
#
s.source = { :git => "
#{
data
[
:source_url
]
}
",
"
#{
data
[
:ref_type
]
}
"
=> "
#{
data
[
:ref
]
}
" }
s.source = { :git => "
#{
data
[
:source_url
]
}
",
#{
data
[
:ref_type
]
}
=> "
#{
data
[
:ref
]
}
" }
# s.source = { :svn => 'http://EXAMPLE/
#{
data
[
:name
]
}
/tags/1.0.0' }
# s.source = { :svn => 'http://EXAMPLE/
#{
data
[
:name
]
}
/tags/1.0.0' }
# s.source = { :hg => 'http://EXAMPLE/
#{
data
[
:name
]
}
', :revision => '1.0.0' }
# s.source = { :hg => 'http://EXAMPLE/
#{
data
[
:name
]
}
', :revision => '1.0.0' }
...
...
spec/functional/command/spec_spec.rb
View file @
1f1cc97a
...
@@ -26,13 +26,13 @@ describe "Pod::Command::Spec#create" do
...
@@ -26,13 +26,13 @@ describe "Pod::Command::Spec#create" do
spec
=
Pod
::
Specification
.
from_file
(
path
).
activate_platform
(
:ios
)
spec
=
Pod
::
Specification
.
from_file
(
path
).
activate_platform
(
:ios
)
spec
.
name
.
should
==
'Bananas'
spec
.
name
.
should
==
'Bananas'
spec
.
license
.
should
==
{
:type
=>
"MIT
"
,
:file
=>
"LICENSE
"
}
spec
.
license
.
should
==
{
:type
=>
"MIT
(example)
"
}
spec
.
version
.
should
==
Pod
::
Version
.
new
(
'0.0.1'
)
spec
.
version
.
should
==
Pod
::
Version
.
new
(
'0.0.1'
)
spec
.
summary
.
should
==
'A short description of Bananas.'
spec
.
summary
.
should
==
'A short description of Bananas.'
spec
.
homepage
.
should
==
'http://EXAMPLE/Bananas'
spec
.
homepage
.
should
==
'http://EXAMPLE/Bananas'
spec
.
authors
.
should
==
{
`git config --get user.name`
.
strip
=>
`git config --get user.email`
.
strip
}
spec
.
authors
.
should
==
{
`git config --get user.name`
.
strip
=>
`git config --get user.email`
.
strip
}
spec
.
source
.
should
==
{
:git
=>
'http://EXAMPLE/Bananas.git'
,
:tag
=>
'0.0.1'
}
spec
.
source
.
should
==
{
:git
=>
'http://EXAMPLE/Bananas.git'
,
:tag
=>
'0.0.1'
}
spec
.
description
.
should
==
'A
n optional longer
description of Bananas.'
spec
.
description
.
should
==
'A
short
description of Bananas.'
spec
.
source_files
.
should
==
[
'Classes'
,
'Classes/**/*.{h,m}'
]
spec
.
source_files
.
should
==
[
'Classes'
,
'Classes/**/*.{h,m}'
]
end
end
...
@@ -44,7 +44,7 @@ describe "Pod::Command::Spec#create" do
...
@@ -44,7 +44,7 @@ describe "Pod::Command::Spec#create" do
path
=
temporary_directory
+
'libPusher.podspec'
path
=
temporary_directory
+
'libPusher.podspec'
spec
=
Pod
::
Specification
.
from_file
(
path
)
spec
=
Pod
::
Specification
.
from_file
(
path
)
spec
.
name
.
should
==
'libPusher'
spec
.
name
.
should
==
'libPusher'
spec
.
license
.
should
==
{
:type
=>
"MIT
"
,
:file
=>
"LICENSE
"
}
spec
.
license
.
should
==
{
:type
=>
"MIT
(example)
"
}
spec
.
version
.
should
==
Pod
::
Version
.
new
(
'1.3'
)
spec
.
version
.
should
==
Pod
::
Version
.
new
(
'1.3'
)
spec
.
summary
.
should
==
'An Objective-C interface to Pusher (pusherapp.com)'
spec
.
summary
.
should
==
'An Objective-C interface to Pusher (pusherapp.com)'
spec
.
homepage
.
should
==
'https://github.com/lukeredpath/libPusher'
spec
.
homepage
.
should
==
'https://github.com/lukeredpath/libPusher'
...
@@ -60,7 +60,7 @@ describe "Pod::Command::Spec#create" do
...
@@ -60,7 +60,7 @@ describe "Pod::Command::Spec#create" do
path
=
temporary_directory
+
'other_name.podspec'
path
=
temporary_directory
+
'other_name.podspec'
spec
=
Pod
::
Specification
.
from_file
(
path
)
spec
=
Pod
::
Specification
.
from_file
(
path
)
spec
.
name
.
should
==
'other_name'
spec
.
name
.
should
==
'other_name'
spec
.
license
.
should
==
{
:type
=>
"MIT
"
,
:file
=>
"LICENSE
"
}
spec
.
license
.
should
==
{
:type
=>
"MIT
(example)
"
}
spec
.
version
.
should
==
Pod
::
Version
.
new
(
'1.3'
)
spec
.
version
.
should
==
Pod
::
Version
.
new
(
'1.3'
)
spec
.
summary
.
should
==
'An Objective-C interface to Pusher (pusherapp.com)'
spec
.
summary
.
should
==
'An Objective-C interface to Pusher (pusherapp.com)'
spec
.
homepage
.
should
==
'https://github.com/lukeredpath/libPusher'
spec
.
homepage
.
should
==
'https://github.com/lukeredpath/libPusher'
...
...
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