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
9f1b33b1
Commit
9f1b33b1
authored
May 24, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Specification] Made homepage, description, and summary top level.
Closes #269
parent
1a8478a2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
18 deletions
+9
-18
specification.rb
lib/cocoapods/specification.rb
+4
-12
master
spec/fixtures/spec-repos/master
+1
-1
spec_spec.rb
spec/functional/command/spec_spec.rb
+1
-2
integration_spec.rb
spec/integration_spec.rb
+2
-2
set_spec.rb
spec/unit/specification/set_spec.rb
+1
-1
No files found.
lib/cocoapods/specification.rb
View file @
9f1b33b1
...
...
@@ -136,24 +136,12 @@ module Pod
attr_accessor
:parent
attr_accessor
:preferred_dependency
attr_accessor
:summary
def
name
@parent
?
"
#{
@parent
.
name
}
/
#{
@name
}
"
:
@name
end
attr_writer
:name
def
description
@description
||
summary
end
# TODO: consider converting the following to top level attributes
# A subspec should have a summary instead of a description.
# Some subspecs contain a homepage but we never use this information.
attr_writer
:description
attr_accessor
:homepage
### Attributes that return the first value defined in the chain
def
platform
...
...
@@ -173,6 +161,8 @@ module Pod
top_attr_accessor
:defined_in_file
top_attr_accessor
:source
top_attr_accessor
:homepage
top_attr_accessor
:summary
top_attr_accessor
:documentation
top_attr_accessor
:requires_arc
top_attr_accessor
:license
,
lambda
{
|
l
|
(
l
.
kind_of?
String
)
?
{
:
type
=>
l
}
:
l
}
...
...
@@ -182,6 +172,8 @@ module Pod
top_attr_accessor
:prefix_header_file
,
lambda
{
|
file
|
Pathname
.
new
(
file
)
}
top_attr_accessor
:prefix_header_contents
top_attr_reader
:description
,
lambda
{
|
instance
,
ivar
|
ivar
||
instance
.
summary
}
top_attr_writer
:description
top_attr_reader
:header_dir
,
lambda
{
|
instance
,
ivar
|
ivar
||
instance
.
pod_destroot_name
}
top_attr_writer
:header_dir
,
lambda
{
|
dir
|
Pathname
.
new
(
dir
)
}
...
...
master
@
5f39221d
Subproject commit
7aec148979834c795a0c7f3108b4d48a9f1c0f5c
Subproject commit
5f39221d0bf69ebc0a2dc5879deae271f208877b
spec/functional/command/spec_spec.rb
View file @
9f1b33b1
...
...
@@ -101,10 +101,9 @@ describe "Pod::Command::Spec#lint" do
end
it
"lints a repo"
do
# The fixture has
an error due to a name mismatch
# The fixture has
warnings so it raises
cmd
=
command
(
'spec'
,
'lint'
,
'master'
)
lambda
{
cmd
.
run
}.
should
.
raise
Pod
::
Informative
cmd
.
output
.
should
.
include
"InAppSettingKit (0.0.1)
\n
- ERROR | The name of the spec should match the name of the file"
cmd
.
output
.
should
.
include
"WARN"
end
...
...
spec/integration_spec.rb
View file @
9f1b33b1
...
...
@@ -201,7 +201,7 @@ else
doc
=
(
config
.
project_pods_root
+
'Documentation/JSONKit/html/index.html'
).
read
doc
.
should
.
include?
(
'<title>JSONKit 1.4 Reference</title>'
)
doc
=
(
config
.
project_pods_root
+
'Documentation/SSToolkit/html/index.html'
).
read
doc
.
should
.
include?
(
'<title>SSToolkit
0.1.2
Reference</title>'
)
doc
.
should
.
include?
(
'<title>SSToolkit
1.0.0
Reference</title>'
)
end
else
puts
" ! "
.
red
<<
"Skipping documentation generation specs, because appledoc can't be found."
...
...
@@ -254,7 +254,7 @@ else
# { 'ASIWebPageRequest (1.8.1)' => ["ASIHTTPRequest (= 1.8.1)"] },
'JSONKit (1.5pre)'
,
'Reachability (3.0.0)'
,
'SSZipArchive (0.
1.2
)'
,
'SSZipArchive (0.
2.1
)'
,
],
'DEPENDENCIES'
=>
[
# "ASIWebPageRequest (>= 1.8.1)",
...
...
spec/unit/specification/set_spec.rb
View file @
9f1b33b1
...
...
@@ -10,7 +10,7 @@ describe "Pod::Specification::Set" do
end
it
"returns the versions available for this pod ordered from highest to lowest"
do
@set
.
versions
.
should
==
%w[1.3.2 1.3.1 1.3 1.2.3 1.2.2 1.2.1 1.2 1.1 1.0]
.
map
{
|
v
|
Pod
::
Version
.
new
(
v
)
}
@set
.
versions
.
should
==
%w[1.3.
3 1.3.
2 1.3.1 1.3 1.2.3 1.2.2 1.2.1 1.2 1.1 1.0]
.
map
{
|
v
|
Pod
::
Version
.
new
(
v
)
}
end
it
"checks if the dependency of the specification is compatible with existing requirements"
do
...
...
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