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
ee081939
Commit
ee081939
authored
Apr 26, 2012
by
Will Pragnell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added file name generation to acknowledgements generator
parent
fb637f2f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
acknowledgements.rb
lib/cocoapods/generator/acknowledgements.rb
+11
-2
acknowledgements_spec.rb
spec/unit/generator/acknowledgements_spec.rb
+6
-1
No files found.
lib/cocoapods/generator/acknowledgements.rb
View file @
ee081939
...
...
@@ -8,8 +8,17 @@ module Pod
@target_definition
,
@pods
=
target_definition
,
pods
end
def
save_as
(
pathname
)
Xcodeproj
.
write_plist
(
plist
,
pathname
)
def
save_in_directory
(
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
def
plist
...
...
spec/unit/generator/acknowledgements_spec.rb
View file @
ee081939
...
...
@@ -34,7 +34,12 @@ describe Pod::Generator::Acknowledgements do
}
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
@acknowledgements
.
save_
as
(
@sandbox
.
root
+
'test.plist'
).
should
.
be
.
true
@acknowledgements
.
save_
in_directory
(
@sandbox
.
root
).
should
.
be
.
true
end
end
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