Commit Graph

10561 Commits

Author SHA1 Message Date
Pratik Naik
60bed59fbf Remove unnecessary &block from Range#sum and add tests for (num..float).sum 2009-08-09 18:15:20 +01:00
Pratik Naik
97a5c7a516 Make enumerable test run stand alone 2009-08-09 18:13:03 +01:00
José Valim
e0adfa82c0 Optimize Range#sum only for integers [#2489] 2009-08-09 18:05:58 +01:00
Gabe da Silveira
1185500ff0 Remove unused routeset method routes_for_controller_and_action in favour for routes_for [#3023 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 18:02:35 +01:00
jastix
a1c289dbe4 Require test/unit in the generated test_helper for plugin [#1878 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 17:56:41 +01:00
Matt Conway
1c9b3aabdd Allow connect_timeout, read_timeout and write_timeout settings for MySQL [#2544 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 17:13:22 +01:00
railsbob
076ca48bd6 Ensure hm:t#find does not assign nil to :include [#1845 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 17:02:19 +01:00
Felipe Talavera
654568e71b Allow to configure trusted proxies via ActionController::Base.trusted_proxies [#2126 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 16:56:18 +01:00
rizwanreza
7dbb2b6f83 Support passing Redcloth options via textilize helper [#2973 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 16:41:09 +01:00
Mike Breen
7d254b5d74 Serialized attributes should only be saved with partial_updates when the serialized attribute is present [#2397 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 16:34:53 +01:00
Pratik Naik
96b575d6dc Get rid of parenthesize argument warnings 2009-08-09 16:00:53 +01:00
José Valim
1ea7a00bc4 Refactored create_migration on model generator.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 15:57:59 +01:00
Hugo Peixoto
3545d6b0b2 Setting usec (and nsec for Ruby 1.9) on Time#end_of_* methods [#1255 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2009-08-09 15:56:37 +01:00
José Valim
1bd4d1c674 Optimize Range#sum to use arithmetic progression when a block is not given [#2489].
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 15:56:10 +01:00
Michael Siebert
d811864e88 Fix deprecating =-methods by using send [#2431 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2009-08-09 15:54:56 +01:00
José Valim
32bde66aa6 Make http digest work with different server/browser combinations
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 15:53:52 +01:00
Dmitry Ratnikov
314ba0433f Changed to use klass instead of constantizing in assign_ids generated method
[#260 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 02:52:06 -07:00
Dmitry Ratnikov
f16008afdd Modified Rich Bradley's test-case to fail as part of suite and with a reasonable message
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 02:40:27 -07:00
Hugo Peixoto
22b38c18c6 Fixed generating a namespaced model with table pluralization turned off. Add tests for namespaced model generation.
[#767 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 02:38:35 -07:00
Jeremy Kemper
a0caad5255 Setting connection timeout also affects Net::HTTP open_timeout.
[#2947 state:resolved]
2009-08-09 02:28:00 -07:00
Yehuda Katz
60219a13da Add a .tmp path 2009-08-09 05:52:49 -03:00
Rich Bradley
9bb8ef9ede Fix for nested :include with namespaced models.
[#260 state:committed]
2009-08-09 00:31:46 -07:00
Yehuda Katz
0d53994701 Make bench harness produce output that is easier to compare 2009-08-09 04:12:09 -03:00
Yehuda Katz
e8849203dc Updates to benchmark harness. 2009-08-09 04:12:09 -03:00
Yehuda Katz
b05c951907 Temporary fix to get our LoadError monkey-patch working with newer JRuby. We should probably remove MissingSourceFile and just monkey-patch LoadError instead of overriding LoadError.new. 2009-08-09 04:12:09 -03:00
Yehuda Katz
e58b2769cf Experimental: Improve performance of ActionView by preventing method cache flushing due to runtime Kernel#extend:
* The helper module adds a new _helper_serial property onto AbstractController subclasses
  * When #helper is used to add helpers to a class, the serial number is updated
  * An ActionView subclass is created and cached based on this serial number.
    * That subclass includes the helper module from the controller
    * Subsequent requests using the same controller with the same serial will result in
      reusing that subclass, rather than being forced to take an action (like include
      or extend) that will result in a global method cache flush on MRI and a flush 
      of the entire AV class' cache on JRuby.
  * For now, this optimization is not applied to the RJS helpers, which results in
    a global method cache flush in MRI and a flush of the JavaScriptGenerator class in
    JRuby only when using RJS.
    * Since the effects are limited to using RJS, and would only affect JavaScriptGenerator
      in JRuby (as opposed to the entire view object), it seems worthwhile to apply this
      now.
  * This resulted in a significant performance improvement. I will have benchmarks
    in the next day or two that show the performance impact of the last several
    commits.
  * There is a small chance this could break existing code (although I'm not sure how).
    If that happens, please report it immediately.
2009-08-09 04:12:09 -03:00
Yehuda Katz
10eaba8f41 Cache controller_path on the AV instance to avoid needing to make additional calls back into the controller for each attempt (this was done because these calls were adding up significantly in partial rendering and showing up on profiles) 2009-08-09 04:12:09 -03:00
Yehuda Katz
e28e061165 Use response_body rather than performed? 2009-08-09 04:12:09 -03:00
Yehuda Katz
964bc4e855 Rendering a template from ActionView will default to looking for partials only in the current mime type.
* The old behavior was tested only as a side-effect of a different test--the original tests remain;
    a new template in the XML mime was added.
  * If you are relying on the current behavior and object to this change, please participate in
    http://groups.google.com/group/rubyonrails-core/browse_thread/thread/6ef25f3c108389bd
2009-08-09 04:12:08 -03:00
Yehuda Katz
33f01fb1f6 Cache some more things to improve partial perf 2009-08-09 04:12:08 -03:00
Yehuda Katz
0ab40b039b Went from 25% slower partials (vs. 2.3) to 10% faster. More to come. 2009-08-09 04:12:08 -03:00
Yehuda Katz
930d235981 Support a warmup for JRuby 2009-08-09 04:12:08 -03:00
Yehuda Katz
b57d94c187 Update minimal.rb to benchmark partials 2009-08-09 04:12:08 -03:00
Yehuda Katz
d7415f792c Clean up partial object some more; replace passing around a block to a single block ivar 2009-08-09 04:12:08 -03:00
Yehuda Katz
bf412c9ec6 Clean up initializer and some of the internals of PartialRenderer 2009-08-09 04:12:08 -03:00
Jeremy Kemper
b5b1576aa9 Ruby 1.9 compat: can't implicitly set instance var using block arg 2009-08-08 23:04:25 -07:00
Tristan Dunn
791cccaeda Don't define a default primary key in the schema dumper.
[#1908 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-08 19:31:35 -07:00
Rob
4b7f95eb8b Fix binary fixture test on Windows
[#2597 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-08 19:18:38 -07:00
Hugo Peixoto
d8041538dd MySQL: fix diacritic uniqueness test by setting the default character set and collation to utf8/utf8_unicode_ci
[#2883 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-08 19:02:29 -07:00
Michael Koziarski
b97d293374 Merge branch 'patches' 2009-08-09 13:10:14 +12:00
Michael Koziarski
370bf1401a Don't call additional methods on builders passed to the atom_feed helper.
Additionally, actually test that the atom_feed helper works with :xml as an option.

[#1836 state:committed]
2009-08-09 13:10:08 +12:00
Jon Wood
271baf235d Add :redirect to the testable RJS statements [#2612 state:resolved]
Example :
  assert_select_rjs :redirect, root_path

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 02:00:15 +01:00
Pratik Naik
89c8affe47 Use Pathname for checking if sqlite path is absolute 2009-08-09 01:54:08 +01:00
bastilian
071f48b716 Make sure db:drop doesn't fail when sqlite db is given by an absolute path [#1789 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 01:54:08 +01:00
Marc-Andre Lafortune
29096268cc Enumerable#sum now works will all enumerables, even if they don't respond to :size
[#2489 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-08 17:51:09 -07:00
Matt Duncan
3b3798506b Adding :from scoping to ActiveRecord calculations
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1229 state:committed]
2009-08-09 12:43:07 +12:00
Matt Duncan
45f5bdfbc7 Adding :from scoping to ActiveRecord calculations
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1229 state:committed]
2009-08-09 12:33:33 +12:00
Jan Schwenzien
1f6afe4a74 Fix HTTP basic authentication for long credentials [#2572 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 01:28:43 +01:00
Steve St. Martin
618771beb5 Update truncate documentation / examples to more clearly demonstrate its actual behavior
[#3016 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-08 17:16:26 -07:00
Michael Koziarski
df745ed805 Depend on rubygems 1.3.2
Also move the min_version definition up a line so it's present in the rescue block down below.
2009-08-09 11:11:34 +12:00