aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Update ASt test services configGeorge Claghorn2018-03-121-0/+0
| | |
* | | Remove path config option from Azure serviceAndrew White2018-03-122-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Provide an alternative PDF previewer based on PopplerTerence Lee2018-03-067-35/+103
| | | | | | | | | | | | | | | | | | mutool is licensed under the Affero GPL, which has strict distribution requirements. Poppler is licensed under the more liberal GPL, making it a good alternative for those who can't use mutool.
* | | Update test to reflect GCS direct upload header changeGeorge Claghorn2018-03-061-1/+1
| | |
* | | Allow selectively purging attached blobsNicholas Shirley2018-03-063-12/+46
| | |
* | | Remove blank Content-Type from GCS direct upload headersGeorge Claghorn2018-03-061-1/+1
| | | | | | | | | | | | Since we started clearing the client-side blob's type in e0867b3, we no longer need to set a blank Content-Type header before issuing the direct upload request. Fixes that Safari 9 would combine the blank Content-Type header with the blank blob type to produce a Content-Type header containing a single comma, invalidating the request.
* | | Fix purging dependent blobs when attachments aren't loadedGeorge Claghorn2018-03-054-25/+35
| | |
* | | Delete dependent attachments with recordGeorge Claghorn2018-03-053-2/+17
| | | | | | | | | | | | [Matt Jones & George Claghorn]
* | | Correct the ActiveStorage::Service#download_chunk docs [ci skip]George Claghorn2018-03-051-1/+1
| | |
* | | Generate root-relative paths in Active Storage disk service URL methodsGeorge Claghorn2018-03-0514-55/+66
| | | | | | | | | | | | Fixes #32129.
* | | Handle another case where a blob might be erroneously purgedGeorge Claghorn2018-03-042-5/+22
| | |
* | | Avoid purging attached blob when replacing it with itselfGeorge Claghorn2018-03-042-2/+18
| | |
* | | Merge Previews/Variants controller into one Representations controller.Kasper Timm Hansen2018-03-037-100/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since ActiveStorage::Blob::Representable unifies the idea of previews and variants under one roof as representation, we may as well have the controllers follow suit. Thus ActiveStorage::RepresenationsController enters the fray. I've copied the old tests for both previews and variants and unified those as well.
* | | Deprecate `active_support/core_ext/hash/compact`yuuji.yaginuma2018-03-021-2/+0
| |/ |/| | | | | | | Ruby 2.4+ provides `Hash#compact` and `Hash#compact!` natively, so `active_support/core_ext/hash/compact` is no longer necessary.
* | Rebuild activestorage.jsGeorge Claghorn2018-02-281-1/+1
| |
* | Handle file checksumming errorsGeorge Claghorn2018-02-281-0/+6
| |
* | Clear Blob's type before sending itGeorge Claghorn2018-02-262-2/+2
| | | | | | | | Prevent older versions of Chrome from appending a Content-Type header containing the Blob type, rendering the request invalid if we intend not to provide a Content-Type. This behavior was observed in Chrome 58.
* | Update test to reflect direct upload header changesGeorge Claghorn2018-02-261-1/+1
| |
* | Avoid specifying content types for direct uploads to Google Cloud StorageGeorge Claghorn2018-02-262-6/+5
| | | | | | | | Fix customizing the download Content-Type for a directly-uploaded blob via a signed URL. See e8286ee.
* | Remove changelogs for Rails 6.0 since they were backported to `5-2-stable`bogdanvlviv2018-02-261-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove railties' changelog added by 7340596de45dc4c0f62a287b6acc4e71d8ee6c60 since it was backported to `5-2-stable` via ac99916fcf7bf27bb1519d4f7387c6b4c5f0463d Remove activesupport's changelog added by 1077ae96b34b5a1dfbf10ee0c40b1ceb1eb6b30b since it was backported to `5-2-stable` via a2b97e4ffef971607a1be8fc7909f099b6840f36 Remove activesupport's changelog added by 0d41a76d0c693000005d79456dee7f9299f5e8d4 since it was backported to `5-2-stable` via cdce6a709e1cbc98fff009effc3b1b3ce4c7e8db Remove activestorage's changelog added by d57c52a385eb57c6ce8c6d124ab5e186f931d142 since it was backported to `5-2-stable` via 5292cdf59a2052c453d6016c69b90b790cbf2547 Follow up c113bdc9d0c2cffd535ca97aff85c4bdc46b11f6
* | Use lazy load hook to configure ActiveStorage::BlobEugene Kenny2018-02-252-1/+3
| | | | | | | | | | | | | | | | | | `to_prepare` callbacks are run during initialization; using one here meant that `ActiveStorage::Blob` would be loaded when the app boots, which would in turn load `ActiveRecord::Base`. By using a lazy load hook to configure `ActiveStorage::Blob` instead, we can avoid loading `ActiveRecord::Base` unnecessarily.
* | Support varying ICO filesGeorge Claghorn2018-02-244-2/+21
| | | | | | | | Closes #32096.
* | Allow S3 tests against buckets in other regionsAndrew White2018-02-212-2/+2
| | | | | | | | | | 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
* | Hoist update for clarityGeorge Claghorn2018-02-202-8/+8
| |
* | Undocument ActiveStorage::IdentificationGeorge Claghorn2018-02-201-1/+1
| |
* | Correct Range header syntaxGeorge Claghorn2018-02-201-1/+1
| |
* | Rails 6 requires Ruby 2.4.1+Jeremy Daer2018-02-172-1/+8
| | | | | | | | | | | | Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug. References #32028
* | Clean up and consolidate .gitignoresbogdanvlviv2018-02-171-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Global ignores at toplevel .gitignore * Component-specific ignores in each toplevel directory * Remove `actionview/test/tmp/.keep` for JRuby ``` rm actionview/test/tmp/ -fr cd actionview/ bundle exec jruby -Itest test/template/digestor_test.rb ``` Related to #11743, #30392. Closes #29978.
* | Remove support to Ruby 2.2Rafael Mendonça França2018-02-161-1/+1
| | | | | | | | Rails 6 will only support Ruby >= 2.3.
* | Use require_dependency inside Active StorageEugene Kenny2018-02-142-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Active Storage is an engine which means its models, jobs and controllers are autoloaded by Rails rather than Ruby. Unfortunately this means it's subject to the same gotchas as applications, including this one: http://guides.rubyonrails.org/v5.1.4/autoloading_and_reloading_constants.html#when-constants-aren-t-missed-qualified-references On Ruby < 2.5, constants nested under classes can't be autoloaded by Rails if a top level constant already exists with the same name. To avoid clashing with constants defined in users' applications or gems, we can use `require_dependency` to ensure that the nested constants are loaded before they're used.
* | Document MuPDF version requirementGeorge Claghorn2018-02-131-1/+1
| |
* | Add ActiveStorage::Blob.unattached scopefatkodima2018-02-122-0/+19
| |
* | Use full class names when including concerns to avoid collisionsWojtek Wrona2018-02-121-1/+3
| |
* | Add missing requireGeorge Claghorn2018-02-111-0/+2
|/
* Merge pull request #31927 from mrreynolds/patch-2Eileen M. Uchitelle2018-02-091-0/+8
|\ | | | | Document :combine_options
| * Document :combine_optionsRobert Glaser2018-02-081-0/+8
| | | | | | | | Turns out this is still undocumented functionality.
* | Fix `blob.service_url` for supports string or nil `:filename` option.Jason Lee2018-02-083-1/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | - Make sure `blob.service_url` present a `ActiveStorage::Filename` type to `serivce.url`. - Add `ActiveStorage::Filename.wrap` method. before: ```rb blob.service_url(filename: ActiveStorage::Filename.new("new.txt")) blob.service_url(filename: "new.txt") => NoMethodError: undefined method `parameters' for "new.txt":String params = {} blob.service_url(filename: params[:filename]) => NoMethodError: undefined method `parameters' for nil:NilClass ``` after: ```rb blob.service_url(filename: "new.txt") blob.service_url(filename: nil) ```
* Include source code in published activestorage npm packageRichard Macklin2018-02-063-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows activestorage users to ship smaller javascript bundles to visitors using modern browsers, as demonstrated in this repository: https://github.com/rmacklin/activestorage-es2015-build-example In that example, the bundle shrinks by 5K (24%). In addition to allowing smaller bundles for those who ship untranspiled code to modern browsers, including the source code in the published package can be useful in other ways: 1. Users can import individual modules rather than the whole library 2. As a result of (1), users can also monkey patch parts of activestorage by importing the relevant module, modifying the exported object, and then importing the rest of activestorage (which would then use the patched object). Note: In order to allow the source code to be depended on rather than the compiled code, we have to declare the external dependency on spark-md5 as a regular dependency, not a development dependency. This means that even users who depend on the compiled code will have to download this package. However, spark-md5 is a small package, so this tradeoff seems worth it.
* Merge pull request #31854 from huacnlee/allow-more-options-for-service-urlGeorge Claghorn2018-02-012-2/+23
|\ | | | | Allow ActiveStorage::Blob#service_url to pass addition options to service.url
| * Allow `ActiveStorage::Blob#service_url` to pass addition options to ↵Jason Lee2018-02-012-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `service.url`. Because there have some service needs more parameters for file URL: https://www.alibabacloud.com/help/doc-detail/44687.htm ```rb class AliyunService < Service def url(key, options = {}) image_process = options[:oss_process] || "image/resize,w_800" "http://image-demo.oss-cn-hangzhou.aliyuncs.com/example.jpg?x-oss-process=#{image_process}" end end ``` Use case: ```erb <%= image_tag @user.avatar.service_url(oss_process: "image/resize,m_fill,h_100,w_100" %> ```
* | Use the full class name for the JSON coder, as there may be anotherRenaud Chaput2018-02-011-1/+1
|/ | | | | | `JSON` constant defined. For example when using the `representable` gem: https://github.com/trailblazer/representable/issues/224
* Correct orientation detectionGeorge Claghorn2018-01-312-3/+3
|
* Swap encoded image width and height if angle is 90 or 270 degreesGeorge Claghorn2018-01-313-3/+26
|
* Start Rails 6.0 development!!!Rafael Mendonça França2018-01-303-37/+5
| | | | :tada::tada::tada:
* Add a test for ActiveStorage::Blob#image? and ActiveStorage::Blob#video?Shuhei Kitagawa2018-01-291-0/+12
|
* Eliminate ActiveStorage::Service::MirrorServiceTest#uploadShuhei Kitagawa2018-01-271-16/+16
|
* Unlink internal tempfiles after useGeorge Claghorn2018-01-262-2/+22
|
* Use assert_predicate and assert_not_predicateDaniel Colson2018-01-256-24/+24
|
* Add missing requireGeorge Claghorn2018-01-221-3/+5
|
* Cope with videos with undefined display aspect ratiosGeorge Claghorn2018-01-203-2/+15
|