| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This reverts commit edc54fd2068bc21f0d381228e55d97e32f508923, reversing
changes made to a5922f132f4d163e2c7f770427087f5268c18def.
As discussed, this is not an appropriate place to make assumptions about
ARGV, or to write to stdout: config/boot.rb is a library and is required
by other applictions, with which we have no right to interfere.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rails has some support for multiple databases but it can be hard to
handle migrations with those. The easiest way to implement multiple
databases is to contain migrations into their own folder ("db/migrate"
for the primary db and "db/seconddb_migrate" for the second db). Without
this you would need to write code that allowed you to switch connections
in migrations. I can tell you from experience that is not a fun way to
implement multiple databases.
This refactoring is a pre-requisite for implementing other features
related to parallel testing and improved handling for multiple
databases.
The refactoring here moves the class methods from the `Migrator` class
into it's own new class `MigrationContext`. The goal was to move the
`migrations_paths` method off of the `Migrator` class and onto the
connection. This allows users to do the following in their
`database.yml`:
```
development:
adapter: mysql2
username: root
password:
development_seconddb:
adapter: mysql2
username: root
password:
migrations_paths: "db/second_db_migrate"
```
Migrations for the `seconddb` can now be store in the
`db/second_db_migrate` directory. Migrations for the primary database
are stored in `db/migrate`".
The refactoring here drastically reduces the internal API for migrations
since we don't need to pass `migrations_paths` around to every single
method. Additionally this change does not require any Rails applications
to make changes unless they want to use the new public API. All of the
class methods from the `Migrator` class were `nodoc`'d except for the
`migrations_paths` and `migrations_path` getter/setters respectively.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
There is concern that only blob are deleted depending on
the `before_destroy` definition order which throws abort.
|
|
|
|
| |
To pick up 21417e02e906f6b64f013aafefdc0cb8ea8b5e74
|
|
|
|
|
|
| |
#31393
Brought to you by a 12 year old Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=329509
|
|
|
|
|
|
| |
Explicitly declare inverse associations so ActiveStorage::Attachment touches the original record instance.
Closes #31542.
|
|
|
|
|
|
|
| |
This is useful when we have several representations for the same
underlying file, each one with a different name, and we need to provide
a custom download URL based on that name and not that of the underlying
file.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this way we avoid HTML, XML, SVG and other files that can be rendered
by the browser to be served inline by default. Depending on the origin
from where these files are served, this might lead to XSS
vulnerabilities, and in the best case, to more realistic phishing
attacks and open redirects.
We force it rather than falling back to it when other disposition is not
provided. Otherwise it would be possible for someone to force inline
just by passing `disposition=inline` in the URL.
The list of content types to be served as attachments is configurable.
|
| |
|
| |
|
| |
|
|\
| |
| | |
Bump license years for 2018
|
| | |
|
| |
| |
| |
| | |
Clarify that it's public API and may be used in third-party analyzers.
|
| |
| |
| |
| | |
Clarify that it's public API intended for use by third-party previewers. It shouldn't be removed without deprecation even though it isn't used by the built-in previewers.
|
| | |
|
|/
|
|
|
|
| |
Fixes analyzing an SVG image without an XML declaration. ImageMagick occasionally looks to the extension when it can't discern the type of an image file from its contents.
References #31356.
|
| |
|
|
|
|
|
| |
Fixes #31531
Closes #31540
|
|\
| |
| |
| |
| | |
yhirano55/add_cloud_service_links_to_readme_in_active_storage
Add cloud service's links to README of Active Storage [ci skip]
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Pass options to rails_blob_url
|
| |/ |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| |\
| | |
| | | |
Provide instant feedback when booting Rails
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I've noticed during pair/mob programming sessions with peers that
despite the speed boosts provided by Bootsnap and Spring, there is a
noticeable latency between firing a bin/rails server command and any
feedback being provided to the console. Depending on the size of the
application this lack of feedback can make it seem like something is
wrong when Rails is simply busy initializing.
This change may seem gratuitous but by just printing one line to STDOUT
we're giving a clear signal to the Rails user that their command has
been received and that Rails is indeed booting. It almost imperciptibly
makes Rails feel more responsive.
Sure the code doesn't look very fancy but there's no other appropriate
place I could think of putting it than boot.rb.
Compare these two GIFs of booting without and with this change:
Before:
![Without Boot Feedback](https://user-images.githubusercontent.com/65950/33964140-721041fc-e025-11e7-9b25-9d839ce92977.gif)
After:
![With Boot Feedback](https://user-images.githubusercontent.com/65950/33964151-79e12f86-e025-11e7-93e9-7a75c70d408f.gif)
|
| |/
| |
| |
| | |
Follow up of #31432.
|
| | |
|
| |
| |
| |
| | |
skip]
|
| |\
| | |
| | |
| | |
| | | |
5t111111/fix-active_storage-installation-failure-in-engine
Fix active_storage installation failure when in engine
|
| | | |
|