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
Hide 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
...
@@ -17,8 +17,7 @@ class IntegrationTest < Test::Unit::TestCase
should
"not exceed the open file limit"
do
should
"not exceed the open file limit"
do
assert_nothing_raised
do
assert_nothing_raised
do
dummies
=
Dummy
.
find
(
:all
)
Dummy
.
all
.
each
{
|
dummy
|
dummy
.
avatar
}
dummies
.
each
{
|
dummy
|
dummy
.
avatar
}
end
end
end
end
end
end
...
@@ -35,7 +34,7 @@ class IntegrationTest < Test::Unit::TestCase
...
@@ -35,7 +34,7 @@ class IntegrationTest < Test::Unit::TestCase
teardown
{
@file
.
close
}
teardown
{
@file
.
close
}
should
"create its thumbnails properly"
do
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
end
context
'reprocessing with unreadable original'
do
context
'reprocessing with unreadable original'
do
...
@@ -70,8 +69,8 @@ class IntegrationTest < Test::Unit::TestCase
...
@@ -70,8 +69,8 @@ class IntegrationTest < Test::Unit::TestCase
end
end
should
"create its thumbnails properly"
do
should
"create its thumbnails properly"
do
assert_match
/\b150x25\b/
,
`identify "
#{
@dummy
.
avatar
.
path
(
:thumb
)
}
"`
assert_match
(
/\b150x25\b/
,
`identify "
#{
@dummy
.
avatar
.
path
(
:thumb
)
}
"`
)
assert_match
/\b50x50\b/
,
`identify "
#{
@dummy
.
avatar
.
path
(
:dynamic
)
}
"`
assert_match
(
/\b50x50\b/
,
`identify "
#{
@dummy
.
avatar
.
path
(
:dynamic
)
}
"`
)
end
end
should
"change the timestamp"
do
should
"change the timestamp"
do
...
...
test/storage/fog_test.rb
View file @
e803a12a
...
@@ -309,11 +309,11 @@ class FogTest < Test::Unit::TestCase
...
@@ -309,11 +309,11 @@ class FogTest < Test::Unit::TestCase
context
"with a valid bucket name for a subdomain"
do
context
"with a valid bucket name for a subdomain"
do
should
"provide an url in subdomain style"
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
end
should
"provide an url that expires in subdomain style"
do
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
end
end
...
@@ -333,11 +333,11 @@ class FogTest < Test::Unit::TestCase
...
@@ -333,11 +333,11 @@ class FogTest < Test::Unit::TestCase
end
end
should
"provide an url in folder style"
do
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
end
should
"provide a url that expires in folder style"
do
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
end
end
...
@@ -368,7 +368,7 @@ class FogTest < Test::Unit::TestCase
...
@@ -368,7 +368,7 @@ class FogTest < Test::Unit::TestCase
end
end
should
"provide a public url"
do
should
"provide a public url"
do
assert_match
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
url
assert_match
(
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
url
)
end
end
end
end
...
@@ -382,11 +382,11 @@ class FogTest < Test::Unit::TestCase
...
@@ -382,11 +382,11 @@ class FogTest < Test::Unit::TestCase
end
end
should
"provide a public url"
do
should
"provide a public url"
do
assert_match
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
url
assert_match
(
/http:\/\/dynamicfoghost\.com/
,
@dummy
.
avatar
.
url
)
end
end
should
"provide an expiring url"
do
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
context
"with an invalid bucket name for a subdomain"
do
context
"with an invalid bucket name for a subdomain"
do
...
@@ -398,7 +398,7 @@ class FogTest < Test::Unit::TestCase
...
@@ -398,7 +398,7 @@ class FogTest < Test::Unit::TestCase
end
end
should
"provide an expiring url"
do
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
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