| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
- `AM::Errors#delete` currently returns an empty array when trying
to delete an error that doesn't exist.
This behaviour is surprising and I think it would be better
to no return a truthy value but instead return nil like
`Hash#delete` does.
|
|\
| |
| |
| |
| | |
wjessop/fix_database_url_trampling_other_env_configs
When DATABASE_URL is specified don't trample envs that use a url: key
|
|/
|
|
| |
fixes #36610
|
|\
| |
| | |
Do not use aliases in GROUP BY clause
|
| |
| |
| |
| |
| |
| |
| | |
It appears that Oracle does not allow using aliases in GROUP BY clause
unlike ORDER BY clause.
Fixes #36613.
|
| |
| |
| |
| |
| |
| | |
Fixes that file attachments without captions would not be represented in plain text generated from rich-text content, causing ActionText::RichText#present? to return false.
Closes #36607.
|
|/
|
|
|
| |
It is for agnostic test case, since quoted table name may include `.`
for all adapters, and `[` / `]` for sqlserver adapter.
|
|\
| |
| | |
Set process title of parallelized test workers
|
| | |
|
|\ \
| | |
| | | |
Fix Browser#preload for older Selenium
|
| | |
| | |
| | |
| | | |
Since #36424, we need an newer version in order to pass.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Older versions of selenium had driver_path on
::Selenium::WebDriver::Chrome directly, not on Service. This avoids
errors on those old versions and will preload properly if webdrivers is
installed.
|
|\ \ \
| | | |
| | | | |
MySQL: Fix schema dumping `enum` and `set` columns correctly
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`enum` and `set` are typed cast as `:string`, but currently the
`:string` type is incorrectly reused for schema dumping.
A cast type on columns is not always the same with `sql_type`, this
fixes schema dumping `enum` and `set` columns to use `sql_type` instead
of `type` correctly.
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
Update docs on dirty.rb
[ci skip]
|
|/ /
| |
| | |
`previously_changed` seems to actually be `previous_changes`
|
|\ \
| | |
| | | |
Preload browser driver_path to fix system testing under parallelism
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The webdrivers gem configures Selenium::WebDriver::Service.driver_path
as a proc which updates the web drivers and returns their path.
This commit introduces SystemTesting::Browser#preload, which runs this
proc early. This ensures that webdrivers update is run before forking
for parallel testing, but doesn't explicitly tie us to that gem (and I
think anything configured as driver_path probably makes sense to
eager-load).
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Update docs regarding skipping CI tests [ci skip]
|
|/ /
| |
| |
| |
| |
| | |
The phrasing of this struck we as odd, "To help our CI servers..." So I
feel it would be more useful if we explain more explicitly that ci skip
cuts down on usage by not running CI.
|
|\ \
| | |
| | | |
Fix swapped replica/primary in multi-db docs [ci skip]
|
| | |
| | |
| | |
| | |
| | | |
in multi-db docs [ci skip]
Reads after write should be from the primary database.
|
|\ \ \
| |/ /
|/| | |
Add the ability to set the CSP nonce only to the specified directives
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I changed to set CSP nonce to `style-src` directive in #32932.
But this causes an issue when `unsafe-inline` is specified to `style-src`
(If a nonce is present, a nonce takes precedence over `unsafe-inline`).
So, I fixed to nonce directives configurable. By configure this, users
can make CSP as before.
Fixes #35137.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 60e19c6d6cb60159af4e2247f29d2cea375a21d6, reversing
changes made to 72e257b4c935b6829f7d4db36dea61a1682aa44e.
The method signature is different between `create_file` and `template`.
https://www.rubydoc.info/github/erikhuda/thor/master/Thor/Actions#create_file-instance_method
https://www.rubydoc.info/github/erikhuda/thor/master/Thor/Actions#template-instance_method
|
|\ \ \
| | | |
| | | | |
[skip ci] use 'template' instead of 'create_file' for erb templates in generators guide
|
|/ / /
| | |
| | |
| | | |
guide [skip ci]
|
| | |
| | |
| | |
| | |
| | | |
This version makes eager loading and autoloading consistent,
as documented in the upgrading guide.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This makes to be able to ignore the query in `assert_queries` even if
accidentally reconnected a connection.
https://buildkite.com/rails/rails/builds/61917#4c49187a-3173-4d5c-8a8d-d65768f5bfc9/1000-1799
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Introduced in bba7c63a663b073034f4c73f0d59655751694e5a
Before:
```
$ TESTOPTS="-n=/test_yaml_dump_and_load/" bundle exec rake
test:postgresql
:scisors: ... :scisors:
Using postgresql
Run options: -n=/test_yaml_dump_and_load/ --seed 36896
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
/home/u/code/rails/activerecord/lib/active_record/connection_adapters/postgresql/column.rb:15:
warning: instance variable @serial not initialized
.
Finished in 0.195325s, 5.1197 runs/s, 35.8376 assertions/s.
1 runs, 7 assertions, 0 failures, 0 errors, 0 skips
```
Co-authored-by: Ryuta Kamizono <kamipo@gmail.com>
|
|\ \ \
| | | |
| | | | |
Fix broken url configs
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This PR is to fix #36559 but I also found other issues that haven't been
reported.
The check for `(config.size == 1 && config.values.all? { |v| v.is_a?
String })` was naive. The only reason this passed was because we had
tests that had single hash size configs, but that doesn't mean we don't
want to create a hash config in other cases. So this now checks for
`config["database"] || config["adapter"] || ENV["DATABASE_URL"]`. In the
end for url configs we still get a UrlConfig but we need to pass through
the HashConfig to create the right kind of UrlConfig. The UrlConfig's
are really complex and I don't necessarily understand everything that's
needed in order to act the same as Rails 5.2.
I edited the connection handler test to demonstrate how the previous
implementation was broken when checking config size. Now old and new
tests pass so I think this is closer to 5.2.
Fixes #36559
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
case sensitive comparison in Rails 6.1"
Caused by #36210.
|
|\ \ \
| | | |
| | | | |
Warn if we can't read the yaml to create database tasks
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
For multiple databases we attempt to generate the tasks by reading the
database.yml before the Rails application is booted. This means that we
need to strip out ERB since it could be reading Rails configs.
In some cases like https://github.com/rails/rails/issues/36540 the ERB
is too complex and we can't overwrite with the DummyCompilier we used in
https://github.com/rails/rails/pull/35497. For the complex causes we
simply issue a warning that says we couldn't infer the database tasks
from the database.yml.
While working on this I decided to update the code to only load the
database.yml once initially so that we avoid having to issue the same
warning multiple times. Note that this had no performance impact in my
testing and is merely for not having to save the error off somewhere.
Also this feels cleaner.
Note that this will not break running tasks that exist, it will just
mean that tasks for multi-db like `db:create:other_db` will not be
generated. If the database.yml is actually unreadable it will blow up
during normal rake task calls.
Fixes #36540
|
| | | |
| | | |
| | | |
| | | |
| | | | |
https://github.com/vhf/free-programming-books seems to have moved to
https://github.com/EbookFoundation/free-programming-books
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
[ci skip] Refer actionmailbox and actiontext in the guide
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
Replace the www.robotstxt.org URL with https one [ci skip]
|
|/ / / /
| | | |
| | | |
| | | | |
The robots.txt site is moved permanently to https URL.
|
|\ \ \ \
| |/ / /
|/| | | |
Rely on Kernel require instead of self require
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With this code (exctracted from derailed_benchmarks):
```ruby
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
gem "rails", "~> 6.0.0.rc1", require: false
end
FILES = [
"rails/engine/configuration",
"rails/source_annotation_extractor",
"active_support/deprecation"
]
module Kernel
alias :original_require :require
def require(file)
Kernel.require(file)
end
class << self
alias :original_require :require
end
end
Kernel.define_singleton_method(:require) do |file|
original_require(file)
end
FILES.each do |file|
puts "requiring file: #{file}"
require file
end
```
It fails with Rails 6 and the change introduced by 32065
```
requiring file: rails/engine/configuration
requiring file: rails/source_annotation_extractor
Traceback (most recent call last):
11: from repro_derailed.rb:33:in `<main>'
10: from repro_derailed.rb:33:in `each'
9: from repro_derailed.rb:35:in `block in <main>'
8: from repro_derailed.rb:21:in `require'
7: from repro_derailed.rb:30:in `block in <main>'
6: from repro_derailed.rb:30:in `require'
5: from /Users/benoit.tigeot/.rvm/gems/ruby-2.5.1/gems/railties-6.0.0.rc1/lib/rails/source_annotation_extractor.rb:8:in `<top (required)>'
4: from /Users/benoit.tigeot/.rvm/gems/ruby-2.5.1/gems/activesupport-6.0.0.rc1/lib/active_support/deprecation/proxy_wrappers.rb:10:in `new'
3: from /Users/benoit.tigeot/.rvm/gems/ruby-2.5.1/gems/activesupport-6.0.0.rc1/lib/active_support/deprecation/proxy_wrappers.rb:10:in `new'
2: from /Users/benoit.tigeot/.rvm/gems/ruby-2.5.1/gems/activesupport-6.0.0.rc1/lib/active_support/deprecation/proxy_wrappers.rb:125:in `initialize'
1: from /Users/benoit.tigeot/.rvm/gems/ruby-2.5.1/gems/activesupport-6.0.0.rc1/lib/active_support/deprecation/proxy_wrappers.rb:23:in `method_missing'
/Users/benoit.tigeot/.rvm/gems/ruby-2.5.1/gems/activesupport-6.0.0.rc1/lib/active_support/deprecation/proxy_wrappers.rb:148:in `warn': private method `warn' called for nil:NilClass (NoMethodError)
```
Related:
- https://github.com/schneems/derailed_benchmarks/pull/130
- https://github.com/rails/rails/pull/32065
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
vishaltelangre/raise-record-invalid-when-associations-fail-to-save-due-to-uniqueness-failure
Fix: ActiveRecord::RecordInvalid is not raised when an associated record fails to #save! due to uniqueness validation failure
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
fails to #save! due to uniqueness validation failure
Add tests
Fix tests failing due to introduction of uniquness rule added to Book model
|
| | | | |
|