Commit 9f1b33b1 authored by Fabio Pelosin's avatar Fabio Pelosin

[Specification] Made homepage, description, and summary top level.

Closes #269
parent 1a8478a2
...@@ -136,24 +136,12 @@ module Pod ...@@ -136,24 +136,12 @@ module Pod
attr_accessor :parent attr_accessor :parent
attr_accessor :preferred_dependency attr_accessor :preferred_dependency
attr_accessor :summary
def name def name
@parent ? "#{@parent.name}/#{@name}" : @name @parent ? "#{@parent.name}/#{@name}" : @name
end end
attr_writer :name 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 ### Attributes that return the first value defined in the chain
def platform def platform
...@@ -173,6 +161,8 @@ module Pod ...@@ -173,6 +161,8 @@ module Pod
top_attr_accessor :defined_in_file top_attr_accessor :defined_in_file
top_attr_accessor :source top_attr_accessor :source
top_attr_accessor :homepage
top_attr_accessor :summary
top_attr_accessor :documentation top_attr_accessor :documentation
top_attr_accessor :requires_arc top_attr_accessor :requires_arc
top_attr_accessor :license, lambda { |l| ( l.kind_of? String ) ? { :type => l } : l } top_attr_accessor :license, lambda { |l| ( l.kind_of? String ) ? { :type => l } : l }
...@@ -182,6 +172,8 @@ module Pod ...@@ -182,6 +172,8 @@ module Pod
top_attr_accessor :prefix_header_file, lambda { |file| Pathname.new(file) } top_attr_accessor :prefix_header_file, lambda { |file| Pathname.new(file) }
top_attr_accessor :prefix_header_contents 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_reader :header_dir, lambda {|instance, ivar| ivar || instance.pod_destroot_name }
top_attr_writer :header_dir, lambda {|dir| Pathname.new(dir) } top_attr_writer :header_dir, lambda {|dir| Pathname.new(dir) }
......
Subproject commit 7aec148979834c795a0c7f3108b4d48a9f1c0f5c Subproject commit 5f39221d0bf69ebc0a2dc5879deae271f208877b
...@@ -101,10 +101,9 @@ describe "Pod::Command::Spec#lint" do ...@@ -101,10 +101,9 @@ describe "Pod::Command::Spec#lint" do
end end
it "lints a repo" do 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') cmd = command('spec', 'lint', 'master')
lambda { cmd.run }.should.raise Pod::Informative 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" cmd.output.should.include "WARN"
end end
......
...@@ -201,7 +201,7 @@ else ...@@ -201,7 +201,7 @@ else
doc = (config.project_pods_root + 'Documentation/JSONKit/html/index.html').read doc = (config.project_pods_root + 'Documentation/JSONKit/html/index.html').read
doc.should.include?('<title>JSONKit 1.4 Reference</title>') doc.should.include?('<title>JSONKit 1.4 Reference</title>')
doc = (config.project_pods_root + 'Documentation/SSToolkit/html/index.html').read 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 end
else else
puts " ! ".red << "Skipping documentation generation specs, because appledoc can't be found." puts " ! ".red << "Skipping documentation generation specs, because appledoc can't be found."
...@@ -254,7 +254,7 @@ else ...@@ -254,7 +254,7 @@ else
# { 'ASIWebPageRequest (1.8.1)' => ["ASIHTTPRequest (= 1.8.1)"] }, # { 'ASIWebPageRequest (1.8.1)' => ["ASIHTTPRequest (= 1.8.1)"] },
'JSONKit (1.5pre)', 'JSONKit (1.5pre)',
'Reachability (3.0.0)', 'Reachability (3.0.0)',
'SSZipArchive (0.1.2)', 'SSZipArchive (0.2.1)',
], ],
'DEPENDENCIES' => [ 'DEPENDENCIES' => [
# "ASIWebPageRequest (>= 1.8.1)", # "ASIWebPageRequest (>= 1.8.1)",
......
...@@ -10,7 +10,7 @@ describe "Pod::Specification::Set" do ...@@ -10,7 +10,7 @@ describe "Pod::Specification::Set" do
end end
it "returns the versions available for this pod ordered from highest to lowest" do 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 end
it "checks if the dependency of the specification is compatible with existing requirements" do it "checks if the dependency of the specification is compatible with existing requirements" do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment