aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
Commit message (Collapse)AuthorAgeFilesLines
* Revert grep to select since they are not the sameBrian McManus2013-03-271-3/+2
| | | | | | | | | | | | | | | | | A previous commit swapped out a call to select for a call to grep in time_zone_options_for_select. This behavior actually causes the regexp priority option to stop working. ActiveSupport::TimeZone overrides the =~ operator which is what the select block was using previously. Enumerable#grep checks pattern === element and in this case that would be /US/ === ActiveSupport::TimeZone which does not work because ActiveSupport::TimeZone does not supply an implicit converting to_str method, only an explicit to_s method. It would be impossible to provide a to_str method that behaves identically to the =~ method provided on ActiveSupport::TimeZone so the only option is to revert back to using select with =~.
* Merge pull request #8458 from ↵Rafael Mendonça França2013-03-272-0/+38
|\ | | | | | | | | | | | | | | | | lucisferre/improve-layout-override-fallback-behavior Provides standard layout lookup behavior for method and proc cases Conflicts: actionpack/CHANGELOG.md
| * Provides standard layout lookup behavior for method and proc casesChris Nicola2013-03-272-0/+38
| | | | | | | | | | | | | | When setting the layout either by referencing a method or supplying a Proc there is no way to fall back to the default lookup behavior if desired. This patch allows fallback to the layout lookup behavior when returning nil from the proc or method.
* | Skipping test for OpenSSL::PKCS5 JRubyArun Agrawal2013-03-251-0/+10
| |
* | Update tests for #9704, named route collisionsJeremy Kemper2013-03-242-6/+7
| | | | | | | | | | * Fix named route collision in mount test fixture * Update controller named route precedence test
* | Introduce UpgradeLegacySignedCookieJar to transparently upgrade existing ↵Trevor Turk2013-03-241-0/+55
| | | | | | | | signed cookies generated by Rails 3 to avoid invalidating them when upgrading to Rails 4
* | Merge pull request #9704 from trevorturk/warn-about-skipped-routesJeremy Kemper2013-03-241-19/+18
|\ \ | | | | | | Raise an ArgumentError when a clashing named route is defined
| * | Raise an ArgumentError when a clashing named route is definedTrevor Turk2013-03-191-19/+18
| | |
* | | Changed 'args' to 'arguments' in test descriptionPrathamesh Sonpatki2013-03-242-2/+2
| | |
* | | Merge pull request #9802 from newsline/fix-broken-action-missingRafael Mendonça França2013-03-201-0/+12
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Fix missing action_missing Conflicts: actionpack/CHANGELOG.md
| * | Fix broken ActionController#action_missingJanko Luin2013-03-201-0/+12
| | | | | | | | | | | | | | | A recent change introduced the assumption that all controller actions are known beforehand, which is not true when using action_missing.
* | | Fix improperly configured host in generated urlsschneems2013-03-191-0/+8
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the host in `default_url_options` is accidentally set with a protocol such as ``` host: "http://example.com" ``` then the generated url will have the protocol twice `http://http://example.com` which is not what the user intended. Likely they wanted to define a host `host: "example.com"` and a `protocol: "http://"` but did not know the convention. This may not the most common problem, but when it happens it can go undetected for a while. I accidentally added `http://` out of habit recently only to find all the links in my emails were broken after deploying a demo site to production. Rather than allow this accident go undetected, we can fix the problem in line by properly setting the protocol and host. I was able to find this related question on stack overflow: http://stackoverflow.com/questions/5878329/rails-3-devise-how-do-i-make-the-email-confirmation-links-use-secure-https-n where the answer was highly upvoted. This is based off of work in #7415 cc/ @pixeltrix ATP Action Mailer and Action Pack
* | Digest auth should not 500 when given a basic header.Brad Dunbar2013-03-181-0/+8
| |
* | Merge branch 'master-sec'Aaron Patterson2013-03-181-0/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | * master-sec: fix protocol checking in sanitization [CVE-2013-1857] JDOM XXE Protection [CVE-2013-1856] fix incorrect ^$ usage leading to XSS in sanitize_css [CVE-2013-1855] stop calling to_sym when building arel nodes [CVE-2013-1854]
| * | fix protocol checking in sanitization [CVE-2013-1857]Aaron Patterson2013-03-151-0/+10
| | |
| * | fix incorrect ^$ usage leading to XSS in sanitize_css [CVE-2013-1855]Charlie Somerville2013-03-151-0/+5
| | |
* | | Merge pull request #9753 from jbarreneche/bug/render-locale-fallbacksCarlos Antonio da Silva2013-03-181-0/+9
|\ \ \ | | | | | | | | i18n locale fallback for localized views
| * | | Include I18n fallbacks in :locale lookup contextJuan Barreneche2013-03-161-0/+9
| | | |
* | | | remove ancient TODOs [ci skip].Yves Senn2013-03-182-3/+0
| | | |
* | | | Merge pull request #9754 from macksmind/fix_actionpack_warningsRafael Mendonça França2013-03-171-1/+1
|\ \ \ \ | | | | | | | | | | Fix rake test warnings in actionpack
| * | | | Fix rake test warnings in actionpackMack Earnhardt2013-03-171-1/+1
| |/ / /
* / / / Allow pass multipart option to form_forGrzegorz Derebecki2013-03-171-2/+2
|/ / /
* | | Merge pull request #5606 from teohm/multipart_unicode_param_nameSteve Klabnik2013-03-153-1/+30
|\ \ \ | | | | | | | | multipart POST - utf8 param name not encoded
| * | | UTF-8 encode all keys and values in nested params hash.Teo Hui Ming2013-03-153-1/+30
| | | |
* | | | `Http::Headers` directly modifies the passed environment.Yves Senn2013-03-152-6/+38
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | The env hash passed to `Http::Headers#new` must be in env format. Also be aware that the passed hash is modified directly. docs and test-cases for setting headers/env in functional tests. Follow up to #9700.
* | | Handle conditional get in live requests - this will prevent error when using ↵Bernard Potocki2013-03-141-0/+15
| | | | | | | | | | | | stale on live streams(issue #9636)
* | | `Http::Headers` respects dotted env vars, symbols, headers with numbers.Yves Senn2013-03-131-0/+27
| | |
* | | allow headers and env to be passed in `IntegrationTest`.Yves Senn2013-03-132-1/+59
| | | | | | | | | | | | Closes #6513.
* | | refactor, `Http::Headers` stores headers in env notationYves Senn2013-03-131-12/+21
| | | | | | | | | | | | | | | Also: cleanup, use consistent syntax for `Http::Header` and test.
* | | Http::Headers respects headers that are not prefixed with HTTP_Yves Senn2013-03-131-6/+13
| | |
* | | Change from each to each_value on hash to avoid unused variable warningVipul A M2013-03-111-1/+1
| | |
* | | Fix incorrectly appended square brackets to a multiple select boxOlek Janiszewski2013-03-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an explicit name has been given and it already ends with "[]" Before: select(:category, [], {}, multiple: true, name: "post[category][]") # => <select name="post[category][][]" ...> After: select(:category, [], {}, multiple: true, name: "post[category][]") # => <select name="post[category][]" ...>
* | | Fix warningsCarlos Antonio da Silva2013-03-071-2/+2
| | |
* | | Merge pull request #9464 from jcoyne/assert_template_fileRafael Mendonça França2013-03-071-0/+35
|\ \ \ | | | | | | | | Allow use of assert_template with the :file option.
| * | | Allow use of assert_template with the :file option.Justin Coyne2013-03-011-0/+35
| | | | | | | | | | | | | | | | This worked in Rails 3.2, but was a regression in 4.0.0.beta1
* | | | Add missing require to debug helper testCarlos Antonio da Silva2013-03-051-2/+2
| | | |
* | | | Add DebugHelperTestrobertomiranda2013-03-051-0/+8
| |/ / |/| |
* | | Fix formats on xhr requests when HTTP_ACCEPT is empty stringmaximerety2013-03-041-0/+5
| | | | | | | | | | | | | | | | | | Fix ActionDispatch::Request#formats on xhr requests when HTTP_ACCEPT header is empty string. About issue #7774, same fix as in commit bebb02f but for xhr requests.
* | | Use custom visitor class for optimized url helpersAndrew White2013-03-031-0/+6
|/ / | | | | | | | | | | | | | | Rather than trying to use gsub to remove the optional route segments, which will fail with nested optional segments, use a custom visitor class that returns a empty string for group nodes. Closes #9524
* | Merge pull request #9366 from killthekitten/fix-content_for-regressionRafael Mendonça França2013-02-281-0/+4
|\ \ | | | | | | Fix for #9360 content_for regression
| * | Fix #9360 regression in content_forNikolay Shebanov2013-02-251-0/+4
| | |
* | | `format: true` does not override existing format constraints.Yves Senn2013-02-271-0/+24
| | | | | | | | | | | | | | | | | | | | | Closes #9466. Passing `format: true` used to override the constraints: { format: /json/ } with `/.+/`. This patch only sets the format if there is no constraint present.
* | | Merge pull request #9218 from Fivell/masterCarlos Antonio da Silva2013-02-271-0/+14
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix calculation of db_runtime property in ActiveRecord::Railties::ControllerRuntime#cleanup_view_runtime. Previously, after raising ActionView::MissingTemplate, db_runtime was not populated. Closes #9218, Fixes #9215. Conflicts: activerecord/CHANGELOG.md
| * | | fix db_runtime attribute value after raising ActionView::MissingTemplate ↵Igor2013-02-271-0/+14
| | | | | | | | | | | | | | | | exception
* | | | cleanup AP number_helpers_testYves Senn2013-02-271-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | * use 1.9 style hash syntax * don't use brances on assert_equal * prefere " over '
* | | | remove duplicated number_helper tests in AP. They are already in AS.Yves Senn2013-02-271-270/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With 155cd5e6 the number_helpers were moved into AS all the tests were copied over but the tests in AP were not deleted. This is confusing. I removed all duplicated tests and reorganized the tests in AP to only test the functionality, that is added in AP.
* | | | allow non-String default params in the router.Yves Senn2013-02-261-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #9435. Skip valid encoding checks for non-String parameters that come from the matched route's defaults.
* | | | the router allows String contraints.Yves Senn2013-02-261-0/+36
| | | | | | | | | | | | | | | | Closes #9432.
* | | | Merge pull request #9434 from zires/devRafael Mendonça França2013-02-261-0/+4
|\ \ \ \ | | | | | | | | | | Journey::Path::Pattern#new raise more meaningful exception message.
| * | | | Make ActionDispatch::Journey::Path::Pattern#new raise more meaningful ↵zires2013-02-271-0/+4
| | | | | | | | | | | | | | | | | | | | exception message.