Commit Graph

42241 Commits

Author SHA1 Message Date
Łukasz Strzałkowski
00a4af9ab7 Check if variant array contains only symbols 2014-02-13 18:05:55 +01:00
David Heinemeier Hansson
f2dfa83fac Merge pull request #14043 from strzalek/variants-negotiation
Variant negotiation
2014-02-13 17:24:22 +01:00
Yves Senn
ea3af7ee14 tests are responsible to clean up afterwards.
remove created state after test execution, not before the next test.
This prevents the leak of the `ex` table outside of a single test.
2014-02-13 16:45:56 +01:00
Lukasz Strzalkowski
f9b6b865e6 Variant negotiation
Allow setting `request.variant` as an array - an order in which they will be
rendered.

For example:

  request.variant = [:tablet, :phone]

  respond_to do |format|
    format.html.none
    format.html.phone # this gets rendered
  end
2014-02-13 16:22:56 +01:00
Guillermo Iguaran
de5ef15398 Merge pull request #13945 from rails/json_cookie_serializer_improvements
Cookies serializer improvements
2014-02-13 09:41:13 -05:00
Guillermo Iguaran
6a1b459ea1 Merge pull request #14029 from senny/dont_crash_on_empty_secrets_yml
do not crash when `config/secrets.yml` is blank.
2014-02-13 09:38:01 -05:00
Aaron Patterson
6e61da2dab Merge pull request #14035 from matthewd/pg_terminate_backend
Terminate the backend ourselves on PG 9.2+
2014-02-12 15:26:11 -08:00
Matthew Draper
3b645fd3ed Terminate the backend ourselves on PG 9.2+
This should make it harder to accidentally break this test.
2014-02-12 15:21:11 -08:00
Aaron Patterson
4bf7071d63 execute is a hotspot, so let's reduce branches 2014-02-12 15:19:17 -08:00
Rafael Mendonça França
4dc42045e2 Merge pull request #13761 from iainbeeston/refactor_out_render_object
Refactored object rendering in RenderingHelper#render into it's own method
2014-02-12 15:50:14 -02:00
Iain Beeston
5b793a8add Added tests to render helper that expect render partial: @foo to
automatically call @foo.to_partial_path

Calling `render @foo` allows local variables but not options to be
passed to the partial renderer. The correct way to render an object AND
pass options to the partial renderer is to pass the object in the
`:partial` parameter. However, there were previously no tests for this
behaviour (in `render_helper_test.rb` at least).
2014-02-12 17:40:52 +00:00
Yves Senn
37e30d2548 do not crash when config/secrets.yml is blank. 2014-02-12 17:17:00 +01:00
Yves Senn
8cdd93ad62 Merge pull request #14025 from xtian/rails-new-quiet
Hide bundler output for `rails new` if quiet option is specified.
2014-02-12 16:16:22 +01:00
Carlos Antonio da Silva
7d5454dcdd Merge pull request #14026 from sferik/rbx-2
Update Travis settings for Rubinius
2014-02-12 10:12:13 -02:00
Erik Michaels-Ober
af66c4697c Update Travis settings for Rubinius
/cc @brixen
2014-02-12 12:55:47 +01:00
Carlos Antonio da Silva
6d14c222dd Merge pull request #14023 from prathamesh-sonpatki/assert_redirected_to
[Testing Guide] Explain usage of assert_redirected_to with named routes and ActiveRecord objects [ci skip]
2014-02-12 09:48:27 -02:00
Prathamesh Sonpatki
42b2e3276b [Testing Guide] Explain usage of assert_redirected_to with named routes and Active Record objects [ci skip] 2014-02-12 15:49:51 +05:30
Christian Wesselhoeft
2c7471a95d Hide bundler output for rails new if quiet option is specified. 2014-02-11 23:12:38 -08:00
kayvan
f34e0c4a20 adding missed change 2014-02-11 15:00:01 -08:00
kayvan
2862cd8e11 adding connection parameter to check_pending for migrations 2014-02-11 14:59:51 -08:00
Aaron Patterson
c5034d60db add a send so apply can be called. Fixes #13510
THIS IS A HUGE HACK.  Thor does not allow us to define public methods
without turning them in to "thor tasks".  That means we cannot subclass
the `apply` method and make it public, so we have to make the method
private and call `send` on it.
2014-02-11 14:08:12 -08:00
Xavier Noria
e00ab2dab9 Revert "Don't symbolize tainted data." [ci skip]
Reason: i18n whitelists now locales without passing through symbols,
see https://github.com/svenfuchs/i18n/blob/master/lib/i18n.rb#L278.
Therefore, this snippet is no longer a good practice.

