Commit Graph

1966 Commits

Author SHA1 Message Date
Xavier Noria
4a27d42637 require cgi to reopen it, not technically needed but makes sense 2010-01-01 14:28:55 -08:00
Willem van Bergen
689984ddd3 Fixed some bugs and fixed some tests in new SAX-based XmlMini backends.
[#3636 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-01-01 13:18:03 -08:00
Willem van Bergen
96a2b3905c Added SAX-based parser for XmlMini, using LibXML
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-01-01 13:17:46 -08:00
Willem van Bergen
d7f9b9fd24 Added SAX-based parser for XmlMini, using Nokogiri.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-01-01 13:17:45 -08:00
Willem van Bergen
34b03cebf9 Code cleanup, bugfixes and speed improvements for the Nokogiri and LibXML XmlMini backends
[#3641 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-01-01 13:16:40 -08:00
José Valim
8c5fe60ec8 Simplify repair_validations on AR and make it work with new callbacks. 2010-01-01 03:20:38 +01:00
José Valim
50fbb74056 Fix inheritance issue with new callbacks. 2010-01-01 01:48:12 +01:00
Carl Lerche
d39d7f5f44 Allow ActiveSupport's isolation tests to run with MiniTest on 1.9 2009-12-30 20:48:46 -08:00
José Valim
97a64b6b22 Get rid of DeprecatedCallbacks in ActiveRecord::Associations and finally remove it. 2009-12-30 11:43:34 +01:00
José Valim
e58ad8ed9c Setup and teardown now use new callbacks. 2009-12-30 11:09:27 +01:00
Jeremy Kemper
9a650a6547 Silence some trivial warnings: shadowed local vars, indentation mismatches 2009-12-28 17:36:08 -08:00
David Heinemeier Hansson
1c47d04ea5 Added Object#presence that returns the object if it's #present? otherwise returns nil [DHH/Colin Kelley] 2009-12-27 17:54:43 -08:00
Yehuda Katz
f095e6f59d Fixes some problems with getting a new app working 2009-12-27 16:00:34 -08:00
Jeremy Kemper
19c48281a7 String#exclude? core extension: inverse of #include? 2009-12-27 15:49:29 -08:00
David Heinemeier Hansson
5012a1558d Merge branch 'master' of github.com:rails/rails 2009-12-27 14:44:21 -08:00
David Heinemeier Hansson
1cd949006a Fix the i18n dependency problem 2009-12-27 14:43:06 -08:00
José Valim
75ba102a80 Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened. 2009-12-26 20:28:53 +01:00
José Valim
561885aea2 String#<< should work for any object which responds to :to_str, so enable this without the performance hit and make Fixnum safe by default. 2009-12-26 14:11:04 +01:00
José Valim
9f1c359a20 Fix whiny_nil tests, improve error messages and make CI happy. 2009-12-25 22:00:36 +01:00
José Valim
135d32c8bd Move i18n to Gemfile. 2009-12-25 15:15:13 +01:00
Yehuda Katz
1c66f85eb6 This code was needed to work around http://redmine.ruby-lang.org/issues/show/2494. Since that bug is now closed in Ruby, we can remove it. 2009-12-24 23:48:35 -08:00
Yehuda Katz
3b1642c23c Simplify and improve the performance of output_safety 2009-12-24 22:44:21 -08:00
Yehuda Katz
f3b072189a Instead of marking raw text in templates as safe, and then putting them through String#<< which checks if the String is safe, use safe_concat, which uses the original (internal) String#<< and leaves the safe flag as is. Results in a significant performance improvement. 2009-12-24 21:50:18 -08:00
Dwayne Litzenberger
808cad2bb4 Fix ActiveSupport::JSON encoding of control characters [\x00-\x1f]
According to RFC 4627, only the following Unicode code points are
allowed unescaped in JSON:

  unescaped = %x20-21 / %x23-5B / %x5D-10FFFF

However, ActiveSupport::JSON did not escape the range %x00-1f.  This caused
parse errors when trying to decode the resulting output.

[#3345 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-12-23 11:46:06 -08:00
Joshua Peek
ace20bd25e Flip deferrable autoload convention 2009-12-22 17:27:37 -06:00
Yehuda Katz
b4ecb55551 Missing acts_like dependency 2009-12-20 17:38:28 -08:00
Yehuda Katz
33a6bd390a Fixes Dependency bug in ActiveSupport 2009-12-20 17:03:38 -08:00
Yehuda Katz
e48b4c2dd0 :to => redirect() can take a String using 1.9-style interpolation or proc that takes the path parameters as a Hash 2009-12-20 14:07:32 -08:00
Joshua Peek
ee51ddcc27 Hush AS test suite 2009-12-16 10:52:52 -06:00
Geoff Buesing
a4b19277b2 Add test for TimeWithZone#to_i with wrapped DateTime 2009-12-15 08:28:24 -06:00
Serguei Filimonov
2ae8300489 Added #to_i to DateTime in ActiveSupport so #to_yaml works correctly on ActiveRecord models with DateTime attributes. 2009-12-15 08:15:21 -06:00
David Heinemeier Hansson
7b61541ea5 Add Enumerable#exclude? to bring parity to Enumerable#include? and avoid if !x.include?/else calls [DHH] 2009-12-14 18:00:14 -08:00
Yehuda Katz
ffb351713e Modify backtrace test to take implementations with slightly different backtrace output into consideration. 2009-12-13 10:40:00 -05:00
Yehuda Katz
0f7f90d25b Extract descendents a bit so it can take advantage of Rubinius' __subclasses__. 2009-12-13 10:39:10 -05:00
Joshua Peek
018dafe574 Allow autoloads to opt out of eager loading 2009-12-12 18:41:26 -06:00
Jeremy Kemper
071af66e9e Ruby 1.9.2: explicitly raise NoMethodError for explicit coercion attempts. Calling super gives us NameErrors. 2009-12-06 18:03:18 -08:00
Yehuda Katz
96e0638ce2 Should fix a few Sam Ruby fails. 2009-12-03 09:06:01 -08:00
Carlhuda
c1304098cc Reorganize autoloads:
* A new module (ActiveSupport::Autoload) is provide that extends
    autoloading with new behavior.
  * All autoloads in modules that have extended ActiveSupport::Autoload
    will be eagerly required in threadsafe environments
  * Autoloads can optionally leave off the path if the path is the same
    as full_constant_name.underscore
  * It is possible to specify that a group of autoloads live under an
    additional path. For instance, all of ActionDispatch's middlewares
    are ActionDispatch::MiddlewareName, but they live under 
    "action_dispatch/middlewares/middleware_name"
  * It is possible to specify that a group of autoloads are all found
    at the same path. For instance, a number of exceptions might all
    be declared there.
  * One consequence of this is that testing-related constants are not
    autoloaded. To get the testing helpers for a given component,
    require "component_name/test_case". For instance, "action_controller/test_case".
  * test_help.rb, which is automatically required by a Rails application's
    test helper, requires the test_case.rb for all active components, so
    this change will not be disruptive in existing or new applications.
2009-12-02 20:01:08 -08:00
Joshua Peek
856d2fd874 Quick fix for not escaping []s (not ideal) 2009-12-02 15:17:08 -06:00
Joshua Peek
1ee9b40b18 Failing tests for to_param/to_query not escaping "[]" 2009-12-02 15:08:42 -06:00
Joshua Peek
e12380e787 Remove concat before overriding it 2009-12-01 23:25:24 -06:00
Jeremy Kemper
327545c3ae Notifications: synchronous fanout queue pushes events to subscribers rather than having them concurrently pull 2009-11-29 02:30:35 -08:00
Jeremy Kemper
4f2a04cc08 Notifications: extract central Notifier, cordon off the internal Fanout implementation, and segregate instrumentation concerns 2009-11-28 12:50:09 -08:00
Jeremy Kemper
02893d1705 Remark that Listener is an implementation detail 2009-11-28 12:50:09 -08:00
Jeremy Kemper
ddf681ce1d Expose a simple Queue#wait to block until all notifications are drained 2009-11-28 12:50:09 -08:00
Jeremy Kemper
6f7fc5824f Revert "Create SyncListener. Since they do not rely on Thread, they can be used on Google App Engine."
Take a step back on this API direction.

This reverts commit 8104f65c3225453d13307c3c2733c2a8f99e491a.
2009-11-28 12:50:09 -08:00
Jeremy Kemper
71a6b0465b Revert "macruby: no format_datetime or msg2str"
Obviated by fix in macruby trunk.

This reverts commit 6d91e7dca163ef55dde319452b21b767e8a0df33.
2009-11-24 17:15:35 -08:00
Yehuda Katz
934bb012ba Fixes remote errors in isolation tests 2009-11-23 15:42:25 -08:00
José Valim
8104f65c32 Create SyncListener. Since they do not rely on Thread, they can be used on Google App Engine.
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
2009-11-23 09:08:17 -08:00
Jeremy Kemper
6d91e7dca1 macruby: no format_datetime or msg2str 2009-11-21 19:11:50 -08:00