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
2a0a8d6d
Commit
2a0a8d6d
authored
Jan 05, 2016
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[InfoPlist] Properly format serialized arrays
Adds a newline after the </array> tag
parent
43082b28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
info_plist_file.rb
lib/cocoapods/generator/info_plist_file.rb
+1
-1
info_plist_file_spec.rb
spec/unit/generator/info_plist_file_spec.rb
+17
-0
No files found.
lib/cocoapods/generator/info_plist_file.rb
View file @
2a0a8d6d
...
...
@@ -88,7 +88,7 @@ module Pod
when
Array
output
<<
indent
<<
"<array>
\n
"
value
.
each
{
|
v
|
serialize
(
v
,
output
,
indentation
+
2
)
}
output
<<
indent
<<
'</array>'
output
<<
indent
<<
"</array>
\n
"
when
Hash
output
<<
indent
<<
"<dict>
\n
"
value
.
to_a
.
sort_by
(
&
:first
).
each
do
|
key
,
v
|
...
...
spec/unit/generator/info_plist_file_spec.rb
View file @
2a0a8d6d
...
...
@@ -85,6 +85,23 @@ module Pod
Xcodeproj
::
Plist
.
read_from_path
(
file
)[
'UIRequiredDeviceCapabilities'
].
should
==
%w(arm64)
end
it
'properly formats serialized arrays'
do
generator
=
Generator
::
InfoPlistFile
.
new
(
mock
(
'Target'
))
generator
.
send
(
:to_plist
,
'array'
=>
%w(a b)
).
should
==
<<-
PLIST
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>array</key>
<array>
<string>a</string>
<string>b</string>
</array>
</dict>
</plist>
PLIST
end
it
'uses the specified bundle_package_type'
do
target
=
mock
(
'Target'
,
:platform
=>
stub
(
:name
=>
:ios
))
generator
=
Generator
::
InfoPlistFile
.
new
(
target
,
:bundle_package_type
=>
:bndl
)
...
...
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