Commit Graph

74252 Commits

Author SHA1 Message Date
Mike Vastola
e555388e16 Updating .yardopts to document .rb files in [GEM]/app
Fixes #36321

Enables missing documentation for:
- actionmailbox/app/controllers/{.,**}/*.rb
- actionmailbox/app/jobs/{.,**}/*.rb
- actionmailbox/app/models/{.,**}/*.rb
- actiontext/app/models/{.,**}/*.rb
- activestorage/app/controllers/{.,**}/*.rb
- activestorage/app/jobs/{.,**}/*.rb
- activestorage/app/models/{.,**}/*.rb
2019-08-20 13:25:36 -04:00
Matthew Draper
ebd7f2a202
Merge pull request #36985 from anmolarora/fix-take-memoization
Clear ActiveRecord object memoized by take
2019-08-20 22:47:45 +09:30
Rafael Mendonça França
04cfbc807f
Generate keep file in tmp/pids
Since 9c913116c634fe5fe2159a94b8f1a244801a4877, if you run `rackup`
in a machine that doesn't have that folder, the server will not start.

This doesn't happen on `rails s` because we create that folder when
starting the server on
8c8b02784a/railties/lib/rails/commands/server/server_command.rb (L70-L74).
2019-08-19 16:53:01 -04:00
Anmol Arora
2a65310890 Clear ActiveRecord object memoized by take 2019-08-20 00:54:03 +05:30
Rafael Mendonça França
8c8b02784a
Keep the name of the releases note consistent
[Rafael Mendonça França + bogdanvlviv]
2019-08-19 14:17:35 -04:00
Rafael França
4df0563dc5
Merge pull request #36981 from tsuka/fix-tag-builder
Prevent TagBuilder modify options
2019-08-19 14:06:11 -04:00
Rafael França
da87a7c141
Merge pull request #36983 from dylanahsmith/avoid-name-string-allocation-in-current-attributes
activesupport: Memoize name object allocation in CurrentAttributes.instance
2019-08-19 13:55:31 -04:00
Dylan Thacker-Smith
65cd16b541 activesupport: Memoize name object allocation in CurrentAttributes.instance
Also, use a symbol key for a faster hash lookup.
2019-08-19 13:05:56 -04:00
Akihito Tsukamoto
0a77c05308 Prevent TagBuilder modify options 2019-08-20 00:13:02 +09:00
Carlos Antonio da Silva
6b40767df8
Merge pull request #36978 from tgwizard/fix-doc-typo
Fix minor typo in rails/engine docs [ci skip]
2019-08-19 09:34:47 -03:00
Adam Renberg Tamm
af8751fcf8 Fix minor typo in rails/engine docs [ci skip] 2019-08-19 14:26:53 +02:00
Carlos Antonio da Silva
ff84755122
Merge pull request #36967 from ohbarye/refactor_max_age_seconds
Remove unnecessary `Duration#seconds` called before `#to_i`
2019-08-19 09:08:34 -03:00
Ryuta Kamizono
9e8f568c08
Merge pull request #36969 from AhmedKamal20/patch-1
Fix Rails Version in Guides Index
2019-08-19 16:00:40 +09:00
Ryuta Kamizono
38a0898539
Merge pull request #36966 from utilum/update_puma
Update puma to the latest version
2019-08-19 15:21:58 +09:00
Akira Matsuda
88fe8d9e7c Stop reopening ClassMethods and merge definitions 2019-08-19 00:35:23 +09:00
Akira Matsuda
2f71297919 :action is just a string 2019-08-19 00:34:28 +09:00
Akira Matsuda
07c50800fb Reduce Array allocations while finding templates 2019-08-19 00:22:42 +09:00
Akira Matsuda
8ebd6e5ccc No need to dup options hash where it's not modified 2019-08-19 00:09:08 +09:00
Akira Matsuda
b65e43ab79 Reduce object allocations in TaggedLogging 2019-08-19 00:08:04 +09:00
Akira Matsuda
c45eaffa27 Reduce String allocations while handling HTTP headers 2019-08-19 00:03:25 +09:00
Akira Matsuda
934b104fb0 Reduce object allocations during activerecord.sql logging 2019-08-18 23:58:13 +09:00
Akira Matsuda
c487a82773 additions here never will be empty
it at least includes something appended 3.lines.above
2019-08-18 23:58:13 +09:00
Akira Matsuda
09ad1ec0bf Reduce String creations in HelperMethodBuilder.get() 2019-08-18 23:58:13 +09:00
Akira Matsuda
bbb35d94e1 respond_to? usually receives the method with a Symbol 2019-08-18 23:58:13 +09:00
प्रथमेश Sonpatki
fe68af09da
Mark Rails 6.0 released notes as done [ci skip] (#36968) 2019-08-18 18:23:29 +05:30
Ahmed Kamal
1982169d5e
Fix Rails Version in Guides Index 2019-08-18 14:45:11 +02:00
ohbarye
adccbecf9d Refactor max-age seconds
Same as https://github.com/rails/rails/pull/30244

`#to_i` always returns the number of seconds that this Duration represents.
2019-08-18 21:29:52 +09:00
utilum
e83ec20f52 Update puma to the latest version
Currently:
`lib/ruby/gems/2.6.0/gems/puma-3.12.1/lib/puma/minissl.rb:5: warning:
mismatched indentations at 'rescue' with 'begin' at 3`
2019-08-18 13:21:47 +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