Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dspace-rest-client
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Bruno Nocera Zanette
dspace-rest-client
Commits
8993e97a
Commit
8993e97a
authored
Dec 18, 2015
by
Mateus Rambo Strey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove file content force encoding
parent
3cd4b476
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/dspace/builders/tempfile_builder.rb
lib/dspace/builders/tempfile_builder.rb
+2
-2
No files found.
lib/dspace/builders/tempfile_builder.rb
View file @
8993e97a
...
@@ -3,8 +3,8 @@ module Dspace
...
@@ -3,8 +3,8 @@ module Dspace
module
TempfileBuilder
module
TempfileBuilder
def
self
.
build
(
filename
,
contents
=
nil
)
def
self
.
build
(
filename
,
contents
=
nil
)
file
=
Tempfile
.
new
([
sanitize_filename
(
filename
),
File
.
extname
(
filename
)]).
tap
do
|
f
|
file
=
Tempfile
.
new
([
sanitize_filename
(
filename
),
File
.
extname
(
filename
)]
,
encoding:
'ascii-8bit'
).
tap
do
|
f
|
f
.
write
contents
.
force_encoding
(
"UTF-8"
)
f
.
write
contents
f
.
close
f
.
close
end
end
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