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
2d791bf7
Commit
2d791bf7
authored
Jun 08, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[rbx] Encode only if needed.
parent
425a5c16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
podfile.rb
lib/cocoapods/podfile.rb
+2
-2
specification.rb
lib/cocoapods/specification.rb
+2
-2
No files found.
lib/cocoapods/podfile.rb
View file @
2d791bf7
...
@@ -153,9 +153,9 @@ module Pod
...
@@ -153,9 +153,9 @@ module Pod
def
self
.
from_file
(
path
)
def
self
.
from_file
(
path
)
podfile
=
Podfile
.
new
do
podfile
=
Podfile
.
new
do
string
=
File
.
open
(
path
,
'r:utf-8'
)
{
|
f
|
f
.
read
}
# TODO: work around for Rubinius incomplete encoding in 1.9 mode
# TODO: work around for Rubinius incomplete encoding in 1.9 mode
string
=
File
.
open
(
path
,
'r'
)
{
|
f
|
f
.
read
}
string
.
encode!
(
'UTF-8'
)
if
string
.
respond_to?
(
:encoding
)
&&
string
.
encoding
.
name
!=
"UTF-8"
string
.
encode!
(
'UTF-8'
)
if
string
.
respond_to?
(
:encode!
)
eval
(
string
,
nil
,
path
.
to_s
)
eval
(
string
,
nil
,
path
.
to_s
)
end
end
podfile
.
defined_in_file
=
path
podfile
.
defined_in_file
=
path
...
...
lib/cocoapods/specification.rb
View file @
2d791bf7
...
@@ -4,9 +4,9 @@ module Pod
...
@@ -4,9 +4,9 @@ module Pod
extend
Config
::
Mixin
extend
Config
::
Mixin
def
self
.
_eval_podspec
(
path
)
def
self
.
_eval_podspec
(
path
)
string
=
File
.
open
(
path
,
'r:utf-8'
)
{
|
f
|
f
.
read
}
# TODO: work around for Rubinius incomplete encoding in 1.9 mode
# TODO: work around for Rubinius incomplete encoding in 1.9 mode
string
=
File
.
open
(
path
,
'r'
)
{
|
f
|
f
.
read
}
string
.
encode!
(
'UTF-8'
)
if
string
.
respond_to?
(
:encoding
)
&&
string
.
encoding
.
name
!=
"UTF-8"
string
.
encode!
(
'UTF-8'
)
if
string
.
respond_to?
(
:encode!
)
eval
(
string
,
nil
,
path
.
to_s
)
eval
(
string
,
nil
,
path
.
to_s
)
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