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
6596360a
Commit
6596360a
authored
May 07, 2018
by
Hayden Ball
Committed by
Sid Raval
May 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include Cocaine error when there was an error processing thumbnails (#2415)
parent
d7251af8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
lib/paperclip/thumbnail.rb
+4
-1
spec/paperclip/thumbnail_spec.rb
+4
-2
No files found.
lib/paperclip/thumbnail.rb
View file @
6596360a
...
...
@@ -85,7 +85,10 @@ module Paperclip
dest:
File
.
expand_path
(
dst
.
path
),
)
rescue
Terrapin
::
ExitStatusError
=>
e
raise
Paperclip
::
Error
,
"There was an error processing the thumbnail for
#{
@basename
}
"
if
@whiny
if
@whiny
message
=
"There was an error processing the thumbnail for
#{
@basename
}
:
\n
"
+
e
.
message
raise
Paperclip
::
Error
,
message
end
rescue
Terrapin
::
CommandNotFoundError
=>
e
raise
Paperclip
::
Errors
::
CommandNotFoundError
.
new
(
"Could not run the `convert` command. Please install ImageMagick."
)
end
...
...
spec/paperclip/thumbnail_spec.rb
View file @
6596360a
...
...
@@ -179,10 +179,12 @@ describe Paperclip::Thumbnail do
end
it
"errors when trying to create the thumbnail"
do
assert_raises
(
Paperclip
::
Error
)
do
silence_stream
(
STDERR
)
do
expect
{
@thumb
.
make
end
}.
to
raise_error
(
Paperclip
::
Error
,
/unrecognized option `-this-aint-no-option'/
)
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