Commit ee081939 authored by Will Pragnell's avatar Will Pragnell

Added file name generation to acknowledgements generator

parent fb637f2f
...@@ -8,8 +8,17 @@ module Pod ...@@ -8,8 +8,17 @@ module Pod
@target_definition, @pods = target_definition, pods @target_definition, @pods = target_definition, pods
end end
def save_as(pathname) def save_in_directory(pathname)
Xcodeproj.write_plist(plist, pathname) Xcodeproj.write_plist(plist, pathname + filename)
end
def filename
result = "#{@target_definition.label}-Acknowledgements.plist"
if result.start_with?"Pods-"
result
else
"Pods-" + result
end
end end
def plist def plist
......
...@@ -34,7 +34,12 @@ describe Pod::Generator::Acknowledgements do ...@@ -34,7 +34,12 @@ describe Pod::Generator::Acknowledgements do
} }
end end
it "adds \"Pods-\" to the beginning of the filename only if necessary" do
(@acknowledgements.filename.start_with?"Pods-").should.be.true
(@acknowledgements.filename.start_with?"Pods-Pods-").should.be.false
end
it "writes a plist to disk" do it "writes a plist to disk" do
@acknowledgements.save_as(@sandbox.root + 'test.plist').should.be.true @acknowledgements.save_in_directory(@sandbox.root).should.be.true
end end
end end
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