Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Use AWS::SDK instead of AWS::S3
Browse files Browse the repository at this point in the history
The original commit came from @amazonwebservices and @trevorrowe in #579.
I had to revise the commit and make sure all the test cases are passing.
All credits still goes to those guys, thanks a lot!
  • Loading branch information
sikachu committed Dec 12, 2011
1 parent 5f3b88d commit 75f413d
Show file tree
Hide file tree
Showing 10 changed files with 455 additions and 651 deletions.
64 changes: 30 additions & 34 deletions Gemfile.lock
@@ -1,19 +1,27 @@
PATH
remote: .
specs:
paperclip (2.4.5)
activerecord (>= 2.3.0)
activesupport (>= 2.3.2)
cocaine (>= 0.0.2)
mime-types

GEM
remote: http://rubygems.org/
specs:
activemodel (3.1.0)
activesupport (= 3.1.0)
bcrypt-ruby (~> 3.0.0)
activemodel (3.1.2)
activesupport (= 3.1.2)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.0)
activemodel (= 3.1.0)
activesupport (= 3.1.0)
activerecord (3.1.2)
activemodel (= 3.1.2)
activesupport (= 3.1.2)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activesupport (3.1.0)
activesupport (3.1.2)
multi_json (~> 1.0)
appraisal (0.3.8)
appraisal (0.4.0)
bundler
rake
arel (2.2.1)
Expand All @@ -23,13 +31,13 @@ GEM
cucumber (>= 1.0.2)
rdiscount (>= 1.6.8)
rspec (>= 2.6.0)
aws-s3 (0.6.2)
builder
mime-types
xml-simple
aws-sdk (1.2.1)
httparty (~> 0.7)
json (~> 1.4)
nokogiri (>= 1.4.4)
uuidtools (~> 2.1)
bcat (0.6.2)
rack (~> 1.0)
bcrypt-ruby (3.0.1)
builder (3.0.0)
capybara (1.1.1)
mime-types (>= 1.16)
Expand All @@ -41,7 +49,6 @@ GEM
childprocess (0.2.2)
ffi (~> 1.0.6)
cocaine (0.2.0)
coderay (1.0.0)
cucumber (1.0.6)
builder (>= 2.1.2)
diff-lcs (>= 1.1.2)
Expand All @@ -65,31 +72,27 @@ GEM
formatador (0.2.1)
gherkin (2.4.21)
json (>= 1.4.6)
httparty (0.8.1)
multi_json
multi_xml
i18n (0.6.0)
json (1.6.1)
json_pure (1.6.1)
metaclass (0.0.1)
method_source (0.6.5)
ruby_parser (>= 2.0.5)
mime-types (1.16)
mocha (0.10.0)
metaclass (~> 0.0.1)
multi_json (1.0.3)
multi_xml (0.4.1)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-ssh (2.1.4)
nokogiri (1.5.0)
pry (0.9.6)
coderay (>= 0.9.8)
method_source (>= 0.6.5)
ruby_parser (>= 2.0.5)
slop (~> 2.1.0)
rack (1.3.3)
rack-test (0.6.1)
rack (>= 1.0)
rake (0.9.2)
rdiscount (1.6.8)
rdoc (3.9.4)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
Expand All @@ -99,43 +102,36 @@ GEM
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
ruby-hmac (0.4.0)
ruby_parser (2.3.1)
sexp_processor (~> 3.0)
rubyzip (0.9.4)
selenium-webdriver (2.7.0)
childprocess (>= 0.2.1)
ffi (>= 1.0.7)
json_pure
rubyzip
sexp_processor (3.0.7)
shoulda (2.11.3)
slop (2.1.0)
sqlite3 (1.3.4)
term-ansicolor (1.0.6)
tzinfo (0.3.29)
xml-simple (1.1.0)
tzinfo (0.3.31)
uuidtools (2.1.2)
xpath (0.1.4)
nokogiri (~> 1.3)

PLATFORMS
ruby

DEPENDENCIES
activerecord
appraisal
appraisal (~> 0.4.0)
aruba
aws-s3
aws-sdk
bundler
capybara
cocaine (~> 0.2)
cucumber (~> 1.0.0)
fakeweb
fog
jruby-openssl
mime-types
mocha
pry
paperclip!
rake
rdoc
shoulda
sqlite3 (~> 1.3.4)
2 changes: 1 addition & 1 deletion features/step_definitions/rails_steps.rb
Expand Up @@ -10,7 +10,7 @@
gem "sqlite3"
gem "capybara"
gem "gherkin"
gem "aws-s3"
gem "aws-sdk"
"""
And I configure the application to use "paperclip" from this project
And I reset Bundler environment variable
Expand Down
2 changes: 1 addition & 1 deletion features/step_definitions/s3_steps.rb
@@ -1,6 +1,6 @@
When /^I attach the file "([^"]*)" to "([^"]*)" on S3$/ do |file_path, field|
definition = User.attachment_definitions[field.downcase.to_sym]
path = "http://s3.amazonaws.com/paperclip#{definition[:path]}"
path = "https://paperclip.s3.amazonaws.com#{definition[:path]}"
path.gsub!(':filename', File.basename(file_path))
path.gsub!(/:([^\/\.]+)/) do |match|
"([^\/\.]+)"
Expand Down
136 changes: 0 additions & 136 deletions gemfiles/rails2.gemfile.lock

This file was deleted.

0 comments on commit 75f413d

Please sign in to comment.