Commit Graph

11681 Commits

Author SHA1 Message Date
Rafael Mendonça França
be5521eb4e Use released rails-dom-testing 2014-10-16 16:53:46 -03:00
Yves Senn
400b0818fa some changelog formatting. [ci skip] 2014-10-16 09:11:41 +02:00
Yuutetu
5a10b417cd Fix typo in actionpack/lib/action_dispatch/routing/mapper.rb 2014-10-16 08:50:45 +09:00
Rafael Mendonça França
ba769cc483 Merge pull request #17255 from printercu/cors_exception_wrapper
ActionController::InvalidCrossOriginRequest fails with 422 instead of 500
2014-10-15 16:03:46 -03:00
Nicolas Cavigneaux
1c7dd65637 Use #tr instead of #gsub
`#tr` is more efficient than `#gsub` and can be used as a drop in
replacement in this context.
2014-10-14 22:32:23 +02:00
Max Melentiev
7a7ccc31e7 ActionController::InvalidCrossOriginRequest fails with 422 instead of 500
Fixes #15967
2014-10-14 18:56:51 +03:00
Nicolas Cavigneaux
3041bb2a94 Improve Journey compliance to RFC 3986
The scanner in Journey fails to recognize routes that use literals
from the sub-delims section of RFC 3986.

This commit enhance the compatibility of Journey with the RFC by
adding support of authorized delimiters to the scanner.

