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
e803a12a
Commit
e803a12a
authored
Jan 02, 2014
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Getting rid of some deprecations and ruby warnings
parent
6ac25099
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
test/integration_test.rb
+4
-5
test/storage/fog_test.rb
+8
-8
No files found.
test/integration_test.rb
View file @
e803a12a
...
...
@@ -17,8 +17,7 @@ class IntegrationTest < Test::Unit::TestCase
should
"not exceed the open file limit"
do
assert_nothing_raised
do
dummies
=
Dummy
.
find
(
:all
)
dummies
.
each
{
|
dummy
|
dummy
.
avatar
}
Dummy
.
all
.
each
{
|
dummy
|
dummy
.
avatar
}
end
end
end
...
...
@@ -35,7 +34,7 @@ class IntegrationTest < Test::Unit::TestCase
teardown
{
@file
.
close
}
should
"create its thumbnails properly"
do
assert_match
/\b50x50\b/
,
`identify "
#{
@dummy
.
avatar
.
path
(
:thumb
)
}
"`
assert_match
(
/\b50x50\b/
,
`identify "
#{
@dummy
.
avatar
.
path
(
:thumb
)
}
"`
)
end
context
'reprocessing with unreadable original'
do
...
...
@@ -70,8 +69,8 @@ class IntegrationTest < Test::Unit::TestCase
end
should
"create its thumbnails properly"
do
assert_match
/\b150x25\b/
,
`identify "
#{
@dummy
.
avatar
.
path
(
:thumb
)
}
"`
assert_match
/\b50x50\b/
,
`identify "
#{
@dummy
.
avatar
.
path
(
:dynamic
)
}
"`
assert_match
(
/\b150x25\b/
,
`identify "
#{
@dummy
.
avatar
.
path
(
:thumb
)
}
"`
)
assert_match
(
/\b50x50\b/
,
`identify "
#{
@dummy
.
avatar
.
path
(
:dynamic
)
}
"`
)
end
should
"change the timestamp"
do
...
...
test/storage/fog_test.rb
View file @
e803a12a
...
...
@@ -309,11 +309,11 @@ class FogTest < Test::Unit::TestCase
context
"with a valid bucket name for a subdomain"
do
should
"provide an url in subdomain style"
do
assert_match
/^https:\/\/papercliptests.s3.amazonaws.com\/avatars\/5k.png/
,
@dummy
.
avatar
.
url
assert_match
(
/^https:\/\/papercliptests.s3.amazonaws.com\/avatars\/5k.png/
,
@dummy
.
avatar
.
url
)
end
should
"provide an url that expires in subdomain style"
do
assert_match
/^http:\/\/papercliptests.s3.amazonaws.com\/avatars\/5k.png\?AWSAccessKeyId=.+$/
,
@dummy
.
avatar
.
expiring_url
assert_match
(
/^http:\/\/papercliptests.s3.amazonaws.com\/avatars\/5k.png\?AWSAccessKeyId=.+$/
,
@dummy
.
avatar
.
expiring_url
)
end
end
...
...
@@ -333,11 +333,11 @@ class FogTest < Test::Unit::TestCase
end
should
"provide an url in folder style"
do
assert_match
/^https:\/\/s3.amazonaws.com\/this_is_invalid\/avatars\/5k.png\?\d*$/
,
@dummy
.
avatar
.
url
assert_match
(
/^https:\/\/s3.amazonaws.com\/this_is_invalid\/avatars\/5k.png\?\d*$/
,
@dummy
.
avatar
.
url
)
end
should
"provide a url that expires in folder style"
do
assert_match
/^http:\/\/s3.amazonaws.com\/this_is_invalid\/avatars\/5k.png\?AWSAccessKeyId=.+$/
,
@dummy
.
avatar
.
expiring_url
assert_match
(
/^http:\/\/s3.amazonaws.com\/this_is_invalid\/avatars\/5k.png\?AWSAccessKeyId=.+$/
,
@dummy
.
avatar
.
expiring_url
)
end
end
...
...
@@ -368,7 +368,7 @@ class FogTest < Test::Unit::TestCase
end
should
"provide a public url"
do
assert_match
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
url
assert_match
(
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
url
)
end
end
...
...
@@ -382,11 +382,11 @@ class FogTest < Test::Unit::TestCase
end
should
"provide a public url"
do
assert_match
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
url
assert_match
(
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
url
)
end
should
"provide an expiring url"
do
assert_match
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
expiring_url
assert_match
(
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
expiring_url
)
end
context
"with an invalid bucket name for a subdomain"
do
...
...
@@ -398,7 +398,7 @@ class FogTest < Test::Unit::TestCase
end
should
"provide an expiring url"
do
assert_match
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
expiring_url
assert_match
(
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
expiring_url
)
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