Commit Graph

943 Commits

Author SHA1 Message Date
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
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
e58ad8ed9c Setup and teardown now use new callbacks. 2009-12-30 11:09:27 +01: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
Jeremy Kemper
19c48281a7 String#exclude? core extension: inverse of #include? 2009-12-27 15:49:29 -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
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
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
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
1ee9b40b18 Failing tests for to_param/to_query not escaping "[]" 2009-12-02 15:08:42 -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
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 8104f65c32.
2009-11-28 12:50:09 -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
bc1538e995 Repair time dependencies 2009-11-14 11:37:06 -08:00
Jeremy Kemper
61843595ea No need for test stub 2009-11-14 03:27:18 -08:00
Jeremy Kemper
7eb4f2ecc5 Consolidate date & time landscape: require 'active_support/time' 2009-11-14 01:13:54 -08:00
Jeremy Kemper
58c0d31487 Notifications: queue.drained? for testability in place of brittle sleeps 2009-11-13 20:58:38 -08:00
Jeremy Kemper
66fda6b894 Fix duration check for longer sleep 2009-11-13 19:28:59 -08:00
Jeremy Kemper
7ab78b9ccd CI: slow down brittle notifications tests 2009-11-13 18:57:10 -08:00
Jeremy Kemper
2841a14f4b Ruby 1.9.2: fix broken to_ary expectation 2009-11-13 12:42:49 -08:00
Jeremy Kemper
9acc824d96 Ruby 1.9.2: disallow explicit coercion via method_missing. Only give friendly nil errors for Array and Active Record methods. 2009-11-13 12:25:54 -08:00
Jeremy Kemper
c0ebc21493 Test that Array.wrap works with proxy objects and structs 2009-11-13 09:52:52 -08:00
Joshua Peek
11e798ae0f Avoid adding component lib/ to load path multiple times 2009-11-09 23:28:36 -06:00
Joshua Peek
22b581e04c Always add AS lib/ to path when running its test suite 2009-11-09 22:56:49 -06:00
Joshua Peek
94058c689a Remove automatic rubygems loading from AS test runner 2009-11-09 22:44:28 -06:00
Jeremy Kemper
feaa762e40 Ditto 2009-11-09 16:59:38 -08:00
Jeremy Kemper
eeac054d59 Fix missing dependency 2009-11-09 16:57:10 -08:00
Xavier Noria
db2c0d79e3 Enumerable#none? is not needed for Ruby >= 1.8.7 2009-11-09 22:16:51 +01:00
Xavier Noria
329e7f4441 Integer#even? and Integer#odd? are not needed for Ruby >= 1.8.7 2009-11-09 22:16:51 +01:00
Xavier Noria
b6598c683b String#each_char is not needed for Ruby >= 1.8.7 2009-11-09 22:16:51 +01:00
Xavier Noria
c0bb4c6ed2 String#start_with? and String#end_with? are not needed for Ruby >= 1.8.7, leaves their plural aliases though 2009-11-09 22:16:51 +01:00
Xavier Noria
004db18cb0 String#bytesize is not needed for Ruby >= 1.8.7 2009-11-09 22:16:51 +01:00
Xavier Noria
f8e713f488 Object#tap is not needed for Ruby >= 1.8.7 2009-11-09 22:16:51 +01:00
Xavier Noria
1979e9c855 Symbol#to_proc is not needed for Ruby >= 1.8.7 2009-11-09 22:16:51 +01:00
Xavier Noria
d4513ac699 Object#instance_variable_defined? is not needed for Ruby >= 1.8.7 2009-11-09 22:16:51 +01:00
Jeremy Kemper
deddd55086 Work around assert_raise limitation 2009-11-08 22:02:57 -08:00
Jeremy Kemper
20cdaddfd2 Ruby 1.9.2: work around changes to flatten and nil.to_str 2009-11-08 22:02:57 -08:00
Chris Hapgood
6c59e5a558 Fix OrderedHash#replace
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2009-11-05 21:17:13 +13:00
Manfred Stienstra
da3a228a93 Make ActiveSupport::Chars#limit run on Ruby 1.9. 2009-11-04 10:14:49 +01:00