| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
- Fix grammar.
- Improve readability/understanding.
- Wrap lines at 80 characters.
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In high volume applications it can be very difficult to figure out what is happening in logs because each request is not easily identified. For example 3 requests could look something like this:
```
Started GET "/" for 72.48.77.213 at 2016-01-06 20:30:21 +0000
Rendered welcome/index.html.erb within layouts/application (0.1ms)
Started GET "/" for 72.48.77.213 at 2016-01-06 20:30:22 +0000
Started GET "/" for 72.48.77.213 at 2016-01-06 20:30:23 +0000
Rendered welcome/index.html.erb within layouts/application (0.1ms)
Processing by WelcomeController#index as HTML
Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.0ms)
Processing by WelcomeController#index as HTML
Rendered welcome/index.html.erb within layouts/application (0.1ms)
Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.0ms)
Processing by WelcomeController#index as HTML
Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.0ms)
```
The `:request_id` log tag ensures that each request is tagged with a unique identifier. While they are still interleaved it is possible to figure out which lines belong to which requests. Like:
```
[c6034478-4026-4ded-9e3c-088c76d056f1] Started GET "/" for 72.48.77.213 at 2016-01-06 20:30:21 +0000
[c6034478-4026-4ded-9e3c-088c76d056f1] Rendered welcome/index.html.erb within layouts/application (0.1ms)
[abuqw781-5026-6ded-7e2v-788c7md0L6fQ] Started GET "/" for 72.48.77.213 at 2016-01-06 20:30:22 +0000
[acfab2a7-f1b7-4e15-8bf6-cdaa008d102c] Started GET "/" for 72.48.77.213 at 2016-01-06 20:30:23 +0000
[abuqw781-5026-6ded-7e2v-788c7md0L6fQ] Rendered welcome/index.html.erb within layouts/application (0.1ms)
[c6034478-4026-4ded-9e3c-088c76d056f1] Processing by WelcomeController#index as HTML
[c6034478-4026-4ded-9e3c-088c76d056f1] Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.0ms)
[abuqw781-5026-6ded-7e2v-788c7md0L6fQ] Processing by WelcomeController#index as HTML
[abuqw781-5026-6ded-7e2v-788c7md0L6fQ] Rendered welcome/index.html.erb within layouts/application (0.1ms)
[abuqw781-5026-6ded-7e2v-788c7md0L6fQ] Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.0ms)
[acfab2a7-f1b7-4e15-8bf6-cdaa008d102c] Processing by WelcomeController#index as HTML
[acfab2a7-f1b7-4e15-8bf6-cdaa008d102c] Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.0ms)
```
Now if you have the logs and you find this unique ID you can filter to only look at information from that request. So a filtered log output would be very clear:
```
[c6034478-4026-4ded-9e3c-088c76d056f1] Started GET "/" for 72.48.77.213 at 2016-01-06 20:30:21 +0000
[c6034478-4026-4ded-9e3c-088c76d056f1] Rendered welcome/index.html.erb within layouts/application (0.1ms)
[c6034478-4026-4ded-9e3c-088c76d056f1] Processing by WelcomeController#index as HTML
[c6034478-4026-4ded-9e3c-088c76d056f1] Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.0ms)
```
In addition to this benefit the `:request_id` can be set via the `X-Request-ID` header so that the same request could be traced between multiple components. For example a request comes in Nginx (or another load balancer) could assign a request id. As the load balancer processes the request I can log using that id, then when the request is passed on to Rails, the same id is used. That way if a problem is determined to be not caused in Rails it could be traced back to other components with the same ID. You can set a value in nginx for example using something like this:
```
location / {
proxy_pass http://upstream;
proxy_set_header X-Request-Id $pid-$msec-$remote_addr-$request_length;
}
# http://stackoverflow.com/questions/17748735/setting-a-trace-id-in-nginx-load-balancer
```
Heroku sets this header value so problems like timeouts that are logged by like router can be traced back to specific request within the application.
Whether you are using components that are setting request ID or not, all production applications can benefit from the additional debugging information of having a unique identifier for all requests. This change will only affect new applications, anyone can opt out by commenting or removing the line in `config/production.rb`.
|
|\
| |
| |
| |
| | |
y-yagi/make_generated_controller_test_file_work_correctly
make generated controller test work correctly
|
| |
| |
| |
| |
| |
| |
| | |
Since the `#file_name` that not consideration for the namespace, if generate a controller with a namespace,
not the correct url helper generation, it had become an error to run the test.
Modified to generate the correct url helper, even if it is produced a namespace with controller.
|
|\ \
| |/
|/| |
Per-form CSRF tokens
|
| | |
|
|/ |
|
|\
| |
| |
| |
| | |
prathamesh-sonpatki/create-application-model-under-namespaced-dir-in-plugin
Create application_record.rb under namespaced directory in plugin
|
| |
| |
| |
| |
| |
| | |
- Earlier it was creating application_record.rb under `app/models`, after
this change, it will create application_record.rb under
`app/models/plugin_name` similar to other application classes.
|
|/ |
|
|
|
|
|
|
| |
Two USAGE files were referring to Active Record and Active Model
without a space, which is incorrect because we're referring to
the framework name and not the constants.
|
|
|
|
| |
It was removed by mistake at 877a411d0c16baa4e670dae9a28f5cfcc201adc1
|
|
|
|
|
|
|
| |
- This fixes an error thrown by Thor because type of default value of
`:rc` option which is `:boolean` does not match with it's default type
which is `string`.
- Ref - https://github.com/erikhuda/thor/blob/master/lib/thor/parser/option.rb#L125
|
| |
|
|\
| |
| | |
Plugin Usage and Installation instructions
|
| | |
|
|\ \
| | |
| | | |
seeds.rb.tt: fix English.
|
| | | |
|
|/ /
| |
| |
| |
| | |
`rack-cors` gem is defined in Gemfile by default only if the api,
not defined by default in rails app.
|
|\ \
| |/
|/| |
Fix .keep file issue with ActionCable
|
| |
| |
| |
| |
| |
| | |
Fixes #22708
Make sure the channels file is create in assets/javascript/ so require
tree works in asset pipeline.
|
|\ \
| | |
| | | |
Ensure Action Cable files are removed when `skip_action_cable` is set.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Action Cable generators creates four files which need to be removed
if `skip_action_cable` is set.
1. `app/assets/javascripts/cable.coffee`
2. `app/channels/application_cable/channel.rb`
3. `app/channels/application_cable/connection.rb`
4. `config/redis/cable.yml`
Fixes #22669.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
teknofire/fix-using-add_resource-with-a-block-after-gem-call
Fix using add_resource with a block after gem in custom generators
|
| |/ /
| | |
| | |
| | | |
generator template.
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
```
Every time when a fixture generate, it’s also generating improper doc.
one: {}
# column: value
#
two: {}
# column: value
```
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
gwincr11/No-Doc-Rails__Generators__Actions__CreateMigration
Add No Doc
|
| | | |
| | | |
| | | |
| | | | |
In reference to rails/rail#22403 add a :nodoc:
|
|\ \ \ \
| | | | |
| | | | | |
Remove blank line generated in config.ru
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Follow the lines of the other `.tt` files ([example](https://github.com/rails/rails/blob/1611ab4db173a7596a7a94c58dabf1483f070304/railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt#L26)) that have the space after the
condition to avoid too many white lines in the resulted file.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In line with the other initializers, add a short comment that explains
what happens when you change the value of the initializer.
[ci skip]
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | | |
[ci skip]
The initializer has existed since 4.1, for instance see:
https://github.com/rails/rails/blob/v4.1.0/railties/lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | | |
Allow normal version updates within a release series
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We originally chose to apply very strict versioning on the `rails` entry
in the Gemfile, because our future versioning policy was not strongly
defined.
Now it is, and our policy is very much designed on the expectation that
people will regularly update to the latest patch level in their release
series... so we should encourage that.
Of course, Gemfile.lock will do its job and prevent unplanned updates,
just as it does for every other gem in the bundle... but if you run
`bundle update`, we want to get you the latest bug/security fixes
without requiring a manual edit of the Gemfile entry.
Our current version could be a few different shapes, so it takes a bit
of work to find the right specifier, but in principle, we match anything
of the form x.y.*, where x.y matches our current release series.
|
| | |
| | |
| | |
| | | |
Still more to do. Please assist!
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
this at a high level
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
```
# before
module Bukkits
class UsersControllerTest < ActionDispatch::IntegrationTest
include Engine.routes.url_helpers
setup do
@user = bukkits_users(:one)
end
```
```
# after
module Bukkits
class UsersControllerTest < ActionDispatch::IntegrationTest
include Engine.routes.url_helpers
setup do
@user = bukkits_users(:one)
end
```
|
| | |
| | |
| | |
| | |
| | | |
This file is generated by a gem that is bundled by default in the generated Rails app, just like .sqlite3 files.
Hence it might be natural to be ignored here rather than in each developer's .gitignore_global.
|