aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Refactor handling of :action default in routingAndrew White2016-02-168-32/+74
| | | | | | | | | | | | | | | | | | | | | The longstanding convention in Rails is that if the :action parameter is missing or nil then it defaults to 'index'. Up until Rails 5.0.0.beta1 this was handled slightly differently than other routing defaults by deleting it from the route options and adding it to the recall parameters. With the recent focus of removing unnecessary duplications this has exposed a problem in this strategy - we are now mutating the request's path parameters and causing problems for later url generation. This will typically affect url_for rather a named url helper since the latter explicitly pass :controller, :action, etc. The fix is to add a default for :action in the route class if the path contains an :action segment and no default is passed. This change also revealed an issue with the parameterized part expiry in that it doesn't follow a right to left order - as soon as a dynamic segment is required then all other segments become required. Fixes #23019.
* Merge pull request #23692 from abhishekjain16/docsYves Senn2016-02-163-3/+3
|\ | | | | Use a URL instead of an URL everywhere
| * Use a URL instead of an URL everywhereAbhishek Jain2016-02-153-3/+3
| |
* | Merge pull request #23706 from vipulnsward/add-changelog-for-regressionYves Senn2016-02-161-2/+9
|\ \ | | | | | | | | | Add missing CHANGELOG for regression fix in #18155 which fixes #13387
| * | Add missing CHANGELOG for regression fix in #18155 which fixes #13387Vipul A M2016-02-161-0/+7
| | | | | | | | | | | | [ci skip]
* | | Remove unused test controller actionAndrew White2016-02-161-5/+0
| | |
* | | Merge pull request #22828 from ma2gedev/should-escape-cookieAndrew White2016-02-162-1/+21
|\ \ \ | | | | | | | | | | | | A cookie value is incorrect if value contains an escapable string in Rails 5 ActionController::TestCase
| * | | Join values using '; ' as per RFC specAndrew White2016-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiple cookie values should be separated by '; ' according to RFC 6265, section 5.4.4[1]. [1]: https://tools.ietf.org/html/rfc6265#section-5.4
| * | | Add require and move escape to private methodAndrew White2016-02-161-1/+6
| | | |
| * | | Move test for #22828 into it's own testAndrew White2016-02-161-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | The `cookies` hash isn't updated with the value generated by the output from `to_header` so it wasn't testing anything. Rendering the cookie value in the controller makes sure that the escaping is actually working.
| * | | Merge branch 'should-escape-cookie' of https://github.com/ma2gedev/rails ↵Andrew White2016-02-162-1/+8
|/| | | | | | | | | | | | | | | into ma2gedev-should-escape-cookie
| * | | Escape cookie's key and value in ActionController::TestCaseTakayuki Matsubara2015-12-302-1/+8
| | | | | | | | | | | | | | | | | | | | Get an incorrect cookie value in controller action method if cookie value contains an escapable string.
* | | | fix more failing tests due to 07e422f ... :pray:Yves Senn2016-02-151-2/+2
| | | |
* | | | fixing the build take II. :sweat:Yves Senn2016-02-151-1/+1
| | | |
* | | | fix build broken by 07e422f58d61da0.Yves Senn2016-02-151-1/+1
| | | |
* | | | Merge pull request #23631 from y-yagi/generate_mailer_views_in_apiYves Senn2016-02-154-4/+20
|\ \ \ \ | | | | | | | | | | generate mailer views in Rails API
| * | | | generate mailer views in Rails APIyuuji.yaginuma2016-02-154-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | View files is necessary to send mail, it should be generated even Rails API. Fixes #23617
* | | | | test runner, relay minitest information about the error location.Yves Senn2016-02-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to ea70c29 to bring back the assertion error location information provided by minitest.
* | | | | Revert "Prefer Minitest's location for test failures."Yves Senn2016-02-152-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0db310586ac3e15be95d2ef27ff40cfa24c05c10. Closes #23686. Conflicts: railties/test/application/test_runner_test.rb It's possible that the `result.location` returned by minitest is outside the test file itself. For example in the case of mocha. This resulted in bad rerun snipptets: ``` bin/rails test app/models/deliveries/delivery.rb:103 ``` Let's always use the first line of the failed test-case in our rerun snippet. We can display the line number of the assertion error elsewhere.
* | | | | Merge pull request #23688 from meinac/guide_typo_fixEileen M. Uchitelle2016-02-153-3/+3
|\ \ \ \ \ | | | | | | | | | | | | Fix small typo in i18n guide [ci skip]
| * | | | | Fix small typo in Rails guides [ci skip]Mehmet Emin İNAÇ2016-02-153-3/+3
| | |_|/ / | |/| | |
* | | | | Merge pull request #23687 from vipulnsward/add-on-weekdayDavid Heinemeier Hansson2016-02-154-1/+24
|\ \ \ \ \ | | | | | | | | | | | | Add `#on_weekday?` method to `Date`, `Time`, and `DateTime`.
| * | | | | Add `#on_weekday?` method to `Date`, `Time`, and `DateTime`.Vipul A M2016-02-154-1/+24
| | | | | |
* | | | | | Merge pull request #23684 from vs4vijay/masterEileen M. Uchitelle2016-02-151-1/+1
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Corrected secret_key_base
| * | | | | Corrected secret_key_basevs4vijay2016-02-151-1/+1
|/ / / / /
* | | | | Merge pull request #23569 from Gaurav2728/no_doc_of_some_railtie_methodsVipul A M2016-02-151-4/+7
|\ \ \ \ \ | | | | | | | | | | | | mark as #:nodoc: [ci skip]
| * | | | | mark as #:nodoc: [ci skip]Gaurav Sharma2016-02-151-4/+7
| | | | | | | | | | | | | | | | | | can’t be instantiate directly or may be no need for doc.
* | | | | | Merge pull request #23664 from y-yagi/remove_test_order_from_environment_fileYves Senn2016-02-151-3/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | remove `active_support.test_order` from environment file
| * | | | | | remove `active_support.test_order` from environment fileyuuji.yaginuma2016-02-141-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default test order has been changed to `:random` in 5f777e4b5ee2e3e8e6fd0e2a208ec2a4d25a960d. Therefore, it is no more need to be specified in the environment file.
* | | | | | | Merge pull request #23667 from meinac/remove_override_methodYves Senn2016-02-151-13/+0
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | Remove the method already overridden by private method
| * | | | | | Remove the method already overridden by private methodMehmet Emin İNAÇ2016-02-141-13/+0
| |/ / / / /
* | | | | | Merge pull request #23670 from yui-knk/update_dalliYves Senn2016-02-151-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update dalli gem
| * | | | | | Update dalli gemyui-knk2016-02-141-1/+1
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dalli 2.7.6 fixed deprecation warning caused by using `Rack::Session::Abstract::ID`. This commit suppress warnings on ActionPack tests. See: https://github.com/petergoldstein/dalli/commit/9874a7c3ad67eb1e31cafba0a51966db4f0c7e42
* | | | | | Merge pull request #23678 from kamipo/remove_deprecated_never_unpermitted_paramsEileen M. Uchitelle2016-02-142-16/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove `const_missing` which fallback to deprecated `NEVER_UNPERMITTED_PARAMS`
| * | | | | | Remove `const_missing` which fallback to deprecated `NEVER_UNPERMITTED_PARAMS`Ryuta Kamizono2016-02-152-16/+0
|/ / / / / / | | | | | | | | | | | | | | | | | | `NEVER_UNPERMITTED_PARAMS` is deprecated in Rails 4.2. See #15933.
* | | | | | Merge pull request #23505 from kaspth/inject-rails-config-through-railtieKasper Timm Hansen2016-02-146-54/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | Inject Rails related configuration through Railtie
| * | | | | | Don't rely on the global server as a receiver.Kasper Timm Hansen2016-02-143-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `WorkerTest`'s `Receiver` is imporsonating an `ActionCable::Connection::Base`, but just delegates the logger to `ActionCable.logger`. This creates a mismatch as the connection requires the logger to be a `TaggedLoggerProxy`'ied logger, while the server doesn't. Thus to ensure an exception isn't raised when the worker tries to call `tag` other tests have to assign a proxied logger to their test server. Instead of forcing change on other tests, have Receiver adhere to the connection contract and use a `TaggedLoggerProxy`. As a consequence remove more setup from the tests.
| * | | | | | Default connection class to ActionCable::Connection::Base.Kasper Timm Hansen2016-02-144-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of depending on ApplicationCable::Connection being defined at initialize we should inject it in the Railtie. Thus we can kill more setup in the tests too.
| * | | | | | Inject Rails' channel paths in engine.Kasper Timm Hansen2016-02-145-26/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were explicitly referencing Rails.root in ActionCable::Server::Configuration.initialize, thereby coupling ourselves to Rails. Instead add `app/channels` to Rails' app paths and assign the existent files to `channel_paths`. Users can still append to those load paths with `<<` and `push` in `config/application.rb`. This means we can remove the custom `Dir` lookup in `channel_paths` and the Rails and root definitions in the tests.
* | | | | | | Merge pull request #23674 from xw19/dev-tools-updateJon Moss2016-02-141-0/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [ci skip] line_statistics added to README
| * | | | | | | [ci skip] line_statistics added to READMESourav Moitra2016-02-141-0/+1
|/ / / / / / /
* | | | | | | Merge pull request #23648 from xw19/link_to-data-nil-testYves Senn2016-02-142-0/+7
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | Link to data nil test
| * | | | | | Test to check if the data-attr if nil is same or notSourav Moitra2016-02-142-0/+7
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if data attribute is nil it is ignored if value is nil the pair is ignored if value is nil it is skipped Improved test for data attr nil
* | / / / / restores the guides layout header [ci skip]Xavier Noria2016-02-131-1/+11
| |/ / / / |/| | | |
* | | | | Merge pull request #23660 from meinac/change_x_gzip_to_gzipJon Moss2016-02-132-3/+3
|\ \ \ \ \ | | | | | | | | | | | | Change x-gzip to gzip in docs [ci skip]
| * | | | | Change x-gzip to gzip in docs [ci skip]Mehmet Emin İNAÇ2016-02-132-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | For more information about GNU zip mime type please check IETF's web site [RFC6713](http://tools.ietf.org/html/rfc6713) or [IANA](http://www.iana.org/assignments/media-types/media-types.xhtml#application)
* | | | | | Merge pull request #23377 from bogdan/last-with-sqlEileen M. Uchitelle2016-02-134-17/+78
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix AR::Relation#last bugs instroduced in 7705fc
| * | | | | | Make ActiveRecord::Relation#last to reverse SQL orderBogdan Gusiev2016-02-134-17/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of loading the relation into memory
* | | | | | | Merge pull request #23654 from kamipo/fix_grammar_a_to_anJon Moss2016-02-1314-14/+14
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | Fix grammar `a` to `an` [ci skip]
| * | | | | | Fix grammar `a` to `an` [ci skip]Ryuta Kamizono2016-02-1314-14/+14
| | | | | | |