Commit Graph

827 Commits

Author SHA1 Message Date
Rafael Mendonça França 8b6342e341
Use `if_not_exists` instead of `table_exists?` 2021-12-08 23:25:02 +00:00
Rafael Mendonça França 6172f541d8
Merge pull request #43776 from lifeiscontent/patch-1
Update 20191206030411_create_active_storage_variant_records.rb
2021-12-08 18:24:08 -05:00
Jonathan Hefner 4917ee9df6 Use dynamic Rails version in framework dummy apps
This matches what we currently generate for plugin dummy apps.
2021-12-08 11:31:49 -06:00
Rafael Mendonça França 83d85b2207
Start Rails 7.1 development 2021-12-07 15:52:30 +00:00
Rafael Mendonça França b37c02e027
✂️ 2021-12-06 22:39:44 +00:00
Rafael Mendonça França 47fc79ca2b
Merge pull request #43637 from alxjrvs/blob-representation-disposition
Fix Rails 7 Regression - ActiveStorage Content Disposition
2021-12-06 17:39:14 -05:00
Rafael Mendonça França aa55566bcf
Merge pull request #42599 from santib/use-rails-guides-instead-of-edge-guides
Use rails guides instead of edge guides [ci skip]
2021-12-06 17:36:52 -05:00
Aaron Reisman 6ed63abecd
Update 20191206030411_create_active_storage_variant_records.rb
In the cast of bootstrapping a project for the first time without active storage, when running `rails app:update` this migration would result in trying to create the table twice.
2021-12-03 19:55:01 -08:00
Kasper Timm Hansen 1df9b01fe6 Pass an array through our stack, don't bother converting back & forth
Users aren't likely to pass non-array values here anyway.
2021-12-04 02:25:42 +01:00
Kasper Timm Hansen f34fcac88f [ci skip] compose no longer returns the checksum, remove comment 2021-12-04 02:19:19 +01:00
Kasper Timm Hansen 1c309b6bbd compose is primarily meant to take blobs so make them a positional argument 2021-12-04 02:14:48 +01:00
Kasper Timm Hansen 14f190f337 Flip blob question to allow us to exit early 2021-12-04 01:20:05 +01:00
David Heinemeier Hansson 6c828836c1 Distribute both ESM and CJS version
And make sure module refers to the ESM version.
2021-12-03 11:12:07 +01:00
Jean Boussier b30148a2e8 Typo in Active Storage: custom_metadatata -> custom_metadata
Introduced in https://github.com/rails/rails/pull/43294
2021-11-30 11:31:52 +01:00
Gannon McGibbon 79a5e0b759 Add ActiveStorage::Blob.compose 2021-11-25 19:37:57 -05:00
Gannon McGibbon ff6484b355 Fix AzureStorageService#headers_for_direct_upload default for #43294 2021-11-25 14:17:17 -05:00
Gannon McGibbon 896e7477f8 Fix metadata assertions in direct upload tests 2021-11-23 19:00:05 -05:00
Gannon McGibbon 05ec88cdb2
Merge pull request #43294 from joshuamsager/joshuamsager/as-custom-metadata
[ActiveStorage] Custom Metadata
2021-11-23 17:49:59 -05:00
Joshua Sager e106a4a1d2 Introduce custom metadata 2021-11-23 17:35:33 -05:00
Rafael Mendonça França b95077afac
Merge pull request #43045 from sandip-mane/array-syntax-consistancy
Makes the array syntax consistent with other use cases
2021-11-19 15:56:42 -07:00
Rafael Mendonça França 1fde031e89 Fix gemspec 2021-11-15 21:06:21 +00:00
Rafael Mendonça França 9195b7fd0a
Require MFA to release rails 2021-11-15 20:37:42 +00:00
Gannon McGibbon c22734b66b Stub cortrect direct upload service names 2021-11-15 14:15:41 -05:00
DmitryTsepelev 193289dbbe Support direct uploads to multiple services 2021-11-14 11:49:06 +03:00
alxjrvs@gmail.com acda391b3f Update ActiveStorage Blobs Proxycontroller 2021-11-12 13:08:13 -05:00
alxjrvs@gmail.com 8be05519cd Update ActiveStorage Representation Proxycontroller 2021-11-12 13:08:04 -05:00
Alex Ghiculescu 550d728bd1 Active Storage: incorrect defaults
https://github.com/rails/rails/pull/42225 identified that some of the content types used as defaults by Active Storage aren't recognized by `mini_mime`. This means that in practice code like [this](https://github.com/rails/rails/pull/42225/files#diff-7a3ec24c556b138abdbd67066ab5125b73528e45891d83142e417d3944194128R116) will crash or not function correctly. In [this](https://github.com/rails/rails/pull/42225/files#diff-c2010824d2d2e8d841ff4fc058c264c12d870e893025b153e6de571fba6b6c6cR194) example, a file with content_type `image/jpg` is treated as a PNG by the representer, since `image/jpg` isn't a valid content type according to `mini_mime`.

