Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
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
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
67281668
Commit
67281668
authored
Jun 08, 2012
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure no newline from type_from_file_command
This relates to #817
parent
7332e51a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletions
+21
-1
lib/paperclip/io_adapters/abstract_adapter.rb
+0
-1
test/io_adapters/abstract_adapter_test.rb
+21
-0
No files found.
lib/paperclip/io_adapters/abstract_adapter.rb
View file @
67281668
...
...
@@ -27,6 +27,5 @@ module Paperclip
mime_type
=
"application/x-
#{
type
}
"
if
mime_type
.
match
(
/\(.*?\)/
)
mime_type
end
end
end
test/io_adapters/abstract_adapter_test.rb
0 → 100644
View file @
67281668
require
'./test/helper'
class
AbstractAdapterTest
<
Test
::
Unit
::
TestCase
class
TestAdapter
<
Paperclip
::
AbstractAdapter
attr_accessor
:path
,
:original_file_name
def
content_type
type_from_file_command
end
end
context
"content type from file command"
do
setup
do
Paperclip
.
stubs
(
:run
).
returns
(
"image/png
\n
"
)
end
should
"return the content type without newline"
do
assert_equal
"image/png"
,
TestAdapter
.
new
.
content_type
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