This reverts commit ec0664a6eb8906fcd31a53a1efad69bdc7fe6f5b.
2014-02-11 17:18:19 +01:00
Xavier Noria
4359bc6a7a Merge pull request #14016 from devlinzed/i18n_doc_fix
Documentation: Don't symbolize tainted data. [ci skip]
2014-02-11 17:07:17 +01:00
devlin zed
ec0664a6eb Don't symbolize tainted data.
`I18n.locale=` symbolizes its argument, so passing it `params[:locale]`
allows one to DOS your application by visiting `...?locale=` URLS
repeatedly, with unique values, until the never-GCed symbols monopolize
the available memory.
2014-02-11 10:44:45 -05:00
Guillermo Iguaran
b12c1b858e Merge pull request #14015 from acapilleri/add_patch
add patch in HTTP Verb Constraints [ci skip]
2014-02-11 10:34:00 -05:00
Angelo capilleri
3a0cc5c059 add patch in HTTP Verb Constraints [ci skip] 2014-02-11 16:30:47 +01:00
Yves Senn
4b11dcca74 test case to illustrate current PostgreSQL composite behavior. 2014-02-11 13:58:41 +01:00
Vijay Dev
888386ac13 Merge pull request #13571 from bak/getting_started_guide
A pass over the Getting Started guide sections 1, 2, and 3 [ci skip]
2014-02-11 17:49:01 +05:30
Godfrey Chan
dafc0eef4d rm warning about variable shadowing 2014-02-11 03:56:35 -08:00
Godfrey Chan
7a3ef9842b Migrate hash-based cookie values correctly 2014-02-11 02:56:03 -08:00
Godfrey Chan
0b86a6e950 Updated CHANGELOG, docs, guides and release notes.
Also added a `cookies_serializer.rb` initializer to the app template.
2014-02-11 02:52:07 -08:00
Godfrey Chan
ecf04f19b0 Added changelog entry for Flash changes [ci skip] 2014-02-11 01:54:58 -08:00
Godfrey Chan
9fc7a6fced Missed FlashHash#replace 2014-02-11 01:54:18 -08:00
Godfrey Chan
b97e087321 Fixed broken flash tests 2014-02-11 01:54:17 -08:00
Guillermo Iguaran
cd5960e976 Fix AppGeneratorTest: serializer option was removed from session_store 2014-02-11 01:54:17 -08:00
Guillermo Iguaran
3a89386fcf Remove serializer option from session_store.rb template 2014-02-11 01:54:17 -08:00
Godfrey Chan
ead947a3b2 Re-write legacy (marshal) cookies on read 2014-02-11 01:54:17 -08:00
Guillermo Iguaran
a668beffd6 Stringify the incoming hash in FlashHash
Stringify the incoming as well to handle incoming symbol keys from
marshalled sessions
2014-02-11 01:54:17 -08:00
Guillermo Iguaran
a6ce984b49 Convert FlashHash in a Hash with indifferent access 2014-02-11 01:54:17 -08:00
Godfrey Chan
ba6861d032 Changed the tests to ensure HybridSerializer actually migrates the cookies (currently failing) 2014-02-11 01:54:17 -08:00
Godfrey Chan
6de4888e04 Fixed minor typo in test code 2014-02-11 01:54:17 -08:00
Rafael Mendonça França
d4b7aa735a Tests for the HybridSerializer 2014-02-11 01:54:17 -08:00
Godfrey Chan
25f68ac6a2 Removed an old test 2014-02-11 01:54:17 -08:00
Godfrey Chan
fafe8ece9d Added HybridSerializer to upgrade existing marshal cookies (wip: need tests) 2014-02-11 01:54:16 -08:00
Godfrey Chan
54641fa2e3 Just very so slightly better test coverage 2014-02-11 01:54:16 -08:00
Godfrey Chan
b927d67dec Renamed session_serializer option to cookies_serializer 2014-02-11 01:54:16 -08:00
Carlos Antonio da Silva
f0d8996dcc Merge pull request #14008 from udaykadaboina/jqueryUpgrade
Upgraded jquery-rails gem version
2014-02-11 07:21:37 -02:00
Yves Senn
92f567ab30 docs, hide inflector comment targeting only contributors. [ci skip]
This is a follow up to: 07c70245a1

As suggested by @fxn this comment should not be visible in the API:
07c70245a1 (commitcomment-5331658)
2014-02-11 09:08:16 +01:00
Rafael Mendonça França
488885a223 Merge pull request #14007 from kintamanimatt/missing_directory_slashes
Add missing directory slashes [ci skip]
2014-02-10 21:05:49 -02:00
Matthew Nicholas Bradley
67e6deea1c Add missing directory slashes [ci skip] 2014-02-10 22:55:37 +00:00