Add endpoint configuration support for Fog#8
Open
christopherstyles wants to merge 4 commits into
Open
Conversation
RSpec treats trailing `err:` as its own keywords, not as the second argument to system, so the expectation didn’t match even though the printed args looked the same.
Added optional `endpoint` configuration, in order for it to be passed to `Fog::Storage` so that S3-compatible providers (e.g. DigitalOcean Spaces, Cloudflare R2) are supported. Similar to other configuration options, rake tasks can read `BKP_ENDPOINT` to override the endpoint configuration, and endpoint configuration will be shown in the config output. Updated `S3Storage` to build storage options (including endpoint only when non-blank) and adjust specs to cover endpoint behavior and the upload argument shape.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fog::Storageis configured with provider: 'AWS', which assumes the actual Amazon S3 API. Services that are S3-compatible but are not AWS (DigitalOcean Spaces, etc.) use their own base URL.Changes
Passing a URL as
endpointconfiguration sends Fog to the right host. Leaving it unset keeps the normal AWS S3 behavior.endpointconfiguration, in order for it to be passed toFog::Storageso that S3-compatible providers (e.g. DigitalOcean Spaces) are supported.BKP_ENDPOINTto override the endpoint configuration, and endpoint configuration will be shown in the config output.S3Storageto build storage options (including endpoint only when non-blank) and adjust specs to cover endpoint behavior and the upload argument shape.