Commit e803a12a by Jon Yurek

Getting rid of some deprecations and ruby warnings

parent 6ac25099
...@@ -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
......
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment