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
acd55a06
Commit
acd55a06
authored
Sep 25, 2014
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Acknowledgements::Plist] Fix sanitization of license text
Now it doesn't strip out characters such as
©
and –
parent
f985eb04
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
plist.rb
lib/cocoapods/generator/acknowledgements/plist.rb
+1
-1
plist_spec.rb
spec/unit/generator/acknowledgements/plist_spec.rb
+12
-0
No files found.
lib/cocoapods/generator/acknowledgements/plist.rb
View file @
acd55a06
...
@@ -74,7 +74,7 @@ module Pod
...
@@ -74,7 +74,7 @@ module Pod
#
#
def
sanitize_encoding
(
text
)
def
sanitize_encoding
(
text
)
if
RUBY_VERSION
>=
'1.9'
if
RUBY_VERSION
>=
'1.9'
text
.
encode
(
'UTF-8'
,
'binary'
,
:invalid
=>
:replace
,
:undef
=>
:replace
,
:replace
=>
''
)
text
.
encode
(
'UTF-8'
,
:invalid
=>
:replace
,
:undef
=>
:replace
,
:replace
=>
''
)
else
else
text
text
end
end
...
...
spec/unit/generator/acknowledgements/plist_spec.rb
View file @
acd55a06
...
@@ -27,6 +27,18 @@ describe Pod::Generator::Plist do
...
@@ -27,6 +27,18 @@ describe Pod::Generator::Plist do
}
}
end
end
if
RUBY_VERSION
>=
'1.9'
it
'returns a correctly sanitized license hash for each pod'
do
license_text
=
'Copyright © 2013–2014 Boris Bügling'
@generator
.
stubs
(
:license_text
).
returns
(
license_text
)
@generator
.
hash_for_spec
(
@spec
).
should
==
{
:Type
=>
'PSGroupSpecifier'
,
:Title
=>
'POD_NAME'
,
:FooterText
=>
license_text
,
}
end
end
it
'returns nil for a pod with no license text'
do
it
'returns nil for a pod with no license text'
do
@generator
.
expects
(
:license_text
).
returns
(
nil
)
@generator
.
expects
(
:license_text
).
returns
(
nil
)
@generator
.
hash_for_spec
(
@spec
).
should
.
be
.
nil
@generator
.
hash_for_spec
(
@spec
).
should
.
be
.
nil
...
...
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