Commit Graph

74665 Commits

Author SHA1 Message Date
utilum
e0b8c918a0 Avoid flunking tests on warning in output 2019-09-28 12:52:31 +02:00
Matthew Draper
ade48853d9
Merge pull request #36907 from wjessop/string_attribute_should_compare_with_typecast_symbol_after_update
Serialize symbols to strings in ImmutableString serialize method
2019-09-28 18:20:08 +09:30
Ryuta Kamizono
3dbe9a50d7 Using a class method is not the preferred way to accept arguments for scopes
I'm not sure why using a class method is the preferred way 10 years ago.

b4b2574...226a2a9

But at least in Rails 6.1, using a scope is the preferred way since
several scoping issues will be fixed only for scopes.

[ci skip]
2019-09-28 16:58:16 +09:00
Ryuta Kamizono
1f37f043a6 Fix index array's offset 2019-09-28 16:04:06 +09:00
Ryuta Kamizono
bc7ed042c4 Use String#+@ before mutating the result of Symbol#to_s
Follow up #37303.

https://buildkite.com/rails/rails/builds/63957#dc16cd12-10a2-435c-9b64-b8332114d92a/981-1293
2019-09-28 15:53:20 +09:00
Ryuta Kamizono
63299ce7a3 Revert register proc takes keyword arguments
Because Ruby 2.6 cannot ignore empty kwargs.

https://buildkite.com/rails/rails/builds/63958#9932c536-b1df-4d2c-bda0-c59ed0e254c1/987-995
2019-09-28 15:07:38 +09:00
Ryuta Kamizono
404e1a0acd touch_attributes_with_time takes keyword arguments 2019-09-28 14:54:29 +09:00
Ryuta Kamizono
2cf74f6b87 Fix remaining keyword arguments warnings for Active Record
Except required `ruby2_keywords` things.
2019-09-28 14:42:25 +09:00
Ryuta Kamizono
d700456cb7 create_table_definition takes keyword arguments 2019-09-28 14:25:13 +09:00
Ryuta Kamizono
e0375764b7 foreign_key takes keyword arguments 2019-09-28 14:22:47 +09:00
Ryuta Kamizono
2b2673cb1e add_reference/remove_reference takes keyword arguments 2019-09-28 14:21:35 +09:00
Gannon McGibbon
63783fdba2
Merge pull request #34893 from gmcgibbon/add_gotcha_note_to_helper_method_docs
Add note about view contexts to ActionController::Helpers.helpers
2019-09-27 14:17:46 -04:00
Josh Goodall
d0e813fc12 Document Arel.sql 2019-09-26 19:37:42 -04:00
Rafael Mendonça França
b0b2ae8b8d Skip test is all Ruby implementations that don't support fork 2019-09-26 18:27:00 -04:00
Ryuta Kamizono
192df82f0d
Merge pull request #37303 from eregon/follow-frozen-symbol-to_s
Use String#+@ before mutating the result of Symbol#to_s
2019-09-26 20:13:26 +09:00
Benoit Daloze
207974e04e Use String#+@ before mutating the result of Symbol#to_s
* String#+@ is available since Ruby 2.3.
* See the upstream Ruby change making Symbol#to_s return a frozen String
  for efficiency: https://github.com/ruby/ruby/pull/2437
2019-09-26 10:24:17 +02:00
Eileen M. Uchitelle
cb6db15d22
Merge pull request #37291 from seejohnrun/use-database-config-objects-in-database-tasks
Make DatabaseTasks adapters use DatabaseConfig objects
2019-09-25 18:33:47 -04:00
Eileen M. Uchitelle
957ef6218b
Merge pull request #37298 from eileencodes/fix-defaults-for-database-configs
Fix defaults for database configs
2019-09-25 14:10:16 -04:00
John Hawthorn
02ecdf61d1
Merge pull request #37216 from jhawthorn/avoid_file_watcher
Avoid setting up file watcher on cache_classes
2019-09-25 10:53:33 -07:00
John Crepezzi
4ee9dab316 Make DatabaseTasks adapters use DatabaseConfig objects
We are moving to using `DatabaseConfig` objects everywhere inside of
Rails instead of passing around Hash objects.

This PR moves to using `DatabaseConfig` objects inside of the individual
database tasks adapters. In the interest of not breaking existing
adapters, we've introduced an upgrade path by which adapters can get a
hold of database configuration objects instead of Hashes by implementing
a method `self.using_database_configurations?`

Co-authored-by: eileencodes <eileencodes@gmail.com>
2019-09-25 13:52:14 -04:00
Ryuta Kamizono
e6edfb7730
Merge pull request #37300 from seejohnrun/avoid-puma-bind-output-format
Update test to avoid Puma output format change
2019-09-26 02:36:27 +09:00
John Crepezzi
4e66e2dffc Update test to avoid Puma output format change
We are seeing some test failures for this test in #37291. It looks like
what's going on is that Puma has changed the output for this command
between 4.1 and 4.2

Previously:

```
...
* Environment: development
* Listening on tcp://localhost:3000
...

```

Now:

```
...
* Environment: development
* Listening on tcp://127.0.0.1:3000
* Listening on tcp://[::1]:3000
...

```

