| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Documentation: correct instructions for using Sass with the asset pipeline [ci skip]
|
| | |
|
|\ \
| |/
|/|
| |
| |
| | |
[ci skip]
Documentation: update queue_classic info in Active Job adapters list
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
eventually we will make the cookie jar derive these values from the
request object rather than save a reference to the values
|
|
|
|
|
|
|
|
| |
The cookie jar can just ask the request object for the information it
needs. This allows us to stop allocating hashes for options, and also
allows us to delay calculating values in advance. Generating the
options hash forced us to calculate values that we may never have needed
at runtime
|
|
|
|
|
|
| |
Accessing a request object has nice advantages over accessing a hash.
If you use a missing method name, you'll get an exception rather than a
`nil` (is one nice feature)
|
| |
|
|
|
|
|
| |
This decouples the `call` method from knowing the SCRIPT_NAME key and
offloads decisions about how to access script_name
|
|
|
|
| |
This way JobSerializationTest runs in isolation without errors.
|
| |
|
|\
| |
| | |
Add dev caching toggle / server options
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Taken from @Sonopa's commits on PR #19091.
Add support for dev caching via "rails s" flags.
Implement suggestions from @kaspth.
Remove temporary cache file if server does not have flags.
Break at 80 characters in railties/CHANGELOG.md
Remove ability to disable cache based on server options.
Add more comprehensive options: --dev-caching / --no-dev-caching
|
|\ \
| | |
| | | |
Should use `server_info[:version]` instead of `info[:version]`
|
| | |
| | |
| | |
| | |
| | | |
Because `info[:version]` is a client version, the server version is
`server_info[:version]`.
|
|\ \ \
| | | |
| | | | |
Make ActiveJob locale aware
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When `#perform_later` is called the locale isn't stored on the
queue, which results in a locale reset when the job is performed.
An example of the problem:
I18n.locale = 'de'
HelloJob.perform_now # german message, correct
but
I18n.locale = 'de'
HelloJob.perform_later # english message, incorrect
This PR attaches the current I18n.locale to every job during the
serialization process. It is then restored during deserialization
and used to perform the job with the correct locale.
It falls back to the default locale if no serialized locale is
found in order to provide backward compatibility with previously
stored jobs. It is not necessary to clear the queue for the update.
|
|\ \ \ \
| |_|/ /
|/| | | |
migration and association guides: added some remarks about join tables
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
Allow Minitest to load plugins. Fixes #21102
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Inform user to add script in correct location into the application.js manifest file [ci skip]
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
manifest file [ci skip]
use it
change the warning
|
|\ \ \ \
| | | | |
| | | | | |
Fix the documentation of Hash#except method [ci skip]
|
| | | | |
| | | | |
| | | | |
| | | | | |
fix minor problems
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit 465f0fbca3d4a1c269038b84ec9cc248fdab5fab.
This breaks some cases where non file / directory arguments are passed
to the runner (for example db:migrate).
I still think that we can get this to work. From what I can tell there
is no reason why db:migrate is passed along to `Minitest.run`. I'll
revert and investigate possible solutions.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes #21085.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Publish the "Caching with Rails" guide
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* Fix a few typos
* Remove reference to the old `memcache-client` gem
* Remove the "ActiveSupport::Cache::EhCacheStore" part from the guide as
the gem doesn't seem to be maintained anymore.
* Move the "Custom Cache Stores" part under the "AS::Cache::Store" part
as they are pretty related.
[ci skip]
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Inform user to add styles in correct location in application.css
[ci skip]
|
| | |_|/ / /
| |/| | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Before this patch, using `bin/rails test` with a non existing
file or directory argument would silently swallow the argument and
run the whole test suite.
After the patch the command fails with `cannot load such file --`.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add missing assertion for test_route_with_colon_first
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | | |
Update Time#advance documentation with examples [ci skip]
|
| |/ / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix ambiguous argument warning
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
encapsulate all arguments
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Use #start_with? and #[] for speed
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
While the readability may be slightly worse, the speed improvement is
significant: Twice as fast when there's no leading "/" to remove, and
over 4 times as fast when there is a leading "/".
Benchmark:
require 'benchmark/ips'
def match(controller)
if controller
if m = controller.match(/\A\/(?<controller_without_leading_slash>.*)/)
m[:controller_without_leading_slash]
else
controller
end
end
end
def start_with(controller)
if controller
if controller.start_with?('/'.freeze)
controller[1..-1]
else
controller
end
end
end
Benchmark.ips do |x|
x.report("match") { match("no_leading_slash") }
x.report("start_with") { start_with("no_leading_slash") }
x.compare!
end
Benchmark.ips do |x|
x.report("match") { match("/a_leading_slash") }
x.report("start_with") { start_with("/a_leading_slash") }
x.compare!
end
Result (Ruby 2.2.2):
Calculating -------------------------------------
match 70.324k i/100ms
start_with 111.264k i/100ms
-------------------------------------------------
match 1.468M (± 7.1%) i/s - 7.314M
start_with 3.787M (± 3.5%) i/s - 18.915M
Comparison:
start_with: 3787389.4 i/s
match: 1467636.4 i/s - 2.58x slower
Calculating -------------------------------------
match 36.694k i/100ms
start_with 86.071k i/100ms
-------------------------------------------------
match 532.795k (± 4.7%) i/s - 2.679M
start_with 2.518M (± 5.8%) i/s - 12.566M
Comparison:
start_with: 2518366.8 i/s
match: 532794.5 i/s - 4.73x slower
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Save a string allocation inside loop
|