I don't think the default content_types should include formats that have never actually worked, so I'm proposing we remove them from the defaults.
2021-09-22 16:38:52 -05:00
Rafael Mendonça França 50d60e4f7c
Allow Marcel to be released following semver 2021-09-20 17:19:57 -04:00
Justin Coyne 31780364b7
Add explicit rendering to DiskController#update
This avoids unhelpful messages in the logs:
```
No template found for ActiveStorage::DiskController#update, rendering head :no_content
```
2021-09-17 13:32:28 -05:00
Alex Ghiculescu 5acc32ac54
Generate less initializers in new/upgraded Rails apps (part 2) (#43237) 2021-09-17 09:06:17 +02:00
Rafael Mendonça França d177551c30
Preparing for 7.0.0.alpha2 release 2021-09-15 18:22:51 -04:00
Rafael Mendonça França 9b7be48212
Preparing for 7.0.0.alpha1 release 2021-09-15 17:55:08 -04:00
Rafael Mendonça França fd41ea1f2d
Merge branch 'main' into less-initializers 2021-09-15 17:18:49 -04:00
Xavier Noria 89801b2a43 Depend on ruby/debug, replacing Byebug
ruby/debug is a new debugger that is going to ship with CRuby.

It makes sense for Rails to switch to this one because that is
where the language is heading, and because Byebug is not fully
compatible with Zeitwerk. See

    https://github.com/deivid-rodriguez/byebug/issues/564

While ruby/debug has not been heavily tested with Zeitwerk,
casual usage seems to suggest it works without issues, including
explicit namespaces, which is where Byebug and Zeitwerk conflict.

Byebug is terrific, thanks a lot for all these years. ❤️
2021-09-08 17:35:41 +02:00
Jean Boussier c91c266872 Enable `Style/ExplicitBlockArgument` cop
This reduce the stack size which is beneficial for
exceptions performance.

See: https://gist.github.com/byroot/cb3bcadcc3701c2518d002fb8d3a4e7a

However the cop is unsafe because it might change the block arity,
so it can run into some false positives.
2021-09-05 17:06:19 +02:00
David Heinemeier Hansson 82e4432058
Javascript generator option with choices (#43160)
* Switch to a single controller option for choosing JavaScript approach

* Remove remnants of webpacker specific work within Rails

* No longer used

* Missing space

* Raise if unknown option is passed

* Style

* Use latest versions

* Make channels setup generic to all node setups

* Make Action Text installer work with any node package manager

* Explaining variables are not useless

* Rubocop pleasing

* Don't rely on Rails.root

Tests don't like it!

* Rubocopping

* Assume importmap

* No longer relevant

* Another cop

* Style

* Correct installation notice

* Add dependencies for action cable when adding a channel

* Fix paths to be relative to generator

* Just go straight to yarn, forget about binstub

* Fix tests

* Fixup installer, only yarn once

* Test generically with run

* Style

* Fix reference and reversibility

* Style

* Fix test

* Test pinning dependencies

* Remove extra space

* Add more tests

* Use latest dependencies

* Relegated this to controllers

* Refactor ChannelGenerator + more tests

Use a uniform level of abstraction
2021-09-04 11:53:57 +02:00
Guillermo Iguaran 9b6011142c
Merge pull request #43119 from brian-kephart/main
Add HEIF image types to variable content types
2021-08-28 20:47:45 -07:00
Guillermo Iguaran b1b8f8aa23 Merge branch 'instrument-analyzers' of https://github.com/shouichi/rails into shouichi-instrument-analyzers 2021-08-28 00:48:44 -07:00
Brian Kephart 87f37419c4
Add HEIF image types to variable content types 2021-08-27 15:13:55 -05:00
Petrik de Heus fe9625c022
Temporarily disable Azure service tests (#43091)
The Azure service tests are currently failing on the main branch,
probably because of configuration. We can temporarily disable them while
we get things working again.
2021-08-25 11:22:39 +02:00
Petrik 0920b02c1d Upgrade azure-storage-blob to use at least 2.0.0
azure-storage-blob 1.1.0 supports ruby 1.9.3 to 2.5:
https://github.com/Azure/azure-storage-ruby/blob/v1.1.0-common/common/README.md

azure-storage-blob 2.0.0 supports ruby 2.3 to 2.7:
https://github.com/Azure/azure-storage-ruby/blob/v2.0.0-blob/common/README.md
2021-08-23 22:03:15 +02:00
Sandip Mane 458d2d3a53 Makes the array syntax consistant with other use cases 2021-08-18 23:44:58 +05:30
Shouichi Kamiya 2ad684bc49
Update activestorage/CHANGELOG.md
Co-authored-by: Petrik de Heus <petrik@deheus.net>
2021-08-17 17:59:08 +09:00
Shouichi Kamiya 35d8890c92 Instrument ActiveStorage analyzers 2021-08-17 16:55:05 +09:00
Kasper Timm Hansen ef65eeef08
Merge pull request #42960 from FestaLab/activestorage/unsafe-redirect
Fix open redirects in active storage
2021-08-16 15:29:52 +02:00
Kasper Timm Hansen 7faf8a0fe3
[ci skip] Undocument send_blob_byte_range_data, don't commit to a public API just yet 2021-08-16 15:16:54 +02:00
Kasper Timm Hansen fe4ec2ac0c
Merge pull request #41437 from tomprats/active-storage-byte-range
Added Active Storage support for byte ranges
2021-08-16 15:13:45 +02:00
Breno Gazzola b4e394767d Reduce file size of tiff image in Active Storage 2021-08-12 11:37:44 -03:00
David Heinemeier Hansson e34300a921
Stop trying to configure listen by default on compatible platforms (#42985)
* Stop trying to configure listen by default on compatible platforms

Modern computers with SSDs don't see much/any benefit from having an evented file update watcher. Remove complexity by taking this spinning-drive concession out.

* Actually need listen for testing the opt-in

* Test no longer relevant
2021-08-11 15:18:43 +02:00
Abhay Nikam 13722000ba Remove warning logged for vips variant test cases 2021-08-11 11:54:33 +05:30