| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces a functional Path AST visitor and implements
`each` on the AST in terms of the functional visitor. The functional
visitor doesn't maintain state, so we only need to allocate one of them.
Given this benchmark route file:
```ruby
require 'action_pack'
require 'action_dispatch'
route_set = ActionDispatch::Routing::RouteSet.new
routes = ActionDispatch::Routing::Mapper.new route_set
ObjectSpace::AllocationTracer.setup(%i{path line type})
result = ObjectSpace::AllocationTracer.trace do
500.times{|i|
routes.resource :omglol
}
end
result.find_all { |k,v| k.first =~ /git\/rails/ }.sort_by { |k,v|
v.first
}.each { |k,v|
p k => v
}
```
node.rb line 17 was in our top 3 allocation spot:
```
{["/Users/aaron/git/rails/actionpack/lib/action_dispatch/journey/nodes/node.rb", 17, :T_OBJECT]=>[31526, 0, 28329, 0, 2, 1123160]}
{["/Users/aaron/git/rails/actionpack/lib/action_dispatch/routing/mapper.rb", 2080, :T_IMEMO]=>[34002, 0, 30563, 0, 2, 1211480]}
{["/Users/aaron/git/rails/actionpack/lib/action_dispatch/routing/mapper.rb", 2071, :T_IMEMO]=>[121934, 1, 109608, 0, 7, 4344400]}
```
This commit eliminates allocations at that place.
|
|
|
|
| |
add another predicate method so we can avoid is_a checks
|
|
|
|
| |
we don't really need this visitor
|
|
|
|
|
| |
Routes are always constructed with a list of required_defaults, so
there's no need to check whether or not it's nil
|
|\
| |
| | |
Fix master build
|
|/ |
|
|\
| |
| | |
Small fixes [ci skip]
|
| | |
|
| |
| |
| |
| |
| | |
we may want to change the name of the class at some point, so it's
better to use a predicate
|
|/
|
|
|
| |
The string we create is almost always the same, so rather than joining
all the time, lets join once, then reuse that string everywhere.
|
|\
| |
| | |
Update the Debugging Rails Guide [skip ci]
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[skip ci].
- Update to the current output when running `byebug help`.
- Remove the alias `exit` because it does not work and seems to have
been removed from Byebug, as confirmed by the source code here:
https://github.com/deivid-rodriguez/byebug/blob/master/lib/byebug/comman
ds/quit.rb
- Added the useful `q!` instead to avoid the "Really quit? (y/n)"
prompt.
|
|\ \
| | |
| | | |
Replacing lambda with proc getting argument error because of it.
|
| | | |
|
|\ \ \
| | | |
| | | | |
fix Docs [ci skip]
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
typo fix [ci skip]
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Improve params parser
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
[ci skip]
Better reading flow for the information presented in this guide.
The first part is written in a similar fashion as the "Getting Started
Guide" and can be read from start to finish. The second section
introduces the different testing components that Rails provides and
explains how and when to use them.
The guide is still work in progress.
|
|\ \ \ \
| |_|_|/
|/| | | |
[skip ci] Fix minor typo
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Fixed syslog example in production config template
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
make disable_with default in submit_tag
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Prevents double submission by making disable_with the default.
Default disable_with option will only be applied if user has not
specified her/his own disable_with option, whether that is in the
`data-disable-with` string form or the
`:data => { :disable_with => "Saving..." }` hash form. disable_with
will default to the value attribute.
A configuration option was added to opt out of this functionality if
the user so desires.
`config.action_view.automatically_disable_submit_tag = false`
|
|\ \ \ \
| | | | |
| | | | | |
Plugins are generated with the version 0.1.0
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The semantic versioning specification uses MAJOR.MINOR.PATCH – it would
make more sense to set the version to 0.1.0 for initial development
since a patch release cannot be created before a minor feature release.
|
|/ / / /
| | | |
| | | |
| | | | |
[Robin Dupret]
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
vincefrancesi/date-helper-use-hidden-documentation
Documentation for ActionView::Helpers::DateHelper :use_hidden option
|
| | |/ /
| |/| |
| | | |
| | | | |
skip]
|
| | | |
| | | |
| | | |
| | | | |
[Kir Shatrov & Robin Dupret]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* Add missing `def` and remove useless `do` keywords.
* Move `:nodoc:` in front of the methods' definition so that methods
under these ones are correctly visible on the API.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I would like to change the signature of the Route constructor. Since
the mapping object has all the data required to construct a Route
object, move the allocation to a factory method.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We should build the routes using the user facing API which is `Mapper`.
This frees up the library internals to change as we see fit. IOW we
shouldn't be testing internals.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
we can directly turn it in to a regular expression here, so we don't
need to test its value twice
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Oops, I broke the build :(
Fixes the method signature of `assign_parameters` which now takes 6
arguments instead of 4. We likely will end up chaning the method
signature further so good to know this test is here.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is part of a larger refactoring on controller tests. We needed to
move these methods here so that we could get rid of the `|| key ==
:action || key == :controller` in `assign_parameters`. We know this is
ugly and intend to fix it but for now `generate_extras` needs to be used
in the two methods to access the path and the query_string_keys.
We're adding `:controller` and `:action` to the `query_string_keys`
because we always need a controller and action. If someone passed
`action` or `controller` in in there test they are unambigious - we
know they have to go into the query params.
|
|\ \ \
| | | |
| | | | |
use `average_scheduled_poll_interval` option instead of deprecated `poll_interval`
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
`poll_interval`
this removes the following warning:
```
DEPRECATION: `config.poll_interval = 0.5` will be removed in Sidekiq 4. Please update to `config.average_scheduled_poll_interval = 0.5`.
```
|
|\ \ \
| | | |
| | | | |
Convert Releasing Rails guide to Markdown
|
| |/ / |
|
|\ \ \
| |/ /
|/| | |
Initialize symbols instead of mapping to_sym on the set of strings
|
|/ / |
|
| |
| |
| |
| |
| | |
The outer router object already keeps a hash of named routes, so we
should just use that.
|
|\ \
| | |
| | | |
Small fixes [ci skip]
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
refactor the tests with a backwards compatible method call so we can rm
add_route2 from the journey router
|