Commit Graph

24433 Commits

Author SHA1 Message Date
Jon Leighton
9ecc4433bb Perf: don't mess around with thread local vars unless we actually need to 2011-08-13 16:54:05 +01:00
Jon Leighton
24f902b1bc Fix default scope thread safety. Thanks @thedarkone for reporting. 2011-08-13 16:54:05 +01:00
José Valim
291072a64a Merge pull request #2514 from myronmarston/fix_active_record_observer_disabling
Allow ActiveRecord observers to be disabled.
2011-08-13 08:40:13 -07:00
Jon Leighton
34689c40a0 Work around for lolruby bug. (Read on for explanation.)
We were experiencing CI test failures, for example:

* 3-1-stable: http://travis-ci.org/#!/rails/rails/builds/79473/L407
* master: http://travis-ci.org/#!/rails/rails/builds/79507/L80

These failures only happened on 1.8.7-p352, and we were only able to
reproduce on the Travis CI VM worker. We even tried creating a new 32
bit Ubuntu VM and running the tests on that, and it all worked fine.

After some epic trial and error, we discovered that replacing the
following:

  fuu = Marshal.load(Marshal.dump(fuu))

with:

  marshalled = Marshal.dump(fuu)
  fuu = Marshal.load(marshalled)

seemed to prevent the failure.

We have NO IDEA why this is. If anyone has some great insight to
contribute then that is welcome. Otherwise, hopefully this will just
help us get the CI green again.

