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

Support s3 host alias with prefixes #2287

Closed
wants to merge 1 commit into from
Closed

Support s3 host alias with prefixes #2287

wants to merge 1 commit into from

Conversation

cjcaj
Copy link
Contributor

@cjcaj cjcaj commented Aug 24, 2016

This allows s3_host_alias to be set to CDNs which support S3 Bucket prefix

context "generating a url with a prefixed host alias" do
before do
rebuild_model(
aws2_add_region.merge storage: :s3,

Choose a reason for hiding this comment

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

Add parentheses to nested method call aws2_add_region.merge storage: :s3, s3_credentials: { production: { bucket: "prod_bucket" }, development: { bucket: "dev_bucket" }, }, bucket: "bucket", s3_host_alias: "something.something.com", s3_prefixes_in_alias: 2, path: "prefix1/prefix2/:attachment/:basename:dotextension", url: ":s3_alias_url".

@tute
Copy link
Contributor

tute commented Aug 28, 2016

Thanks! Can you please rebase against latest master, and address Hound comments? Thanks!

protocol = attachment.s3_protocol(style, true)
host = attachment.s3_host_alias
path = attachment.path(style).
split("/")[attachment.s3_prefixes_in_alias..-1].

Choose a reason for hiding this comment

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

Use 2 (not 7) spaces for indenting an expression in an assignment spanning multiple lines.

@tute tute closed this in 8f1dc1e Aug 30, 2016
@tute
Copy link
Contributor

tute commented Aug 30, 2016

Merged into master. Thank you!

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.

3 participants