Fix #17212
2014-10-14 16:42:50 +02:00
Rafael Mendonça França
c0c5f30d41 Merge pull request #17234 from arthurnn/add_regression_for_path_and_cascade
Add regression test for router was overwriting PATH_INFO
2014-10-13 10:08:18 -03:00
Erik Michaels-Ober
2b6bacd192 Replace Array#shuffle.first with Array#sample 2014-10-13 11:54:04 +01:00
Arthur Neves
707e2e8858 Add regression test for router was overwriting PATH_INFO
[related #17233]
2014-10-10 19:05:36 -04:00
Stefan Henzen
e86cadc257 Request#check_method no longer breaks when :en is not available locale
Request#check_method would use to_sentence(locale: :en), which breaks when
I18n.available_locales does not include :en and
I18n.enforce_available_locales is true (default).

Inlined to_sentence functionality to solve this.
2014-10-09 15:45:49 +02:00
Neeraj Singh
590efa49cc Rephrasing sentences 2014-10-07 09:23:51 -04:00
Rafael Mendonça França
7b740f31cc Merge pull request #17088 from robin850/jruby-dev
Follow up to #16613
2014-10-01 22:56:08 -03:00
claudiob
eddd4d4e80 Remove RUNNING UNIT TESTS from ActionPack
[ci skip]

Following discussion with @senny https://github.com/rails/rails/pull/17100#issuecomment-57285273
it only makes sense to keep this file form projects that require
extra instructions.
2014-09-30 02:00:03 -07:00
Akira Matsuda
fe88af61f6 Responder was removed at ee77770d57de9da87b05a2fe84b9d46ec6852c62 2014-09-30 17:21:48 +09:00
Kasper Timm Hansen
f939904f23 Parse HTML as document fragment.
This is to match the changes in Rails Dom Testing rails/rails-dom-testing#20.
2014-09-29 21:41:52 +02:00
Erik Michaels-Ober
e2b49b203f Use Hash#each_key instead of Hash#keys.each
Hash#keys.each allocates an array of keys; Hash#each_key iterates through the
keys without allocating a new array. This is the reason why Hash#each_key
exists.
2014-09-29 17:27:10 +02:00
Robin Dupret
1fac7b79f3 Follow up to #16613
Since we want this flag to be enabled anytime we are running the tests
under JRuby, let's enable this at the Rakefile level so people get the
performance boost on their local checkout.

Moreover, we avoid having to update this particular line anytime the
option changes on the JRuby side.

The only drawback is that we have to define it in every Rakefile but
there's no big deal, this is already the case for other options.
2014-09-28 12:04:06 +02:00
Vijay Dev
3a9b3ba082 Merge branch 'master' of github.com:rails/docrails 2014-09-28 06:11:30 +00:00
Rafael Mendonça França
4581d04477 Preparing for 4.2.0.beta2 release 2014-09-26 17:19:53 -03:00
Rafael Mendonça França
4af5899e25 Revert "Merge pull request #16966 from why-el/symbolize-path-params"
This reverts commit 9d05d6de52871e57bfbf54a60de005e8a5f5b0e4, reversing
changes made to 0863c9248fd47a15e88e05ce4fcd80966684c0e3.

The change in the behaviour reported at #16958 doesn't exist since 4.0
and 4.1 works in the same way
2014-09-25 18:07:22 -03:00
Mohamed Wael Khobalatte
f10b38bbc8 Ensure named path params are symbols (Fixes #16958) 2014-09-25 17:40:26 -03:00
Rafael Mendonça França
0863c9248f No need CHANGLOG entry for a bug in a non released version
[ci skip]
2014-09-25 17:21:55 -03:00
Rafael Mendonça França
bc644c54d6 Keep the original implementation to not having to allocate new objects 2014-09-25 17:20:52 -03:00
Rafael Mendonça França
f82ecef9ae Merge pull request #17058 from eval/issue-17057
Remove internal options from query string of paths
2014-09-25 17:15:00 -03:00
Godfrey Chan
391cfc2054 Fix actionpack test cases broken by #16888 2014-09-26 01:42:18 +09:00
Godfrey Chan
b008e4bd8a Use released rails-html-sanitizer and rails-deprecated_sanitizer 2014-09-26 01:37:05 +09:00
Gert Goet
2d08fd2506 Remove internal options from query string of paths
Fixes #17057
2014-09-25 17:50:16 +02:00
Rafael Mendonça França
2c0cad8034 Use released rails-dom-testing 2014-09-25 12:31:42 -03:00
Steven Harman
6c941ea405 Consistently markup etag options. 2014-09-16 15:24:24 -04:00
Steven Harman
2210521040 Consistently capitalize ETag. 2014-09-16 15:23:24 -04:00
Yuki Nishijima
75eaefcc2f Rescue Rack::Utils::ParameterTypeError instead of TypeError
As of rack/rack@167b648023, Rack raises
Rack::Utils::ParameterTypeError which inherits TypeError.

In terms of the behavior, Rescuing TypeError still works but this
method shouldn't rescue if TypeError is raised for other reasons.
2014-09-13 16:54:20 -07:00
Rafael Mendonça França
412f651665 Merge pull request #16839 from chancancode/default_test_order
Default to sorting user's test cases for now
2014-09-10 22:34:06 -03:00
suginoy
4f6f43338f [ci skip]Correct variables in the sample code 2014-09-10 22:20:26 +09:00
Prathamesh Sonpatki
29a10173e2 Remove extra 'has been' from deprecation warning about asserting selectors
[ci skip]
2014-09-09 11:08:18 +05:30
Prathamesh Sonpatki
ceb9ca2193 Remove extra 'has been' from the deprecation message
- [ci skip]
2014-09-09 10:47:40 +05:30
Godfrey Chan
2b41343c34 Default to sorting user's test cases for now
Goals:

1. Default to :random for newly generated applications
2. Default to :sorted for existing applications with a warning
3. Only show the warning once
4. Only show the warning if the app actually uses AS::TestCase

Fixes #16769
2014-09-08 05:32:16 -07:00
Thiago Pradi
90c06717bc Removing unused fake models 2014-09-07 22:51:14 -03:00
Javan Makhmali
66f8997671 Add support for Rack::ContentLength middelware 2014-09-06 12:33:29 -04:00
Jeremy Kemper
2a78d6f561 Deprecate implicit AD::Response splatting and Array conversion 2014-09-06 07:05:59 -07:00
Rafael Mendonça França
31bfcdc77c ✂️ 2014-09-05 16:47:57 -03:00
Rafael Mendonça França
67117f7c5d Add test to assert_recognizes with custom message 2014-09-05 16:47:00 -03:00
Rafael Mendonça França
2bb19fa739 Message doesn't need to be optional 2014-09-05 16:46:52 -03:00
Rafael Mendonça França
3f720d580f Merge pull request #14911 from estsauver/14908
Propagate test messages through assert_routing helper, Fixes #14908
2014-09-05 16:43:14 -03:00
Matthew Draper
7025d7769d For now, we will keep sorting the tests.
This reverts commits e969c928463e329fd6529ac59cad96385c538ffb and
bd2b3fbe54e750ba97469a7896e8d143d6dfd465.
2014-09-05 23:33:27 +09:30
Xavier Noria
4dfe140ef3 code gardening in ActionController::Renderers
* Renames _handle_render_options to _render_to_body_with_renderer, which is more
  intention-revealing.

* The name of the dynamically generated method for a renderer with key :js was
  "_render_option_js".

  That name is too weak. :js is an option if you see the render argument as just
  a generic options hash, but in the context of renderers that's the renderer
  key, is what identifies the renderer.

  Now "_render_with_renderer_js" is generated instead, which is crystal clear.

* The name of the dynamically generated method for the renderer was constructed
  using string literals in a few places. That is now encapsulated in a method.

* Since we were on it, also removed a couple of redundant selfs.
2014-09-04 00:45:01 +02:00
Kasper Timm Hansen
28eecd934b Ship with rails-html-sanitizer instead. 2014-09-03 20:27:59 +02:00
Matthew Draper
2f52f96988 Leave all our tests as order_dependent! for now
We're seeing too many failures to believe otherwise.

This reverts commits bc116a55ca3dd9f63a1f1ca7ade3623885adcc57,
cbde413df3839e06dd14e3c220e9800af91e83ab,
bf0a67931dd8e58f6f878b9510ae818ae1f29a3a, and
2440933fe2c27b27bcafcd9019717800db2641aa.
2014-09-02 23:55:34 +09:30
Sammy Larbi
2fae37f0ac Allow polymorphic routes with nil when a route can still be drawn
Suppose you have two resources routed in the following manner:

```ruby
resources :blogs do
  resources :posts
end

resources :posts
```

When using polymorphic resource routing like `url_for([@blog, @post])`, and `@blog` is `nil` Rails should still try to match the route to the top-level posts resource.

Fixes #16754
2014-08-31 11:39:46 -05:00
Robin Dupret
84c0f73c8d Refer to the library name instead of the constant
When we are loading a component and we want to know its version, we are
actually not speaking about the constant but the library itself.

[ci skip]

[Godfrey Chan & Xavier Noria]
2014-08-30 11:58:23 +02:00