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
56012bf3
Commit
56012bf3
authored
Feb 17, 2012
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S3::Object now throws error if the object doesn't exists
Fixes #743
parent
9ad074a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
lib/paperclip/storage/s3.rb
+2
-0
test/storage/s3_test.rb
+10
-0
No files found.
lib/paperclip/storage/s3.rb
View file @
56012bf3
...
...
@@ -238,6 +238,8 @@ module Paperclip
else
false
end
rescue
AWS
::
Errors
::
Base
=>
e
false
end
def
s3_permissions
(
style
=
default_style
)
...
...
test/storage/s3_test.rb
View file @
56012bf3
...
...
@@ -542,6 +542,16 @@ class S3Test < Test::Unit::TestCase
assert
true
end
end
context
'that the file were missing'
do
setup
do
AWS
::
S3
::
S3Object
.
any_instance
.
stubs
(
:exists?
).
raises
(
AWS
::
Errors
::
Base
)
end
should
'return false on exists?'
do
assert
!
@dummy
.
avatar
.
exists?
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