aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Merge pull request #22511 from jonatack/redirect-to-302Arthur Nogueira Neves2015-12-112-17/+36
|\ \ \ \ | | | | | | | | | | Show redirect response code in assert_response messages
| * | | | Show redirect response code in assert_response messagesJon Atack2015-12-112-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to PR #19977, which helpfully added the redirection path to the error message of assert_response if response is a redirection, but which removed the response code, obscuring the type of redirect. This PR: - brings back the response code in the error message, - updates the tests so the new messages can be tested, - and adds test cases for the change.
* | | | | Revert "Merge pull request #22502 from maclover7/remove-deprecation-notice"Arthur Neves2015-12-111-0/+8
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c2e70ca9b042a3461aac0dc073a80e84bd77eb57, reversing changes made to b0e5fc2737ed0b2f67f9b9538d01e084545493fd. this broke the build
* | | | Merge pull request #22502 from maclover7/remove-deprecation-noticeArthur Nogueira Neves2015-12-111-8/+0
|\ \ \ \ | | | | | | | | | | Remove unused deprecation notice
| * | | | Remove unused deprecation noticeJon Moss2015-12-051-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The `rake db:test:*` tasks were deprecated in #13528, but were undeprecated and added back in via #17739.
* | | | | Merge pull request #22514 from ↵Rafael França2015-12-112-3/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | prathamesh-sonpatki/use-assert-over-assert-predicate Use assert over assert_predicate in assert_response
| * | | | | Use assert over assert_predicate in assert_responsePrathamesh Sonpatki2015-12-062-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `assert_predicate` appends its own error message at the end of message generated by `assert_response` and because of that the error message displays the whole `response` object. - For eg. Expected response to be a <success>, but was a redirect to <http://test.host/posts>. Expected #<ActionDispatch::TestResponse:0x007fb1cc1cf6f8....(lambda)>}>> to be successful?. - Complete message can be found here - https://gist.github.com/prathamesh-sonpatki/055afb74b66108e71ded#file-gistfile1-txt-L19. - After this change the message from `assert_predicate` won't be displayed and only message generated by `assert_response` will be shown as follows: Expected response to be a <success>, but was a redirect to <http://test.host/posts>
* | | | | | Merge pull request #22554 from y-yagi/fix_link_to_cocRafael França2015-12-111-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | fix links to code of conduct [ci skip]
| * | | | | | fix links to code of conduct [ci skip]yuuji.yaginuma2015-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | CoC text has been moved to the Rails website in 90bcb6d
* | | | | | | Merge pull request #22553 from jtwarren/patch-1Claudio B2015-12-101-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Correct the time comparison for remember_me token
| * | | | | | | Correct the time comparison for remember_me tokenJeffrey Warren2015-12-101-1/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corrects the time comparison to be `Time.now < time` which allows the user to be set only when the current time is less than the 2 week window given in the example.
* | | | | | | Merge pull request #22552 from tamird/nokogiri-1.6.7Jeremy Daer2015-12-102-5/+5
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Update nokogiri to 1.6.7
| * | | | | | | Update nokogiri to 1.6.7Tamir Duberstein2015-12-102-5/+5
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This picks up https://github.com/sparklemotion/nokogiri/pull/1218 which allows nokogiri to compile on Xcode-only OS X systems.
* | | | | | | Merge pull request #22367 from andreynering/docs-ar-enumsYves Senn2015-12-101-0/+30
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | Adding Enums section to AR Querying. [ci skip]
| * | | | | | Adding Enums section to Active Record Querying Guide. [ci skip]Andrey Nering2015-12-081-0/+25
| | | | | | |
* | | | | | | Merge pull request #22546 from y-yagi/show_relative_path_in_test_runnerYves Senn2015-12-104-23/+63
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | show relative path the rerun snippet of test runner in rails engine
| * | | | | | | show relative path the rerun snippet of test runner in rails engineyuuji.yaginuma2015-12-104-23/+63
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the absolute path is not required to re-run the test, modified so that unnecessary information is not displayed. ```ruby # before bin/rails test /path/to/blorgh/test/integration/navigation_test.rb:5 # after bin/rails test test/integration/navigation_test.rb:5 ```
* | | | | | | Merge pull request #22543 from datanoise/masterRafael França2015-12-091-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fixed typo in mysql client parameter
| * | | | | | | Fixed typo in mysql client parameterKent Sibilev2015-12-091-1/+1
|/ / / / / / /
* | | | | | | Merge pull request #20831 from jmbejar/rails-api-json-error-responseSantiago Pastorino2015-12-0912-69/+279
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Rails API: Ability to return error responses in json format also in development
| * | | | | | | Avoid calling AD::MimeNegotiation#format_from_path_extension method twiceJorge Bejar2015-12-091-2/+2
| | | | | | | |
| * | | | | | | Remove duplicated assertion from api_app_generator testsJorge Bejar2015-12-091-2/+0
| | | | | | | |
| * | | | | | | We don't need to set config.debug_exception_response_format given that :api ↵Jorge Bejar2015-12-092-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is the default value for only API apps
| * | | | | | | Make debug_exception_response_format config depends on api_only when is not setJorge Bejar2015-12-092-2/+37
| | | | | | | |
| * | | | | | | Add tests for api_only configuration settingJorge Bejar2015-12-091-0/+15
| | | | | | | |
| * | | | | | | Avoid warning because of the mime typeJorge Bejar2015-12-091-1/+1
| | | | | | | |
| * | | | | | | Do not add format key to request_paramsJorge Bejar2015-12-093-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I did this change but it is affecting how the request params end up after being processed by the router. To be in the safe side, I just take the format from the extension in the URL when is not present in those params and it's being used only for the `Request#formats` method
| * | | | | | | Adjust comment in development.rb template file for app generatorJorge Bejar2015-12-091-3/+0
| | | | | | | |
| * | | | | | | Update Changelog with the added response_format option in AD::DebugExceptionsJorge Bejar2015-12-092-0/+19
| | | | | | | |
| * | | | | | | debug_exception_response_format needs to be writeable in ConfigurationJorge Bejar2015-12-091-2/+2
| | | | | | | |
| * | | | | | | Fix indent in generated Rails API env fileJorge Bejar2015-12-091-6/+6
| | | | | | | |
| * | | | | | | Mention the debug_exception_response_format config in guidesJorge Bejar2015-12-091-0/+8
| | | | | | | |
| * | | | | | | DebugException initialize with a response_format valueJorge Bejar2015-12-093-9/+10
| | | | | | | |
| * | | | | | | Add debug_exception_response_format config to configure DebugExceptionJorge Bejar2015-12-093-30/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | behavior
| * | | | | | | Better name for method in DebugExceptions middlewareJorge Bejar2015-12-091-2/+2
| | | | | | | |
| * | | | | | | Improve regexp in AC::Http::ParametersJorge Bejar2015-12-091-1/+1
| | | | | | | |
| * | | | | | | Minor cleanup in AD::DebugExceptionsJorge Bejar2015-12-091-6/+9
| | | | | | | |
| * | | | | | | Remove unneeded args in AD::DebugExceptionsJorge Bejar2015-12-091-1/+0
| | | | | | | |
| * | | | | | | New hash syntax in AD::DebugExceptionsJorge Bejar2015-12-091-4/+4
| | | | | | | |
| * | | | | | | Fix some edge cases in AD::DebugExceptions in rails api appsJorge Bejar2015-12-092-52/+126
| | | | | | | |
| * | | | | | | Do not include web-console in Rails API appsJorge Bejar2015-12-091-0/+2
| | | | | | | |
| * | | | | | | Response when error should be formatted properly in Rails API if local requestJorge Bejar2015-12-096-10/+44
| | | | | | | |
| * | | | | | | Use URL path extension as format in bad params exception handlingJorge Bejar2015-12-082-3/+32
| |/ / / / / /
* | | | | | | Fix `make_response!` when called by `serve` in `RouteSet`eileencodes2015-12-092-6/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All of our tests were testing the `ActionController::Live` behavior in a standalone environment, without going through the router or behaving like a real application. This resulted in `ActionController::Live` throwing the exception `undefined method 'request' for #<ActionDispatch::Request:0x00000003ad1148>` because `make_response!` was expecting a response instead of a request. The expectation of a response came from `set_response!` in non-router tests setting the response and passing it to `make_response!`. In the case of an application we would hit `serve` in `RouteSet` first which would send us to `make_response!` with a request sent instead of a response. The changes here remove `set_response!` so `make_response!` always receives a request. Thanks to KalabiYau for help with the investigation and solution. Fixes #22524 [Eileen M. Uchitelle & KalabiYau]
* | | | | | | renames AS::FileEventedUpdateChecker to AS::EventedFileUpdateCheckerXavier Noria2015-12-093-6/+6
|/ / / / / / | | | | | | | | | | | | | | | | | | Better English.
* | | | | | Merge pull request #22248 from arekf/issue-22232Kasper Timm Hansen2015-12-072-1/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix #22232: rake test tasks exit status code
| * | | | | | Fix #22232: rake test tasks exit status codeArkadiusz Fal2015-12-072-1/+10
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The exit status code was not set when tests were fired with `rake`. Now, it is being set and it matches behavior of running tests via `rails` command (`rails test`), so no matter if `rake test` or `rails test` command is used the exit code will be set.
* | | | | | Clarify the need to run command twice.Kasper Timm Hansen2015-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had 2 pull requests erronously trying to remove the first command. Add some comments for clarity.
* | | | | | Change the `protect_from_forgery` prepend default to `false`eileencodes2015-12-073-9/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per this comment https://github.com/rails/rails/pull/18334#issuecomment-69234050 we want `protect_from_forgery` to default to `prepend: false`. `protect_from_forgery` will now be insterted into the callback chain at the point it is called in your application. This is useful for cases where you want to `protect_from_forgery` after you perform required authentication callbacks or other callbacks that are required to run after forgery protection. If you want `protect_from_forgery` callbacks to always run first, regardless of position they are called in your application, then you can add `prepend: true` to your `protect_from_forgery` call. Example: ```ruby protect_from_forgery prepend: true ```
* | | | | | Merge pull request #22508 from ↵Santiago Pastorino2015-12-072-0/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | y-yagi/remove_request_forgery_protection_from_rails_api remove `request_forgery_protection` initializer from rails api