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

Aws sdk v2 #1730

Closed
wants to merge 27 commits into from
Closed

Aws sdk v2 #1730

wants to merge 27 commits into from

Conversation

danielwanja
Copy link

  • Added s3 storage implementation using the aws-sdk v2.

@@ -114,6 +114,7 @@ module S3
def self.extended base
begin
require 'aws-sdk'
require 'aws-sdk-v1'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

* Fixed hound notification - removing unused exception variable.
# {'Expires' => 1.year.from_now.httpdate}. If you use a Proc, headers are determined at
# runtime. Paperclip will call that Proc with attachment as the only argument.
# Can be defined both globally and within a style-specific hash.
# * +bucket+: This is the name of the S3 bucket that will store your files. Remember

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [88/80]

* Using Ruby 1.9 hash syntax
* Using double-quoted strings
* Space after missing comma
* Wrapped lines over 80 characters, unless code was less readable
s3_interface.bucket(bucket_name).create
end

def flush_writes #:nodoc:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assignment Branch Condition size for flush_writes is too high. [31.89/15]

@danielwanja
Copy link
Author

Do you guys really want me to fix all the houdci notifications. Even the line too long ones? Make code less readable in my view? What else would you like to see fixed for this to be accepted?

@booleanbetrayal
Copy link

some of those houndci warnings are super aggressive. would be nice to see this changeset get in!

@maclover7
Copy link
Contributor

@tute @jyurek This should probably come in 5.0, right?

@tute
Copy link
Contributor

tute commented May 13, 2015

@danielwanja thank you for your work!
@jyurek what do you think about this changeset?

@danielwanja
Copy link
Author

@tute, my pleasure. Let me know what you thing of this changeset and what would be needed to have this merged.

@natesire
Copy link

natesire commented Jun 1, 2015

I would like to help with this. I already mocked up a solution for the AWS S3 gem at marcel/aws-s3#108

@jyurek
Copy link

jyurek commented Jun 1, 2015

@nathantechie9 There is no change that needs to happen with the aws-s3 gem. Paperclip has been using the aws-sdk gem for some time now, which is a different gem, but aside from that, the library should not need to change to accommodate us.

@jyurek
Copy link

jyurek commented Jun 1, 2015

@danielwanja I would really appreciate it if you could look at the places Hound says are too complicated and refactor them a bit. Thanks! :)

@natesire
Copy link

natesire commented Jun 1, 2015

What's the issue with the regions? I'd like to help.

@tute
Copy link
Contributor

tute commented Jun 18, 2015

Is the functionality in this PR comparable to that of #1903?

@danielwanja
Copy link
Author

Same idea, to use the new aws-sdk v2, different approach. PR #1903
#1903 intermingles V1 and V2
code in the same adapter using checking aws_v1? and calling the
appropriate underlying aws-sdk method. I preferred creating a new adapter
that doesn't mingle both. Being originally from Switzerland I can see
advantages in both approaches. The main goal for me was to be able to use
some of the new features the aws-sdk v2 prodives, notably using the new
kms related headers ("x-amz-server-side-encryption" => "aws:kms",
"x-amz-ssekms-key-id"
=> "alias/mycustom_encryption_key").

On Wed, Jun 17, 2015 at 10:45 PM, Tute Costa notifications@github.com
wrote:

Is the functionality in this PR comparable to that of #1903
#1903?


Reply to this email directly or view it on GitHub
#1730 (comment)
.

@tute
Copy link
Contributor

tute commented Aug 24, 2015

AWS 2 support has been merged: #1903 (comment). Thanks for your work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants