Skip to content

Add endpoint configuration support for Fog#8

Open
christopherstyles wants to merge 4 commits into
arturcp:mainfrom
christopherstyles:add-endpoint-configuration
Open

Add endpoint configuration support for Fog#8
christopherstyles wants to merge 4 commits into
arturcp:mainfrom
christopherstyles:add-endpoint-configuration

Conversation

@christopherstyles

@christopherstyles christopherstyles commented Apr 23, 2026

Copy link
Copy Markdown

Summary

Fog::Storage is 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 endpoint configuration sends Fog to the right host. Leaving it unset keeps the normal AWS S3 behavior.

  • Added optional endpoint configuration, in order for it to be passed to Fog::Storage so that S3-compatible providers (e.g. DigitalOcean Spaces) 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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant