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
2c944345
Commit
2c944345
authored
May 06, 2012
by
Will Pragnell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Acknowledgements file names
parent
4cdeed68
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
7 deletions
+15
-7
markdown.rb
lib/cocoapods/generator/acknowledgements/markdown.rb
+3
-0
plist.rb
lib/cocoapods/generator/acknowledgements/plist.rb
+3
-0
installer.rb
lib/cocoapods/installer.rb
+1
-1
markdown_spec.rb
spec/unit/generator/acknowledgements/markdown_spec.rb
+4
-3
plist_spec.rb
spec/unit/generator/acknowledgements/plist_spec.rb
+4
-3
No files found.
lib/cocoapods/generator/acknowledgements/markdown.rb
View file @
2c944345
...
...
@@ -4,6 +4,9 @@ module Pod
class
Markdown
<
Acknowledgements
def
save_as
(
path
)
if
(
path
.
extname
!=
".markdown"
)
path
=
Pathname
.
new
(
path
.
dirname
+
"
#{
path
.
basename
.
to_s
}
.markdown"
)
end
file
=
File
.
new
(
path
,
"w"
)
file
.
write
(
licenses
)
file
.
close
...
...
lib/cocoapods/generator/acknowledgements/plist.rb
View file @
2c944345
...
...
@@ -5,6 +5,9 @@ module Pod
require
"xcodeproj/xcodeproj_ext"
def
save_as
(
path
)
if
(
path
.
extname
!=
".plist"
)
path
=
Pathname
.
new
(
path
.
dirname
+
"
#{
path
.
basename
.
to_s
}
.plist"
)
end
Xcodeproj
.
write_plist
(
plist
,
path
)
end
...
...
lib/cocoapods/installer.rb
View file @
2c944345
...
...
@@ -81,7 +81,7 @@ module Pod
pods_for_target
=
activated_pods_by_target
[
target_installer
.
target_definition
]
target_installer
.
install!
(
pods_for_target
,
@sandbox
)
acknowledgements_path
=
config
.
project_pods_root
+
"
#{
target_installer
.
target_definition
.
label
}
-Acknowledgements
.plist
"
"
#{
target_installer
.
target_definition
.
label
}
-Acknowledgements"
Generator
::
Acknowledgements
.
new
(
target_installer
.
target_definition
,
pods_for_target
).
save_as
(
acknowledgements_path
)
end
...
...
spec/unit/generator/acknowledgements/markdown_spec.rb
View file @
2c944345
...
...
@@ -29,11 +29,12 @@ describe Pod::Generator::Markdown do
end
it
"writes a markdown file to disk"
do
path
=
@sandbox
.
root
+
"Pods-Acknowledgements.markdown"
given_path
=
@sandbox
.
root
+
"Pods-Acknowledgements"
expected_path
=
@sandbox
.
root
+
"Pods-Acknowledgements.markdown"
mockFile
=
mock
mockFile
.
expects
(
:write
).
with
(
equals
(
@markdown
.
licenses
))
mockFile
.
expects
(
:close
)
File
.
expects
(
:new
).
with
(
equals
(
path
),
equals
(
"w"
)).
returns
(
mockFile
)
@markdown
.
save_as
(
path
)
File
.
expects
(
:new
).
with
(
equals
(
expected_
path
),
equals
(
"w"
)).
returns
(
mockFile
)
@markdown
.
save_as
(
given_
path
)
end
end
spec/unit/generator/acknowledgements/plist_spec.rb
View file @
2c944345
...
...
@@ -38,8 +38,9 @@ describe Pod::Generator::Plist do
end
it
"writes a plist to disk at the given path"
do
path
=
@sandbox
.
root
+
"Pods-Acknowledgements.plist"
Xcodeproj
.
expects
(
:write_plist
).
with
(
equals
(
@plist
.
plist
),
equals
(
path
))
@plist
.
save_as
(
path
)
given_path
=
@sandbox
.
root
+
"Pods-Acknowledgements"
expected_path
=
@sandbox
.
root
+
"Pods-Acknowledgements.plist"
Xcodeproj
.
expects
(
:write_plist
).
with
(
equals
(
@plist
.
plist
),
equals
(
expected_path
))
@plist
.
save_as
(
given_path
)
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