| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before:
Total allocated: 209050523 bytes (2219202 objects)
Total retained: 36580305 bytes (323462 objects)
After:
Total allocated: 209180253 bytes (2222455 objects)
Total retained: 36515599 bytes (321850 objects)
---
Modest saving of 1612 RVALUEs in the heap on Discourse boot
The larger the route file the better the results.
Saving will only be visible on Ruby 2.5 and up.
|
| | |
|
| |
| |
| |
| | |
This reverts commit f282f3758d31e8445d0854e2ae7a67f17cede3bc.
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 9f65d2a08bc80a94bbb2c0b6e00957c7059aed25, reversing
changes made to 966843732a607864b077b72b2a17168d4e3548cc.
This broken a lot of tests.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Per: https://bugs.ruby-lang.org/issues/13077 String @- will dedupe strings.
This takes advantage of this by deduping route fragments that are full of duplication usually.
For Discourse:
Before:
Total allocated: 207574305 bytes (2214916 objects)
Total retained: 36470010 bytes (322194 objects)
After
Total allocated: 207556847 bytes (2214711 objects)
Total retained: 36327973 bytes (318627 objects) <- object that GC can not collect
So we save 3500 or so RVALUES this way, not the largest saving in the world, but worth it especially for large route files.
|
| | |
|
| |
| |
| |
| |
| | |
Before, if the application defined after an engine this method would not
recognize the route since it was not defined insdie the engine.
|
| | |
|
| | |
|
| |
| |
| |
| | |
:tada::tada::tada:
|
|\ \
| | |
| | | |
Allow @ in X-Request-Id header
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It makes sense to be as strict as possible
with headers from the outside world,
but allowing @ to support Apache's mod_unique_id
(see #31644) seems OK to me
|
|/ /
| |
| |
| | |
Fixes #31823.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
[ci skip]
|
|\ \
| | |
| | |
| | |
| | | |
koic/enable_autocorrect_for_lint_end_alignment_cop
Enable autocorrect for `Lint/EndAlignment` cop
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
### Summary
This PR changes .rubocop.yml.
Regarding the code using `if ... else ... end`, I think the coding style
that Rails expects is as follows.
```ruby
var = if cond
a
else
b
end
```
However, the current .rubocop.yml setting does not offense for the
following code.
```ruby
var = if cond
a
else
b
end
```
I think that the above code expects offense to be warned.
Moreover, the layout by autocorrect is unnatural.
```ruby
var = if cond
a
else
b
end
```
This PR adds a setting to .rubocop.yml to make an offense warning and
autocorrect as expected by the coding style.
And this change also fixes `case ... when ... end` together.
Also this PR itself is an example that arranges the layout using
`rubocop -a`.
### Other Information
Autocorrect of `Lint/EndAlignment` cop is `false` by default.
https://github.com/bbatsov/rubocop/blob/v0.51.0/config/default.yml#L1443
This PR changes this value to `true`.
Also this PR has changed it together as it is necessary to enable
`Layout/ElseAlignment` cop to make this behavior.
|
|\ \
| |/
|/| |
Move browser config to its own class
|
| | |
|
| |
| |
| |
| | |
[ci skip]
|
|\ \
| | |
| | | |
Don't include Active Storage migrations in new apps
|
| |/
| |
| |
| |
| |
| | |
When a user tries to create a new attachment or blog and the matching table is missing from the database
(`active_storage_attachments` and `active_storage_blobs` by default), an informative error is displayed
that invites users to run the `active_storage:install` task.
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Refactor tests for request parameters to use more realistic setup
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These assertions did matter due to the inconsistent behavior of
[the #parameters method][1]. Today, it behaves consistently and they
could be removed. Also, one of the methods was stubbed somewhat
incorrectly, so it is better not to stub and instead, make them close
to more realistic use cases.
[1]: https://github.com/rails/rails/pull/13999#issuecomment-34601746
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
Add headless browser support in api docs [ci skip]
|
| | | |
|
| | | |
|
| |/
|/| |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
`make_tmpname` was removed by https://github.com/ruby/ruby/commit/25d56ea7b7b52dc81af30c92a9a0e2d2dab6ff27.
In this case, we want a file name, not a `File`. So cannot use `Tempfile`.
Fixes #31458
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`BigDecimal.new` has been deprecated in BigDecimal 1.3.3
which will be a default for Ruby 2.5.
Refer
https://github.com/ruby/bigdecimal/commit/533737338db915b00dc7168c3602e4b462b23503
* This commit has been made as follows:
```
cd rails
git grep -l BigDecimal.new | grep -v guides/source/5_0_release_notes.md | grep -v activesupport/test/xml_mini_test.rb | xargs sed -i -e "s/BigDecimal.new/BigDecimal/g"
```
- `activesupport/test/xml_mini_test.rb`
Editmanually to remove `.new` and `::`
- guides/source/5_0_release_notes.md
This is a Rails 5.0 release notes.
|
|\
| |
| | |
Initial support for running Rails on FIPS-certified systems
|
| |
| |
| |
| |
| |
| |
| |
| | |
implementation
and defaults to `Digest::MD5`.
Replaced calls to `::Digest::MD5.hexdigest` with calls to `ActiveSupport::Digest.hexdigest`.
|
| |
| |
| |
| | |
Follow up of #31432.
|
| |
| |
| |
| | |
Follow up of #31390.
|
| |
| |
| |
| | |
haven't specified manually another server.
|
| |
| |
| |
| | |
default headers set.
|
|\ \
| | |
| | |
| | |
| | | |
JackMc/fix-chrome-referrer-invalidauthenticitytoken
Fix issue #30658 by checking explicitly for 'null' referrer
|
| | | |
|
| | | |
|
| | | |
|