Many thanks to @joshk for help with sorting this out.
2011-08-13 13:54:54 +01:00
Jon Leighton
6b56f059bf Merge pull request #2516 from arunagw/path_set_fix
We need [] method here. previously it's an array.
2011-08-13 03:31:43 -07:00
Arun Agrawal
5bc87cc2ee We need [] method here. previously it's an array. 2011-08-13 13:13:05 +05:30
Myron Marston
d3c15a1d31 Allow ActiveRecord observers to be disabled.
We have to use Observer#update rather than Observer#send since the enabled state is checked in #update before forwarding the method call on.
2011-08-12 20:48:44 -07:00
Aaron Patterson
943a37348a moving test_generate to an integration test with one assert per test 2011-08-12 15:55:00 -07:00
Aaron Patterson
c420ebf74a Merge pull request #2503 from arunagw/cant_dup_on_nil
We cannot dup on nil.
2011-08-12 15:54:33 -07:00
Arun Agrawal
8196c842b6 We actually don't need a reverse_merge! here. dup removed was giving error with nil class. 2011-08-12 16:56:29 +05:30
Santiago Pastorino
d1f1b04386 Merge pull request #2497 from akaspick/url_for_fix
When calling url_for with a hash, additional (likely unwanted) values (such as :host) would be returned in the hash
2011-08-11 15:55:14 -07:00
Andrew Kaspick
61579b7661 when calling url_for with a hash, additional (likely unwanted) values (such as :host) would be returned in the hash... calling #dup on the hash prevents this 2011-08-11 13:28:31 -05:00
Santiago Pastorino
e6fdfd0f6f Merge pull request #2489 from grzuy/master
Remove parameters_for_url from form_tag method header
2011-08-11 06:38:57 -07:00
Gonzalo Rodriguez and Leonardo Capillera
9e81bfd8fc Remove 'parameters_for_url' parameter from 'form_tag' method signature
If you use that parameter it will end calling to url_for with two
arguments, which fails because url_for expects only one
2011-08-10 23:14:56 -03:00
Aaron Patterson
d00e1646f7 add the gem requirement for sqlite3 2011-08-10 11:39:48 -07:00
José Valim
bb4f687bc6 Remove lame comment. 2011-08-09 16:49:38 -07:00
Santiago Pastorino
d9b690f71f rake assets:precompile defaults to production env 2011-08-09 20:40:52 -03:00
Aaron Patterson
5f56db4454 adding missing require to fist railties tests 2011-08-09 14:54:56 -07:00
Jon Leighton
4f8801963c Okay, the new incompatible arel is now called 2.2 and the sun shines upon thee once more 2011-08-09 22:05:48 +01:00
Aaron Patterson
ae3ab0c58a Merge pull request #2465 from pivotal-casebook/patch-3
Further monkey-patching to avoid deprecation warnings
2011-08-09 13:33:24 -07:00
Aaron Patterson
f9f423fa18 deprecating process_view_paths 2011-08-09 12:10:25 -07:00
Aaron Patterson
3ad26c8e48 avoid object creation via useless duping and freezing 2011-08-09 11:41:06 -07:00
Aaron Patterson
26e53a16c4 just use map and case / when rather than modifying the iterating array 2011-08-09 11:30:43 -07:00
Aaron Patterson
7cd3772fe6 only typecast what we need to typecast 2011-08-09 11:26:44 -07:00
Aaron Patterson
b14f1c3ad7 Favor composition over inheritance. 2011-08-09 11:23:02 -07:00
Aaron Patterson
88de343ef4 Array#+ automatically dups, no double duping 2011-08-09 10:54:05 -07:00
Aaron Patterson
14a8fd146a Just remove the sort_locals method 2011-08-09 10:13:02 -07:00
Aaron Patterson
1fbc4704df the freeze trick does nothing on arrays used as hash keys. 2011-08-09 10:09:46 -07:00
Aaron Patterson
233696a027 use functional style to build a list of template objects 2011-08-09 09:32:16 -07:00
Aaron Patterson
37b77c6ae7 refactor the optimized build_query a bit 2011-08-08 22:16:52 -07:00
Aaron Patterson
128467e927 reduce file stats by improving our dir glob pattern 2011-08-08 21:42:45 -07:00
Aaron Patterson
295a7fd1bb hash on the template directory in order to improve cache hits 2011-08-08 21:03:40 -07:00
Aaron Patterson
940404096f use meaningful names with our variables 2011-08-08 21:01:19 -07:00
Aaron Patterson
0155bf4021 use binread to read the files 2011-08-08 19:51:41 -07:00
Aaron Patterson
681bf1fc48 backporting IO#binread for 1.8 users 2011-08-08 19:48:12 -07:00
Aaron Patterson
0b212117e6 be explicit about arguments passed around 2011-08-08 19:29:12 -07:00
Jon Leighton
5680a51dcb Remove TODO comment I didn't mean to commit 2011-08-09 00:00:52 +01:00
Jon Leighton
5870291425 Bump arel version 2011-08-08 23:51:07 +01:00
Jon Leighton
9062b75bb7 Fully marshal AR::Base objects. Fixes #2431. 2011-08-08 23:28:49 +01:00
Jon Leighton
7db90aa7c7 Make it the responsibility of the connection to hold onto an ARel visitor for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now. 2011-08-08 23:28:23 +01:00
Aaron Patterson
ff9a2e6697 Merge pull request #2426 from pivotal-casebook/fix-build
Make rails gem build directory consistent with actionpack, etc.
2011-08-08 14:17:02 -07:00
Aaron Patterson
11fbeb71d9 Merge pull request #2466 from rsim/fix_test_disable_referential_integrity
Fixed test_disable_referential_integrity on Oracle
2011-08-08 12:40:28 -07:00
Raimonds Simanovskis
58af0d46cf Fixed test_disable_referential_integrity on Oracle
On Oracle disable_referential_integrity before execution of block will disable foreign key constraints and after block will enable them but when constraints are enabled then they are validated. Therefore created record with invalid foreign key should be deleted before enabling foreign key constraints.
2011-08-08 22:32:26 +03:00
Pivotal Casebook
396e12155a Further monkey-patching to avoid deprecation warnings 2011-08-08 13:47:24 -03:00
Santiago Pastorino
8360d71965 Initialize config.assets.version the same way it's done in Sprockets 2011-08-08 12:49:10 -03:00
Joshua Peek
eabc036496 Merge pull request #2448 from igrigorik/master
Asset pipeline fixes: clear out tmp cache and use environment in digest generation
2011-08-08 07:42:49 -07:00
Aaron Patterson
9e5140078f Merge pull request #2451 from gdelfino/master
sqlite transactions in log files
2011-08-07 18:22:32 -07:00
Xavier Noria
e746980507 guides generation: apparently this workaround for RedCloth is not needed anymore 2011-08-07 16:20:51 -07:00
Xavier Noria
e06db7276c Merge pull request #2457 from Gregg/zombie_singular_fix
Added irregular zombie inflection, so zombies != zomby
2011-08-07 11:34:10 -07:00
Gregg Pollack
554232e481 Added irregular zombie inflection, so zombies no longer gets singularized into zomby 2011-08-07 14:20:03 -04:00