Commit Graph

16498 Commits

Author SHA1 Message Date
wycats
d7f6f2b596 Now that we always return a proxy from mb_chars, even in 1.9, all Strings coming back from AS are UTF-8. 2010-05-29 21:20:52 +02:00
Santiago Pastorino
e5a56eb297 fix translation test in actionpack [#4701 state:commited]
Signed-off-by: wycats <wycats@gmail.com>
2010-05-29 21:12:28 +02:00
wycats
45e60283e7 Removing Metal from Rails 3.
If you have existing Metals, you have a few options:
* if your metal behaves like a middleware, add it to the
  middleware stack via config.middleware.use. You can use
  methods on the middleware stack to control exactly where
  it should go
* if it behaves like a Rack endpoint, you can link to it
  in the router. This will result in more optimal routing
  time, and allows you to remove code in your endpoint
  that matches specific URLs in favor of the more powerful
  handling in the router itself.

For the future, you can use ActionController::Metal to get
a very fast controller with the ability to opt-in to specific
controller features without paying the penalty of the full
controller stack.

Since Rails 3 is closer to Rack, the Metal abstraction is
no longer needed.
2010-05-29 20:08:00 +02:00
Michael Koziarski
564ab4776c Merge commit 'mislav/counter_cache' 2010-05-29 14:06:02 +12:00
Michael Koziarski
668f7dd5d0 Merge commit 'mislav/auto_link' 2010-05-29 14:05:56 +12:00
Gonçalo Silva
d21aa6de4f performance and integration tests inherit from AD, not AC
Signed-off-by: wycats <wycats@gmail.com>
2010-05-28 23:53:03 +02:00
José Valim
f1ae0321fa Use I18n 0.4.0 2010-05-27 23:50:34 +02:00
Xavier Noria
ddec74fb3a Merge remote branch 'rails/master' 2010-05-27 10:57:05 +02:00
David Chelimsky
e02db06ece In AV::TC, move protect_against_forgery? from the test_case to the
_helper module included in the view.

- ensures that protect_against_forgery? is present when a helper
  included in a partial that is rendered by the template under test
  calls it (which happens in FormTagHelper#extra_tags_for_form, for
  example).

[#4700 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-26 15:59:03 +02:00
David Chelimsky
9ae7e93920 reorganize tests for AV::TC
- decouple tests from the test case class by moving them outside
- split out more TestCase subs as cleaner way of avoiding bleed of
  class level concepts

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-26 15:58:53 +02:00
Elomar França
7bd30b9585 Adding to_key to ActiveResource objects using ActiveModel::Conversion [#4685 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-26 15:57:27 +02:00
David Chelimsky
163152bfd0 Support configuration of controller.controller_path on instances of
ActionView::TestCase::TestController without stubs. Just say:

  @controller.controller_path = "path/i/need/for/this/test"

[#4697 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-26 08:49:57 +02:00
Xavier Noria
e3549a8054 get railties/README back to the home page of the API 2010-05-25 17:26:01 +02:00
Josiah Ivey
96e2094b8b Form Helpers guide: Use new syntax for fields_for examples 2010-05-25 08:03:04 -05:00
David Chelimsky
0855e04044 fix small doc bug about running single unit test files 2010-05-25 19:14:11 +10:00
jacortinas
6602fb62a0 A small rdoc change made on lines 39 and 41 on activesupport/lib/active_support/core_ext/object/to_param.rb. It looks like the method name might have been changed, and the comments were never changed to coincide with the new method name. 2010-05-25 19:09:11 +10:00
Ryan Bigg
2a833d7bd8 Cover more of the Rails initialization process, regarding the internals of YourApp::Application inheritance from Rails::Application and more. 2010-05-25 19:07:55 +10:00
Santiago Pastorino
78fffac668 Fix test incorrectly using a bare assert to use assert_kind_of
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-24 20:59:53 -07:00
Santiago Pastorino
47d568ed3f Refactor calculation test to remove unneeded SQLite special case.
[#4633]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-24 20:54:38 -07:00
Jeremy Kemper
f53a6d8149 i18n: t() handles single keys returning an Array, also 2010-05-24 20:30:21 -07:00
Jeremy Kemper
d8d38bedfd HTML safety: fix textarea with nil content 2010-05-24 20:18:25 -07:00
Santiago Pastorino
b5f9c8822d translate method doesn't support arrays anymore and is optimized to be used with strings or symbols
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-24 23:42:20 +02:00
Santiago Pastorino
2b8eb5404e Revert "translation method for arrays on TranslationHelper module returns an array where values for keys of the form (.|_)html keys are html_safe"
This reverts commit 05c95b5c58.

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-24 23:41:55 +02:00
David Chelimsky
8e583b69e8 Move AV::TC to AV::TC::Behavior [#4678 state:resolved]
- enables alternative testing frameworks to include AV::TC::Behavior
  instead of subclassing AV::TC
- also added tests and code for:
  - test view delegates :notice to request.flash
    - useful since generators generate views that use notice
  - test case doesn't try to include modules that are actually
    classes

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-24 22:58:46 +02:00
Santiago Pastorino
05c95b5c58 translation method for arrays on TranslationHelper module returns an array where values for keys of the form (.|_)html keys are html_safe
[#4675]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-24 20:12:43 +02:00
Jaime Iniesta
844b195292 Fixed XHTML on activerecord_validation_callbacks guide 2010-05-24 19:00:37 +02:00
Jaime Iniesta
d85b3ef3c1 Added info about guides validation to Contribute guide 2010-05-24 18:30:47 +02:00
Jaime Iniesta
781692d583 Fixed minor typo on credits 2010-05-24 18:12:24 +02:00
Jaime Iniesta
3391cb903e Merge branch 'w3c_validator' 2010-05-24 18:07:48 +02:00
Jaime Iniesta
7db557f152 New rake validate_guides task to validate output/*.html against the W3C Validator 2010-05-24 18:07:08 +02:00
José Valim
59d1c418be Fix a bug where responders were not working properly on method override. 2010-05-24 13:12:40 +02:00
Mislav Marohnić
bc84bd17d1 fix reset_counters to work even with complex class names
e.g. it guesses that a belongs_to association to Namespace::MyModel is
named "my_model", unlike before where it would look up an association
named "namespace::mymodel" and fail.
2010-05-24 11:44:53 +02:00
Mislav Marohnić
bfca7d744d move counter_cache tests to a separate file and refactor 2010-05-24 11:42:03 +02:00
Mislav Marohnić
f493f31533 cleanup update/reset_counters: less SQL strings, more ActiveRecord/Arel 2010-05-24 11:42:03 +02:00
Mislav Marohnić
8f0b2138ee avoid auto_linking already linked emails; more robust detection of linked URLs
References #1523  [#1862 state:resolved]  [#3591 state:resolved]

Add test that shows how link text can contain HTML if needed:
the trick is using block form in combination with `raw`.
Let link text be automatically HTML-escaped

[#2017 state:resolved]
2010-05-24 11:25:24 +02:00
Mislav Marohnić
133ada6ab0 auto_link: support arbitrary URI schemes like "ftp:" and "file:"
recognizes all URI scheme allowed characters, such as colon and period.

[#3494 state:resolved]
2010-05-24 11:25:24 +02:00
Jeremy Kemper
69a9669d9d Missing changelog heading 2010-05-23 09:46:31 -07:00
José Valim
8d5939c096 Fix a bug where I18n fallbacks modules where not included in the proper backend if it was set through config.i18n.backend. 2010-05-23 13:22:19 +02:00
Norman Clarke
f3abc8ac36 Use multibyte proxy class on 1.9, refactor Unicode.
Makes String#mb_chars on Ruby 1.9 return an instance of ActiveSupport::Multibyte::Chars to work around 1.9's lack of Unicode case folding.

Refactors class methods from ActiveSupport::Multibyte::Chars into new Unicode module, adding other related functionality for consistency.

[#4594 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-05-21 12:24:54 -07:00
José Valim
ad4be3d75d Fix failing test. 2010-05-21 16:20:56 +02:00
Neeraj Singh
cc45a1068f 1.day should respond_to kind_of too
[#4656 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-21 16:00:55 +02:00
Neeraj Singh
1bc6b43f53 Replace assert with assert_equal in some test cases
[#4654 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-21 16:00:49 +02:00
Rohit Arondekar
c36374e768 Getting Started, don't forget to link to yourself if you are adding to the changelog. 2010-05-21 06:53:45 -07:00
José Valim
048cf9e922 Fix typo on rackup test (ht: pleax) 2010-05-20 13:49:06 -07:00
Nick Sieger
c0db7840fe More accurate JRuby gem requirements
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-20 15:18:57 +02:00
Santiago Pastorino
aacf2581cd refactor evals and adds some __FILE__ and __LINE__
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-20 15:18:57 +02:00
Rohit Arondekar
0244b43ecd Minor typo fix in callbacks.rb of abstract_controller 2010-05-20 03:23:21 -07:00
Xavier Noria
7f07cc364a Merge remote branch 'rails/master' 2010-05-19 23:29:39 +02:00
Xavier Noria
b9fcd8d71f in Ruby things in general happen at runtime, no need to specify that 2010-05-19 23:27:09 +02:00
Santiago Pastorino
61001e766d group :mri deleted in favor of RUBY_ENGINE and RUBY_VERSION usage.
Allow use json, yajl-ruby and nokogiri on MRI and Rubinius only.
jruby-debug added only for jruby platform

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-05-19 21:32:45 +02:00