Ahmed Kamal
1982169d5e
Fix Rails Version in Guides Index
2019-08-18 14:45:11 +02:00
Ryuta Kamizono
fa82d97022
Merge pull request #36964 from utilum/RubyGemsVersion_depracation
...
constant Gem::RubyGemsVersion is deprecated
2019-08-18 04:25:05 +09:00
utilum
271601ff65
constant Gem::RubyGemsVersion is deprecated
...
As of ruby/ruby@c4f7c260f9 .
```
~/code/rails$ ruby -v
ruby 2.7.0dev (2019-08-17T03:32:34Z master dc020b06ff) [x86_64-linux]
/home/u/.rbenv/versions/2.7.0-dev/bin/ruby -w -Itest -Ilib
-I../activesupport/lib -I../actionpack/lib -I../actionview/lib
-I../activemodel/lib test/rails_info_controller_test.rb
/home/u/code/rails/railties/lib/rails/info.rb:71: warning: constant
Gem::RubyGemsVersion is deprecated
/home/u/.rbenv/versions/2.7.0-dev/bin/ruby -w -Itest -Ilib
-I../activesupport/lib -I../actionpack/lib -I../actionview/lib
-I../activemodel/lib test/rails_info_test.rb
/home/u/code/rails/railties/lib/rails/info.rb:71: warning: constant
Gem::RubyGemsVersion is deprecated
/home/u/.rbenv/versions/2.7.0-dev/bin/ruby -w -Itest -Ilib
-I../activesupport/lib -I../actionpack/lib -I../actionview/lib
-I../activemodel/lib test/application/routing_test.rb
Run options: --seed 26063
....../home/u/code/rails/railties/lib/rails/info.rb:71: warning:
constant Gem::RubyGemsVersion is deprecated
.................../home/u/code/rails/railties/lib/rails/info.rb:71:
warning: constant Gem::RubyGemsVersion is deprecated
.
```
2019-08-17 18:41:56 +02:00
Carlos Antonio da Silva
7dfd9d2387
Fix missing backtick in maintenance policy version [ci skip]
2019-08-16 19:46:02 -03:00
Rafael Mendonça França
1c3c4f053f
Upgrade the maintainance policy
...
Only Rails 6.0 and 5.2 are supported now.
Closes #36957 .
2019-08-16 18:40:01 -04:00
Rafael Mendonça França
1953e0e1ac
Support Rails with sass-rails 6
2019-08-16 18:33:29 -04:00
Rafael França
5e2d3d1142
Merge pull request #36949 from 97jaz/thread-local-prepared-statements
...
Make prepared statement status thread and instance-specific
2019-08-16 13:43:32 -04:00
Akira Matsuda
d16f39ded2
⚠️ calling URI.open via Kernel#open is deprecated, call URI.open directly
2019-08-16 22:36:45 +09:00
Carlos Antonio da Silva
5d43e9279a
Highlight database.yml
as code block in multiple databases guide [ci skip]
2019-08-16 09:42:54 -03:00
Ryuta Kamizono
5264bbf23f
Merge pull request #36951 from utilum/update_mini_magick_to_the_latest_version
...
Update mini_magick to the latest version
2019-08-16 20:17:41 +09:00
Jon Zeppieri
d553213cfb
Make prepared statement status thread and instance-specific
...
This fixes a race condition in system tests where prepared
statements can be incorrectly parameterized when multiple
threads observe the mutation of the @prepared_statements
instance variable on the connection.
Fixes #36763
2019-08-16 02:11:19 -04:00
utilum
5170fc56d5
Update mini_magick to the latest version
...
Squashes 7 warnings tickled by ActiveStorage test task.
Before:
```
~/code/rails/activestorage$ bundle exec rake test 2>&1 | grep
mini_magick
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/mini_magick-4.9.2/lib/mini_magick/configuration.rb:122:
warning: method redefined; discarding old processor
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/mini_magick-4.9.2/lib/mini_magick/configuration.rb:128:
warning: method redefined; discarding old processor=
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/mini_magick-4.9.2/lib/mini_magick/configuration.rb:138:
warning: method redefined; discarding old cli
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/mini_magick-4.9.2/lib/mini_magick/configuration.rb:139:
warning: instance variable @cli not initialized
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/mini_magick-4.9.2/lib/mini_magick/configuration.rb:143:
warning: method redefined; discarding old cli=
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/mini_magick-4.9.2/lib/mini_magick/configuration.rb:153:
warning: method redefined; discarding old cli_path
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/mini_magick-4.9.2/lib/mini_magick/configuration.rb:154:
warning: instance variable @cli_path not initialized
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/mini_magick-4.9.2/lib/mini_magick/configuration.rb:154:
warning: instance variable @processor_path not initialized
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/mini_magick-4.9.2/lib/mini_magick/configuration.rb:157:
warning: method redefined; discarding old debug=
```
After:
```
~/code/rails/activestorage$ bundle exec rake test 2>&1 | grep
mini_magick
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/mini_magick-4.9.5/lib/mini_magick/configuration.rb:142:
warning: method redefined; discarding old cli
/home/u/.rbenv/versions/2.7.0-dev/lib/ruby/gems/2.7.0/gems/mini_magick-4.9.5/lib/mini_magick/configuration.rb:157:
warning: method redefined; discarding old cli=
```
2019-08-16 07:41:02 +02:00
Rafael França
4614848564
Merge pull request #36946 from eugeneius/return_only_media_type_on_content_type_new_default
...
Fix new default value for return_only_media_type_on_content_type
2019-08-15 20:26:19 -04:00
Richard Schneeman
0ee449790b
Merge pull request #36948 from bensheldon/patch-1
...
Remove lonely alignment whitespace from Puma config
2019-08-15 18:48:41 -05:00
Ben Sheldon [he/him]
0c28bddf40
Remove lonely alignment whitespace from Puma config
2019-08-15 16:25:24 -07:00
Rafael Mendonça França
891ac4e2f1
Add entry about the classic autoload to the upgrading guide
...
Talk about the thread-safe concerns of the classic autoloader in
development.
2019-08-15 19:12:39 -04:00
Rafael França
9ad68a4cf1
Merge pull request #36803 from andrewkress/fix-issue-36799
...
read webpacker config to populate autoload paths
2019-08-15 18:53:47 -04:00
Rafael Mendonça França
b5a52ad55b
Fix the test to check for the right config
2019-08-15 18:39:46 -04:00
Ryuta Kamizono
12e2013c27
Merge pull request #36932 from kirs/mysql2-filsort-abort
...
Improve MySQL error detection
2019-08-16 06:46:26 +09:00
George Claghorn
836eb915b1
Fix attaching many uploaded files one at a time
...
Closes #36806 .
2019-08-15 16:36:34 -04:00
Eugene Kenny
582401ad73
Fix new default value for return_only_media_type_on_content_type
...
Uncommenting this line should opt applications in to the new behaviour;
in this case, `false` is the value needed to do that. This is the value
set when `config.load_defaults 6.0` is called:
5a4305f0ec/railties/lib/rails/application/configuration.rb (L133)
2019-08-15 21:09:41 +01:00
Kir Shatrov
c99c572d37
Improve detection of ActiveRecord::StatementTimeout with mysql2 adapter
...
in the edge case when the query is terminated by MySQL server during filesort.
See https://bugs.mysql.com/bug.php?id=96537 for more details.
2019-08-15 21:00:07 +01:00
John Hawthorn
f61542c3f6
Merge pull request #36937 from jhawthorn/fix_tests_no_tty
...
Allow tests to run without a TTY
2019-08-15 09:55:56 -07:00
Ryuta Kamizono
a4158e59aa
Merge pull request #36943 from koic/bump_rubocop_to_0_74_0
...
Bump RuboCop to 0.74.0
2019-08-15 23:50:20 +09:00
Koichi ITO
1c66e047f6
Bump RuboCop to 0.74.0
...
### Summary
RuboCop 0.74.0 has been released.
https://github.com/rubocop-hq/rubocop/releases/tag/v0.74.0
And rubocop-0-74 channel is available in Code Climate.
https://github.com/codeclimate/codeclimate/releases/tag/v0.85.5
This PR specifies the same RuboCop Performance (1.3.0) and RuboCop Rails (2.0.0)
versions as Code Climate's Gemfile.lock.
https://github.com/codeclimate/codeclimate-rubocop/blob/channel/rubocop-0-74/Gemfile.lock#L51-L55
Also, the `EnforcedStyle` of `Layout/IndentationConsistency` has been renamed
from `EnforcedStyle: rails` to `EnforcedStyle: indented_internal_methods`
- https://github.com/rubocop-hq/rubocop/pull/7113
- https://github.com/rubocop-hq/rubocop/pull/7163
And this commit disables `Layout/SpaceAroundOperators`
that was changed from RuboCop 0.74 by rubocop-hq/rubocop#7211 .
cf. https://github.com/rails/rails/pull/36943#issuecomment-521659529
2019-08-15 23:28:06 +09:00
Javan Makhmali
55311b1596
Ensure @rails/actioncable package contains complete source
...
Action Cable's JavaScript library can optionally be imported as an ES6 module via `import { … } from "@rails/actioncable/src"`, but that module is broken in most of the releases published on npm:
```
ERROR in ./node_modules/@rails/actioncable/src/connection.js
Module not found: Error: Can't resolve './internal' in './node_modules/@rails/actioncable/src'
@ ./node_modules/@rails/actioncable/src/connection.js
@ ./node_modules/@rails/actioncable/src/index.js
```
Because `internal.js` was gitignored, it would only be included if the publisher happened to have it generated locally. Committing it to version control ensures that won't happen, and gives us better visibility into changes over time.
References:
- https://github.com/rails/rails/pull/34370
- c0368ad090b79c19300a4aa133bb188b2d9ab611
2019-08-15 09:19:59 -04:00
John Hawthorn
79953c476c
Allow tests to run without a TTY
...
We had two tests which assigned IO.console.winsize (to ensure output was
consistent), however it's possible for IO.console to be nil.
This commit makes these tests stub IO.console_size directly (the method
we actually call, we shouldn't have been relying on that calling
IO.console.winsize anyways) or passes the width when initializing the
class.
This allows tests to run without a TTY. This can be tested with ex.
ssh localhost "cd src/rails/actionpack && bundle exec rake"
or
(setsid bundle exec rake) </dev/null |& cat
2019-08-14 10:52:21 -07:00
Andrew Kress
36beec7b55
add test to check we read new path correctly
2019-08-14 12:36:59 -05:00
Andrew Kress
61c5a14cab
rename to javascript_path, make attr_accessor
2019-08-14 12:36:27 -05:00
Andrew Kress
ffaee477bd
create an attribute so that webpacker can set its default path instead of hardcoding
2019-08-13 15:20:59 -05:00
Xavier Noria
8ab4fd12f1
documents how to troubleshoot autoloading in zeitwerk mode
2019-08-13 18:16:03 +02:00
Xavier Noria
5a70f33909
defines Rails.autoloaders.log!
2019-08-13 18:14:50 +02:00
Xavier Noria
841ac6ceb2
6.x -> 6.0 [skip ci]
2019-08-12 23:47:42 +02:00
Rafael França
16b09a8eec
Merge pull request #36915 from bogdanvlviv/remove-active_storage-migration-related-to-rails-6-0-update
...
Remove `AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId` migration
2019-08-12 17:17:10 -04:00
Rafael França
ac9416f355
Merge pull request #36920 from garethson/log-active-job-potential-matches
...
Log active_job potential matches when asserting
2019-08-12 16:33:07 -04:00
Gareth du Plooy
060a1fb338
Log active_job potential matches when asserting
...
Adds logging of potential matches when calling `assert_enqueued_with` and `assert_performed_with` to provide more information on test failures.
2019-08-12 15:16:12 -05:00
Xavier Noria
aec2f3828c
6.x -> 6.0 [skip ci]
...
This 6.x seems to be confusing to some people.
2019-08-12 20:08:19 +02:00
Rafael Mendonça França
e44a197997
Nodoc class that should not be part of public API
2019-08-12 13:21:58 -04:00
bogdanvlviv
f2819f7876
Remove AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId
migration
...
In https://github.com/rails/rails/pull/33419 , we added this migration to
properly upgrade Active Storage from 5.2 to 6.0
On Rails 6.1 `rails app:update` shouldn't add this migration to users' app.
Note that, I've left implementation that makes `rails app:update` to generate
migrations for users' app that are in `activestorage/db/update_migrate/`
because we are likely to need it e.g.: https://github.com/rails/rails/pull/34935 , https://github.com/rails/rails/pull/36835 .
2019-08-12 15:37:51 +03:00
Carlos Antonio da Silva
9a2e00e27b
Merge pull request #36906 from wjessop/fix_collection_rendering_docs
...
Remove misleading documentation [ci skip]
2019-08-09 23:51:23 -03:00
Will Jessop
fdb6a90794
Remove misleading documentation
...
The docs for ActionView partial renderer state:
> NOTE: Due to backwards compatibility concerns, the collection can't be one of hashes. Normally you'd also just keep domain objects, like Active Records, in there.
The reporter stated:
> I can render a collection of hashes without problems:
>
> = render :partial => "info_row", :collection => my_collection, :as => :d
I tested this in a Rails 6.0 rc2 app and hashes were passed as described. Fixes #36897 . [ci skip]
2019-08-10 02:52:15 +01:00
John Hawthorn
599c170d8e
Merge pull request #36873 from jhawthorn/schema_sha_parallel
...
Sync parallel test DBs to schema using SHA
2019-08-09 15:43:48 -07:00
Rafael França
cce74a8b9e
Merge pull request #36901 from peterzhu2118/azure-test-content-type
...
Add test for content type in direct upload to Azure
2019-08-09 18:05:23 -04:00
Peter Zhu
d0ed8305ae
Add test for content type in direct upload to Azure
2019-08-09 14:54:09 -04:00
Gannon McGibbon
88209624af
Merge pull request #36884 from gmcgibbon/allow_yaml_file_fixtures
...
Remove yaml file fixtures from regular fixtures
2019-08-09 14:52:06 -04:00
Gannon McGibbon
9899697794
Stop trying to read yaml file fixtures when loading Active Record fixtures
2019-08-09 14:24:59 -04:00
Carlos Antonio da Silva
61bda21e51
Merge pull request #36900 from akshaymohite/gemfile-lock-changes
...
Rails HTML sanitizer update changes to Gemfile lock on bundle install.
2019-08-09 13:03:52 -03:00
Akshay Mohite
7c52173cea
Rails HTML sanitizer gemfile lock changes on bundle install.
2019-08-09 21:10:59 +05:30
Ryuta Kamizono
bdfd470531
Merge pull request #36889 from kamipo/deprecate_reorder_with_non_deterministic_first
...
Deprecate `.reorder(nil)` with `.first` / `.first!` taking non-deterministic result
2019-08-09 17:58:35 +09:00
John Hawthorn
d8b8171343
Sync parallel test DBs to schema using SHA
...
Previously, every time we ran tests in parallel we would load the schema
for all N DBs.
Now that we have the ability to sync DBs with the schema file exactly
using metadata and a SHA, we can instead only load the schemas when they
change.
2019-08-08 23:08:40 -07:00