aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
Commit message (Collapse)AuthorAgeFilesLines
* use "minitest" consistentlyXavier Noria2018-09-111-2/+1
| | | | | | | | | The name of the minitest library is spelled that way: regular font, and lowercase. Lowercase is used even at the beginning of sentences, see http://docs.seattlerb.org/minitest/ I double-checked this with @zenspider too (thanks!).
* Fix zero-byte files uploadMarcelo Perini Veloso2018-09-063-1/+12
|
* Handle only specifically relevant Azure HTTPErrorsCameron Bothner2018-08-232-5/+14
| | | | | | | | | The Azure gem uses `Azure::Core::Http::HTTPError` for everything: checksum mismatch, missing object, network unavailable, and many more. (https://www.rubydoc.info/github/yaxia/azure-storage-ruby/Azure/Core/Http/HTTPError). Rescuing that class obscures all sorts of configuration errors. We should check the type of error in those rescue blocks, and reraise when needed.
* Revert "Merge pull request #33667 from ↵George Claghorn2018-08-232-20/+7
| | | | | | | cbothner/azure-service-swallowing-all-errors" This reverts commit b204d167c5cfebd59f771d406178e371811ac43a, reversing changes made to de6a200f82a3de399fa685d583503bc88dbc5e9f.
* Handle only specifically relevant Azure HTTPErrorsCameron Bothner2018-08-232-7/+20
| | | | | | | | | The Azure gem uses `Azure::Core::Http::HTTPError` for everything: checksum mismatch, missing object, network unavailable, and many more. (https://www.rubydoc.info/github/yaxia/azure-storage-ruby/Azure/Core/Http/HTTPError). Rescuing that class obscures all sorts of configuration errors. We should check the type of error in those rescue blocks, and reraise when needed.
* Merge pull request #33666 from ↵George Claghorn2018-08-229-18/+118
|\ | | | | | | | | cbothner/fail-gracefully-from-activestorage-file-not-found Fail more gracefully from ActiveStorage missing file exceptions
| * Respond with 404 in ActiveStorage::DiskController#show when file missingCameron Bothner2018-08-213-0/+16
| | | | | | | | | | | | `ActiveStorage::DiskController#show` generates a 404 Not Found response when the requested file is missing from the disk service. It previously raised `Errno::ENOENT`.
| * Translate service-specific missing object exceptions into a generic oneCameron Bothner2018-08-217-18/+102
| | | | | | | | | | | | | | | | | | `ActiveStorage::Blob#download` and `ActiveStorage::Blob#open` raise `ActiveStorage::FileNotFoundError` when the corresponding file is missing from the storage service. Services translate service-specific missing object exceptions (e.g. `Google::Cloud::NotFoundError` for the GCS service and `Errno::ENOENT` for the disk service) into `ActiveStorage::FileNotFoundError`.
* | activestorage: yarn buildbogdanvlviv2018-08-191-4/+4
| | | | | | | | Context https://github.com/rails/rails/pull/33413#issuecomment-414137587
* | Retry ActiveStorage::AnalyzeJobs on download integrity check failuresGeorge Claghorn2018-08-191-0/+2
| |
* | Remove superfluous testGeorge Claghorn2018-08-191-10/+0
| | | | | | | | This test no longer covers the behavior of ActiveStorage::PurgeJob. Attached blobs are ignored by ActiveStorage::Blob#purge as of 934fccd, which includes an equivalent model test.
* | Enable multiple submit buttons for Active Storage formsChris Seelus2018-08-182-2/+22
|/
* Extract ActiveStorage::SetCurrentGeorge Claghorn2018-08-163-5/+23
| | | | Provide a handy concern for custom Active Storage controllers that can't inherit from ActiveStorage::BaseController.
* Document all Active Storage error classes [ci skip]George Claghorn2018-08-101-0/+8
|
* Add a generic base class for Active Storage exceptionsGeorge Claghorn2018-08-102-4/+14
| | | | | | Closes #33292. [Andrei Makarov & George Claghorn]
* Extract transformersGeorge Claghorn2018-08-106-70/+146
|
* DRY up web image checks in ActiveStorage::VariantGeorge Claghorn2018-08-091-18/+24
|
* Camelize instead of classifyingGeorge Claghorn2018-08-061-1/+1
| | | | | | | Avoid mangling service names that end in S: "GCS".classify # => "GC" "GCS".camelize # => "GCS"
* Improve ActiveStorage service adapter error handlingJoel Taylor2018-08-062-1/+9
|
* Fix uploading Tempfiles to Azure StorageGeorge Claghorn2018-08-032-1/+18
| | | | Closes #32530.
* Remove another unused requireGeorge Claghorn2018-08-021-2/+0
|
* Remove unused requireGeorge Claghorn2018-08-011-2/+0
|
* Retry ActiveStorage::PurgeJobs on DB deadlockGeorge Claghorn2018-07-311-0/+1
|
* Guard against missing blobs caused by concurrent purgesGeorge Claghorn2018-07-301-3/+3
|
* Ignore concurrently-deleted files when deleting by prefix from GCSGeorge Claghorn2018-07-301-1/+7
|
* Update ActiveStorage::Previewer docsGeorge Claghorn2018-07-291-2/+2
| | | | PDFPreviewer became MuPDFPreviewer in 0b717c2. Previewers are simple enough that we can just provide a single example.
* Clarify conditionGeorge Claghorn2018-07-271-1/+1
| | | | && binds tighter than || in JavaScript, but we ought not expect readers to remember language trivia.
* Fix directly uploading zero-byte filesGeorge Claghorn2018-07-272-2/+2
| | | | Closes #33450.
* Log streaming downloadsGeorge Claghorn2018-07-261-0/+2
|
* Ignore ActiveRecord::InvalidForeignKey in ActiveStorage::Blob#purgeJasper Martin2018-07-265-3/+95
| | | Do nothing instead of raising an error when it’s called on an attached blob.
* Merge pull request #33229 from ↵Matthew Draper2018-07-251-1/+1
|\ | | | | | | | | albertoalmagro/albertoalmagro/prefer-rails-command-over-bin-rails Prefer rails command over bin/rails
| * Recommend use of rails over bin/railsAlberto Almagro2018-07-061-1/+1
| | | | | | | | | | | | | | | | | | As discussed in #33203 rails command already looks for, and runs, bin/rails if it is present. We were mixing recommendations within guides and USAGE guidelines, in some files we recommended using rails, in others bin/rails and in some cases we even had both options mixed together.
* | Remove unused attributeGeorge Claghorn2018-07-212-5/+5
| |
* | Discard ActiveStorage::PurgeJobs on ActiveRecord::InvalidForeignKeyGeorge Claghorn2018-07-202-1/+11
| |
* | Test that ActiveStorage::Blob#purge fails when attachments existGeorge Claghorn2018-07-201-0/+8
| |
* | Add a foreign-key constraint to the attachments table for blobsGeorge Claghorn2018-07-193-2/+3
| |
* | Delete attachment before purging blobGeorge Claghorn2018-07-191-2/+2
| |
* | Destroy blob record before deleting stored dataGeorge Claghorn2018-07-191-1/+1
| |
* | Link between ActiveStorage::Blob#purge, #purge_later, and #delete [ci skip]George Claghorn2018-07-181-5/+5
| |
* | Clarify the ActiveStorage::Attachment#purge and #purge_later docsGeorge Claghorn2018-07-181-2/+2
| | | | | | | | Link to the corresponding ActiveStorage::Blob methods, whose docs more accurately describe their effects. [ci skip]
* | Remove unnecessary tapGeorge Claghorn2018-07-171-10/+8
| |
* | Fix replacing many attachments via assign and attachGeorge Claghorn2018-07-172-0/+40
| |
* | Correct test nameGeorge Claghorn2018-07-161-1/+1
| |
* | Fix that successive ActiveStorage::Attached::Many#attach calls would ↵George Claghorn2018-07-162-27/+22
| | | | | | | | overwrite previous attachments
* | Test removing attachments via #attachGeorge Claghorn2018-07-162-12/+59
| |
* | Restore inadvertently-removed fallbackGeorge Claghorn2018-07-152-1/+8
| |
* | Support HTTP Range downloads from diskGeorge Claghorn2018-07-153-20/+30
| | | | | | | | Closes #32193.
* | Clear attachment changes on reloadGeorge Claghorn2018-07-133-0/+20
| |
* | Implement ActiveStorage::Attached::{One,Many}#attach in terms of changesGeorge Claghorn2018-07-137-67/+183
| |
* | Fix that detaching could purgeGeorge Claghorn2018-07-134-2/+34
| |