aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid connecting to GCS during app bootGeorge Claghorn2017-11-231-7/+2
|
* Provide attachment writersGeorge Claghorn2017-11-201-0/+32
| | | | | | | | | | | | | Permit creating a record and attaching files in a single step. # Before: User.create!(user_params.except(:avatar)).tap do |user| user.avatar.attach(user_params[:avatar]) end # After: User.create!(user_params) [Yoshiyuki Hirano & George Claghorn]
* Load 5.2 defaults in ASt dummy appGeorge Claghorn2017-11-201-1/+1
|
* Fix direct uploads to local serviceGeorge Claghorn2017-11-202-0/+4
| | | | | | | | Disable CSRF protection for ActiveStorage::DiskController#update. The local disk service is intended to imitate a third-party service like S3 or GCS, so we don't care where direct uploads originate: they’re authorized by signed tokens. Closes #30290. [Shinichi Maeshima & George Claghorn]
* Permit attaching files to new recordsGeorge Claghorn2017-11-191-0/+44
| | | | Closes #31164.
* Fix ASt CI failure with rack-test 0.7.1Ryuta Kamizono2017-11-201-1/+1
| | | | Due to https://github.com/rack-test/rack-test/commit/5fd3631078e7c73aaed7d4371f70fb2a79384be9.
* Introduce ActiveStorage::Attached::{One,Many}#detachGeorge Claghorn2017-11-141-0/+26
|
* Preserve existing metadata when analyzing a blobGeorge Claghorn2017-11-132-2/+27
| | | | Closes #31138.
* Fix streaming downloads from S3/Azure StorageGeorge Claghorn2017-11-061-0/+10
| | | Closes #31073.
* Extract metadata from images and videosGeorge Claghorn2017-10-228-5/+117
|
* Use `require_relative` instead of `require` with full path in activestorage/bogdanvlviv2017-10-131-1/+1
| | | | Related to #29417
* Define path with __dir__ in activestorage/bogdanvlviv2017-10-133-4/+4
| | | | Related to #29176
* Introduce ActiveStorage::Blob#representationGeorge Claghorn2017-10-122-0/+43
|
* Replace variation key use with SHA256 of key to prevent long filenameskhall2017-10-051-0/+5
| | | | | | | If a variant has a large set of options associated with it, the generated filename will be too long, causing Errno::ENAMETOOLONG to be raised. This change replaces those potentially long filenames with a much more compact SHA256 hash. Fixes #30662.
* Fix `test "signed URL generation"` failureRyuta Kamizono2017-09-301-1/+1
| | | | https://travis-ci.org/rails/rails/jobs/281044755#L5582-L5586
* Preview PDFs and videosGeorge Claghorn2017-09-2816-17/+128
|
* Add `with_attached_*` scope to `has_one_attached` macroYoshiyuki Hirano2017-09-191-0/+13
| | | | | * For avoiding N+1 problem, added `with_attached_*` scope to `has_one_attached` macro.
* Rename activestorage/test/service/configurations.yml to ↵George Claghorn2017-09-111-0/+0
| | | | activestorage/test/service/configurations.example.yml
* Fix replacing a singular attachmentGeorge Claghorn2017-08-291-0/+25
|
* Fix order of Active Storage DiskService URL parametersKoichi ITO2017-08-261-1/+1
| | | | `content_type` parameter is before `disposition` parameter.
* Merge pull request #30213 from ckundo/ccundiff-alt-text-defaultRafael Mendonça França2017-08-231-3/+3
|\ | | | | | | Do not generate default alt text for images
| * Do not generate default alt text in image tagsCameron Cundiff2017-08-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Auto-generating content from the filename of an image is not suitable alternative text; alt text that isn't fully considered can be distracting and fatiguing for screen readers users (blind, low vision, dyslexic people). - Setting a filename fallback short circuits screen reader default behavior and configuration for blank descriptions. - Setting poor defaults also creates false negatives for accessibility linting and testing software, that makes it harder to improve application accessibility. *** - After this change, if authors leave images without alt text, screen readers will fallback to default behavior for missing alt text. - Also with this change, Automated linting and testing tools will correctly generate warnings. [Fixes #30096]
* | Use 5.2 version of ActiveRecord::Migration for Active Storagebogdanvlviv2017-08-221-1/+1
| |
* | Encode Content-Disposition filenames according to RFC 2231George Claghorn2017-08-213-3/+35
| | | | | | | | Closes #30134.
* | Update regexGeorge Claghorn2017-08-201-1/+1
| |
* | Fix testsGeorge Claghorn2017-08-204-4/+4
| |
* | DRYGeorge Claghorn2017-08-202-3/+3
| |
* | Rename ActiveStorage::Filename#extname to extension_with_delimiterGeorge Claghorn2017-08-201-0/+18
| |
* | Merge pull request #30292 from maclover7/jm-ast-purgeGeorge Claghorn2017-08-171-0/+7
|\ \ | | | | | | Add missing test for Blob#purge
| * | Add missing test for Blob#purgeJon Moss2017-08-171-0/+7
| |/
* / Use nil Logger for testsJon Moss2017-08-171-1/+1
|/ | | | | | | | | | | | | | | | Makes tests much more quietly, as opposed to the enormous amount of logging that appears right now. This setting is used in AJ, as well as other frameworks. Output from test run: ``` ......................................................... Finished in 3.003355s, 18.9788 runs/s, 45.2827 assertions/s. 57 runs, 136 assertions, 0 failures, 0 errors, 0 skips ```
* Move test to its proper placeGeorge Claghorn2017-08-141-0/+0
| | | | ActiveStorage::Filename is a model, so its test case belongs in test/models.
* Run Active Storage service tests in CIGeorge Claghorn2017-08-141-0/+0
|
* Should escape regexp wildcard character `.`Koichi ITO2017-08-143-4/+4
|
* Use frozen string literal in Active StorageKoichi ITO2017-08-1245-3/+89
|
* Merge pull request #30198 from betesh/activestorage-rack-test-uploaded-fileRafael França2017-08-111-1/+7
|\ | | | | Activestorage rack test uploaded file
| * Make activestorage treat Rack::Test::UploadedFile just like ↵Isaac Betesh2017-08-111-1/+7
| | | | | | | | ActionDispatch::Http::UploadedFile
* | Merge pull request #30113 from dixpac/remove_unecessary_require_in_test_helperRafael França2017-08-111-2/+0
|\ \ | | | | | | ActiveStorage: Remove unnecessary require in test_helper
| * | Remove unecessary require in test_helperdixpac2017-08-091-2/+0
| | |
* | | Enable browser caching for blobs and variants (#30196)Anton Khamets2017-08-111-0/+15
| |/ |/|
* | Run Active Storage tests in CI (#30144)George Claghorn2017-08-104-20/+18
|/
* Merge pull request #30112 from dixpac/filter_minitest_backtraceRafael França2017-08-081-0/+4
|\ | | | | ActiveStorage:Filter out Minitest backtrace.
| * Filter out Minitest backtrace.dixpac2017-08-071-0/+4
| | | | | | | | | | Filter out Minitest backtrace while allowing backtrace from other libraries to be shown.
* | Merge pull request #30135 from ffmike/azure-storage-fix-content-typeRafael Mendonça França2017-08-081-1/+8
|\ \ | | | | | | | | | Support content_type in AzureStorageService#url
| * | Support content_type in AzureStorageService#urlMike Gunderloy2017-08-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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)"
* | | ActiveStorage:Add migrations per rails engine conventions (#30111)Dino Maric2017-08-081-2/+1
|/ / | | | | | | | | | | * Add migrations per rails engine conventions * Fix failing tests
* / Extend image_tag to accept ActiveStorage Attachments and Variants (#30084)Anton Khamets2017-08-071-0/+40
|/ | | | | | | | | | | | | | | | | | * Extend image_tag to accept ActiveStorage's Attachments and Variants * Flip resolve_image_source around * Add tests for the new use-cases of image_tag * Remove the higher-level test * Update image_tag documentation * Add error states into the test suite * Re-raise polymorhic_url's NoMethodError as ArgumentError * delegate_missing_to will raise DelegationError instead of NoMethodError
* Fix ruby warningsyuuji.yaginuma2017-08-055-9/+9
| | | | | | | | | | 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 ```
* Rename Azure to AzureStorage (#30057)Dino Maric2017-08-043-5/+5
|
* Fix tests for AWS buckets that include a . (#30059)Claudio B2017-08-042-3/+7
| | | | | | | | | 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.