Skip to content

Commit

Permalink
Made Acknowledgements Plist title configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
goonzoid committed May 6, 2012
1 parent 2c94434 commit 5c62253
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/cocoapods/generator/acknowledgements/plist.rb
Expand Up @@ -13,12 +13,16 @@ def save_as(path)

def plist
{
:Title => "Acknowledgements",
:StringsTable => "Acknowledgements",
:Title => plist_title,
:StringsTable => plist_title,
:PreferenceSpecifiers => licenses
}
end


def plist_title
"Acknowledgements"
end

def licenses
licences_array = [header_hash]
@pods.each do |pod|
Expand Down
6 changes: 6 additions & 0 deletions spec/unit/generator/acknowledgements/plist_spec.rb
Expand Up @@ -14,6 +14,12 @@
@plist.licenses.count.should == 3
end

it "returns a string for the plist title" do
@pods[0].unstub(:license_text)
@pods[0].unstub(:name)
@plist.plist_title.should.be.kind_of(String)
end

it "returns a correctly formed license hash for each pod" do
@plist.hash_for_pod(@pods[0]).should == {
:Type => "PSGroupSpecifier",
Expand Down

0 comments on commit 5c62253

Please sign in to comment.