So to get around this, instead of checking the binding address, just
check for the presence of 'Listening' generally like we do on server
start.

Co-authored-by: eileencodes <eileencodes@gmail.com>
2019-09-25 13:11:58 -04:00
eileencodes
5b9e96d38f Fix defaults for database configs
When we moved the defaults from hash accessors to methods a few of the
settings got mis-configured. This change fixes the defaults and adds a
hash config test to prevent future regressions.

Co-authored-by: John Crepezzi <john.crepezzi@gmail.com>
2019-09-25 11:15:34 -04:00
Xavier Noria
d30579e12b
Merge pull request #37294 from giraffate/fix_typo_in_testing_doc
Fix typo, shoud -> should [ci skip]
2019-09-25 09:00:19 +02:00
Takayuki Nakata
99f125a6bc Fix typo, shoud -> should [ci skip] 2019-09-25 15:54:06 +09:00
Xavier Noria
63a791c097 remove spurious trailing commas from zeitwerk:check error messages
Since the original message is something like this

    expected file ... to define constant A, but didn't

the \S+ captured the comma. A constant name goes there, so [\w:]+ is
enough and won't match the comma.
2019-09-25 00:41:39 +02:00
Xavier Noria
ac193d0cc3 actual fix for #37285 2019-09-25 00:27:18 +02:00
George Claghorn
149da8815c Remove errant default option 2019-09-24 14:08:09 -04:00
Rafael França
2a3ab476c8
Merge pull request #37288 from Shopify/fix-load-schema
Better double checked locking in load_schema
2019-09-24 13:50:48 -04:00
George Claghorn
75a53297c7
Add ActionController::Base.log_at
Allow setting a different log level per request.
2019-09-24 13:47:34 -04:00
Jean Boussier
f7d4f674e4 Better double checked locking in load_schema 2019-09-24 18:00:05 +02:00
Eileen M. Uchitelle
29be48f5a5
Merge pull request #37253 from Shopify/connection-pool-db-config
Instantiate ConnectionPool with a DatabaseConfig rather than a ConnectionSpecification
2019-09-24 08:41:52 -05:00
Jean Boussier
48c716bbfa Instantiate ConnectionPool with a DatabaseConfig rather than a ConnectionSpecification 2019-09-24 15:12:22 +02:00
Carlos Antonio da Silva
bc7821f519 Fix typo in changelog entry [ci skip] 2019-09-24 09:14:30 -03:00
Carlos Antonio da Silva
dd6227075a
Merge pull request #37287 from bknarendra/fix_documentation_in_action_cable_test_case
Fixed typo in comment in ActionCable::Connection::TestCase [ci skip]
2019-09-24 09:12:37 -03:00
Eileen M. Uchitelle
ddc73edf20
Merge pull request #37280 from seejohnrun/use-db-config
Make all reads on configuration_hash use methods
2019-09-24 07:08:34 -05:00
George Claghorn
436e3ffe03 Fix typo: overwrittein → overwritten 2019-09-24 08:00:48 -04:00
George Claghorn
22c2d6011f Shush deprecation warnings in ASt tests 2019-09-24 07:41:22 -04:00
Julik Tarkhanov
3c35de7933 Always create ActiveStorage::Blob before uploading to service 2019-09-24 07:32:59 -04:00
Narendra Rajput
66a44b1710 Fixed typo in comment in ActionCable::Connection::TestCase [ci skip] 2019-09-24 14:46:36 +05:30
Xavier Noria
3ac9e22c12 let zeitwerk:check report files outside the root directory with absolute paths
This may happen in engines loaded as gems, for example.

Closes #37285.
2019-09-24 10:27:18 +02:00
Akira Matsuda
501bab2f64 form_with takes keyword arguments 2019-09-24 13:48:14 +09:00
Akira Matsuda
2c66870726 t.string takes keyword arguments 2019-09-24 13:48:14 +09:00
Akira Matsuda
ba0c031148 Unify foreign_key method signatures to take keyword arguments 2019-09-24 13:48:14 +09:00
Akira Matsuda
deef6a35ed add_foreign_key takes keyword arguments 2019-09-24 13:48:14 +09:00
Akira Matsuda
d1d1a2dee7 template_exists? takes keyword arguments 2019-09-24 13:48:14 +09:00
Akira Matsuda
491ab85207 Unify rotate method definitions to take keyword arguments 2019-09-24 13:48:14 +09:00
Carlos Antonio da Silva
a08a069acd Fix queue adapter class delegation to point to self.class
Using `self` works by essentially pointing to the included class, in
this case `ActiveJob::Base`, so that'd end up delegating to
`ActiveJob::Base.queue_adapter` instead.
2019-09-23 21:59:59 -03:00
Ryuta Kamizono
db6884a772 Fix typo /a HTTP/an HTTP/ [ci skip]
Follow up #37281.
2019-09-24 08:43:31 +09:00
Vipul A M
c34229683e
Merge pull request #37281 from giraffate/fix_typo_in_actionpack_changelog
Fix typo in actionpack changelog, `a HTTP` -> `an HTTP` [ci skip]
2019-09-24 05:11:24 +05:30