| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Trying to pass the current request down to the service so that it can
create full urls instead of paths makes the API messy so use a model
based on ActiveSupport::CurrentAttributes to provide the current host
to services that need it (primarily the disk service).
|
|
|
|
|
|
|
|
|
| |
If an explicit AWS key pair and/or region is not provided in
config/storage.yml, attempt to use environment variables, shared
credentials, or IAM role credentials. Order of precedence is
determined by the AWS SDK[1].
[1]: https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/setup-config.html
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The Active Storage service for Azure Storage has an option called `path`
that is ambiguous in meaning. It needs to be set to the primary blob
storage endpoint but that can be determined from the blobs client anyway.
To simplify the configuration this commit removes the `path` option and
gets the endpoint from the blobs client instead.
Closes #32225.
|
|
|
|
| |
Fixes #32129.
|
|
|
|
| |
Fix customizing the download Content-Type for a directly-uploaded blob via a signed URL. See e8286ee.
|
|
|
|
|
| |
Only us-east-1 gives URLs like bucket.s3.amazonaws.com whereas other
regions have URLs like s3-eu-west-1.amazonaws.com/ubxd-rails
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `keyfile` was renamed to `credentials` in `google-cloud-storage` 1.8.0.
https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-storage/CHANGELOG.md#180--2017-11-14
Although `keyfile` can still be used, but it looks like deprecate.
https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/ddf7b2a856d676316525eb581c1a4cc83ca6097b/google-cloud-storage/lib/google/cloud/storage.rb#L589...L590
Therefore, I think that should use `credentials` in newly generated
applications.
Ref: https://github.com/GoogleCloudPlatform/google-cloud-ruby/issues/1802
|
| |
|
|
|
| |
Closes #31073.
|
|
|
|
| |
https://travis-ci.org/rails/rails/jobs/281044755#L5582-L5586
|
| |
|
|
|
|
| |
activestorage/test/service/configurations.example.yml
|
|
|
|
| |
`content_type` parameter is before `disposition` parameter.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| | |
Support content_type in AzureStorageService#url
|
|/
|
|
|
|
|
|
| |
Add in the content_type option, which is defined as part of the generic
ActiveStorage::Service class.
Without this option, attempts to generate a URL for an attached file
fail with "ArgumentError (unknown keyword: content_type)"
|
|
|
|
|
|
|
|
|
|
| |
This fixes following warnings:
```
test/models/variant_test.rb:11: warning: ambiguous first argument; put parentheses or a space even after `/' operator
lib/active_storage/attached/macros.rb:63: warning: instance variable @active_storage_attached_highlights not initialized
lib/active_storage/attached/macros.rb:25: warning: instance variable @active_storage_attached_avatar not initialized
```
|
| |
|
|
|
|
|
|
|
|
|
| |
If an AWS bucket name includes a `.` (e.g. `bucket.name`), then the canonical
URL for an object will start with "https://s3.amazonaws.com/bucket.name/"
and not with "https://bucket.name.s3.amazonaws.com/".
The URL tests have now been separated into two separate asserts, to ensure
that both the "s3.amazonaws.com" and the "bucket.name" components are included,
but not specifically in that order.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running `rubocop activestorage` before this commit resulted in 20 offenses.
This commit only fixes:
- Trailing whitespace detected
- Space inside } missing
- Put one space between the method name and the first argument.
The other offenses are left since they are intentional according to
@georgeclaghorn (https://github.com/rails/rails/pull/30061#issuecomment-319999190)
|
|
|
|
|
|
|
|
|
|
|
|
| |
```
% be rubocop -a --only Style/StringLiterals activestorage
Inspecting 74 files
........................................CCCCCCCCCC.C........CC.......C.C..
(snip)
74 files inspected, 31 offenses detected, 31 offenses corrected
```
|
| |
|
|
|
|
|
|
|
| |
"httparty" is only added in #30020 to write two tests to make PUT requests
against S3 and GCS.
The same requests can be made with net/http, removing a dependency from the Gemfile.
|
| |
|
|
git-subtree-dir: activestorage
git-subtree-mainline: 0d58e7e478e79c2d6b2a39a4444d2a17a903b2a6
git-subtree-split: 3f4a7218a4a4923a0e7ce1b2eb0d2888ce30da58
|