| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |/ / / / / / / / / /
|/| | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Fixes #32610. Closes #32614.
Lua scripts in redis are *blocking*, meaning that no other client can
execute any commands while the script is running. See
https://redis.io/commands/eval#atomicity-of-scripts.
This results in the following exceptions once the number of keys is
sufficiently large:
BUSY Redis is busy running a script.
You can only call SCRIPT KILL or SHUTDOWN NOSAVE.
This commit replaces the lua-based implementation with one that uses
`SCAN` and `DEL` in batches. This doesn't block the server.
The primary limitation of `SCAN`, i.e. potential duplicate keys, is of
no consequence here, because `DEL` ignores keys that do not exist.
|
|\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
Add the `nonce: true` option for `javascript_include_tag` helper.
|
| | | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
q-centrix/perf-improvement-translation-helper-default-array
Only create an array with default options if we have default options
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
If the options passed in don't have a default key, there's no point in
creating an array from those empty results when we can just go straight
to creating an empty array.
Benchmarks:
```ruby
master_version with false
{:FREE=>-2497, :T_STRING=>52, :T_ARRAY=>2000, :T_HASH=>1000, :T_IMEMO=>1}
master_version with true
{:FREE=>-3001, :T_ARRAY=>2000, :T_HASH=>1000}
fast_version with false
{:FREE=>-1001, :T_ARRAY=>1000}
fast_version with true
{:FREE=>-3001, :T_ARRAY=>2000, :T_HASH=>1000}
Warming up --------------------------------------
master_version with false
104.985k i/100ms
master_version with true
118.737k i/100ms
fast_version with false
206.013k i/100ms
fast_version with true
107.005k i/100ms
Calculating -------------------------------------
master_version with false
1.970M (±24.6%) i/s - 8.924M in 5.010302s
master_version with true
2.152M (±12.4%) i/s - 10.686M in 5.051588s
fast_version with false
5.613M (±19.6%) i/s - 26.782M in 5.003740s
fast_version with true
2.027M (±15.8%) i/s - 9.951M in 5.065670s
Comparison:
fast_version with false: 5613159.2 i/s
master_version with true: 2152354.4 i/s - 2.61x slower
fast_version with true: 2027296.0 i/s - 2.77x slower
master_version with false: 1969824.9 i/s - 2.85x slower
```
Benchmark code:
```ruby
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update
your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "benchmark-ips"
gem "rails"
end
def allocate_count
GC.disable
before = ObjectSpace.count_objects
yield
after = ObjectSpace.count_objects
after.each { |k,v| after[k] = v - before[k] }
after[:T_HASH] -= 1 # probe effect - we created the before hash.
GC.enable
result = after.reject { |k,v| v == 0 }
GC.start
result
end
def master_version(key)
Array({}.delete(:default)).compact
end
def fast_version(key)
if key
Array({}.delete(:default)).compact
else
[]
end
end
def test
puts "master_version with false"
puts allocate_count { 1000.times { master_version(false) } }
puts "master_version with true"
puts allocate_count { 1000.times { master_version(true) } }
puts "fast_version with false"
puts allocate_count { 1000.times { fast_version(false) } }
puts "fast_version with true"
puts allocate_count { 1000.times { fast_version(true) } }
Benchmark.ips do |x|
x.report("master_version with false") { master_version(false) }
x.report("master_version with true") { master_version(true) }
x.report("fast_version with false") { fast_version(false) }
x.report("fast_version with true") { fast_version(true) }
x.compare!
end
end
test
```
|
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Output only one nonce in CSP header per request
|
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
Update validates_inclusion_of example in Docs
[ci skip]
|
|/ / / / / / / / / / / / / / |
|
|\ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | |
Ruby 2.6 warning: passing splat keyword arguments as a single Hash
|
|/ / / / / / / / / / / / / /
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
Before:
```
$ ruby -v
ruby 2.6.0dev (2018-04-04 trunk 63085) [x86_64-linux]
$ bundle exec rake test:template
...
/rails/actionview/lib/action_view/digestor.rb:76: warning: passing splat keyword arguments as a single Hash to `find_all'
```
|
|\ \ \ \ \ \ \ \ \ \ \ \ \ \
| |_|_|_|_|/ / / / / / / / /
|/| | | | | | | | | | | | | |
Correct docs on naming of sprockets manifest file
|
|/ / / / / / / / / / / / /
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Calling this an MD5 implies that it is generated consistently based on some input.
However, this value is [completely random](https://github.com/rails/sprockets/blob/fbe6e450b6f25cf3ea494fcab0e34001d0b5a0b9/lib/sprockets/manifest_utils.rb#L11-L24).
|
| |_|_|/ / / / / / / / /
|/| | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Before this change missing timezone data for any of the time zones
defined in `ActiveSupport::Timezone::MAPPING` caused a `comparison of
NilClass with ActiveSupport::TimeZone failed` exception.
Attempting to get a timezone by passing a number/duration to `[]` or
calling `all` directly will try to sort sort the values of `zones_map`.
Those values are initialized by the return value of `create(zonename)`
which returns `nil` if `TZInfo` is unable to find the timezone
information.
In our case the exception was triggered by an outdated tzdata package
which did not include information for the "recently" added time zones.
Before 078421bacba178eac6a8e607b16f3f4511c5d72f `zones_map` only
returned the information that have been loaded into `@lazy_zone_map`
which ignored time zones for which the data could not be loaded, this
change restores the previous behaviour.
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
2.6 warning: passing splat keyword arguments as a single Hash
|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Ruby 2.6.0 warns about this.
``` ruby -v
ruby 2.6.0dev (2018-04-04 trunk 63085) [x86_64-linux]
```
Before, see:
https://travis-ci.org/rails/rails/jobs/365740163#L1262-L1264
https://travis-ci.org/rails/rails/jobs/365944863#L2121-L2174
|
|\ \ \ \ \ \ \ \ \ \ \ \ \
| |_|_|_|/ / / / / / / / /
|/| | | | | | | | | | | | |
Fix test to allow IF NOT EXISTS in structure:dump
|
| | |_|_|/ / / / / / / /
| |/| | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
Before:
```
$ ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
$ ruby -w -Itest -Ilib -I../activesupport/lib -I../actionpack/lib -I../actionview/lib -I../activemodel/lib test/application/rake/multi_dbs_test.rb
Run options: --seed 28744
F
Failure:
ApplicationTests::RakeTests::RakeMultiDbsTest#test_db:migrate_and_db:structure:dump_and_db:structure:load_works_on_all_databases [test/application/rake/multi_dbs_test.rb:70]:
Expected /CREATE TABLE \"books\"/ to match "CREATE TABLE IF NOT EXISTS \"schema_migrations\" (\"version\" varchar NOT NULL PRIMARY KEY);\nCREATE TABLE IF NOT EXISTS \"ar_internal_metadata\" (\"key\" varchar NOT NULL PRIMARY KEY, \"value\" varchar, \"created_at\" datetime NOT NULL, \"updated_at\" datetime NOT NULL);\nCREATE TABLE IF NOT EXISTS \"books\" (\"id\" integer PRIMARY KEY AUTOINCREMENT NOT NULL, \"title\" varchar, \"created_at\" datetime NOT NULL, \"updated_at\" datetime NOT NULL);\nCREATE TABLE sqlite_sequence(name,seq);\nINSERT INTO \"schema_migrations\" (version) VALUES\n('20180416201805');\n\n\n".
```
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Remove unused attr_writer :joinable on Transaction
|
| | |_|/ / / / / / / / /
| |/| | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
This was added in 280587588aba6ce13717cd6679e3f2b43d287443, but has been
unused since 392eeecc11a291e406db927a18b75f41b2658253.
|
|/ / / / / / / / / / /
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Really just an excuse to trigger edge docs generation
|
|\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
Inclusive Language in Documentation Examples
|
| | | | | | | | | | | | |
|
| | |/ / / / / / / / /
| |/| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
Add the reference to Rails Guides 5.2 from the Edge Guides
|
| | |/ / / / / / / / /
| |/| | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
[ci skip]
|
|\ \ \ \ \ \ \ \ \ \ \
| |/ / / / / / / / / /
|/| | | | | | | | | | |
Update Rails minor version from 5.1 to 5.2 [ci skip]
|
|/ / / / / / / / / / |
|
|/ / / / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
At SuSE, `$HOST` is set by default and is equal to `$HOSTNAME`.
https://www.suse.com/documentation/sled11/book_sle_admin/data/sec_adm_variables.html
Therefore, by default, it binds to hostname instead of `localhost`.
This seems not to be appropriate as default behavior.
In order to avoid the name of the environment variable being used,
I changed the environment variable from `HOST` to `BINDING`.
Fixes #29516.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fix redis store clear keys outside the namespace
|
| | |_|_|/ / / / /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Namespace not working in RedisCacheStore#clear method. Bacause
namespace = merged_options(options)[namespace]
is always nil, Correct is
namespace = merged_options(options)[:namespace]
|
|\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
Add missing `require "benchmark"`
|
|/ / / / / / / / |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix broken nodocs
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This commit fixes all references in the codebase missing a trailing :,
which causes the nodoc not to actually work :) [skip ci]
|
|\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | |
| | | | | | | | |
| | | | | | | | | |
raderj89/jaredrader/update-docs-ActiveJob__Serializers__ObjectSerializer#deserialize-for-pr
fix spelling in docs for ActiveJob::Serializers::ObjectSerializer#deserialize
|
| | | | | | | | | |
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Add .keep exception for storage folder
|
| | |_|_|_|_|/ / /
| |/| | | | | | |
| | | | | | | | | |
Fixes https://github.com/rails/rails/issues/32546 by including the `.keep` file in the .gitignore, bringing the `storage` folder in line with the `tmp` and `log` folders.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Update security.md with latest underground market prices
|
| |/ / / / / / / /
| | | | | | | | |
| | | | | | | | | |
Updated underground market prices according to the 2017 Symantec ISTR (was previously citing the 2008 report)
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Legit, but really an excuse to trigger the master hook in the docs server.
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`SecureRandom.byes` was added in Ruby 2.4. So, 5-2-stable build is broken
because using `SecureRandom.bytes`.
https://travis-ci.org/rails/rails/jobs/365740667
Also, `SecureRandom.byes` seems to an undocumented method.
If need random binary strings, should use `SecureRandom.random_bytes`.
https://github.com/ruby/ruby/blob/trunk/lib/securerandom.rb
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Ok so apparently you can not just have a `default:` that manually is
merged in with YAML but you can also have a special "shared" config that
is automatically merged.
Example:
```
shared:
adapter: mysql2
host: <%= ENV["DB_HOST"] || "localhost" %>
username: root
connect_timeout: 0
pool: 100
reconnect: true
development:
database: development_db
adapter: mysql2
```
To fix, only create a DatabaseConfig object when an adapter, database,
or URL are present.
The merging behavior for `shared` doesn't work with a 3-tier config. I
don't think it worked before this change either - since Rails doesn't
know which point to merge it in. That's something we may have to fix
with the refactoring I'm working on.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add WebSocket URI support to CSP DSL mappings
|
| | | | | | | | |
|