Commit Graph

23056 Commits

Author SHA1 Message Date
Ken Collins
f960cb2832 Allow the connection pool's #table_exists? method to give the connections #table_exists? method a chance. 2011-06-17 09:05:13 +02:00
Jon Leighton
1cc0c3f52c Perf fix - Use an instance variable instead of a class_attribute. Thanks @josevalim and @jhawthorn for the prompting. 2011-06-16 21:16:54 +01:00
José Valim
f24d8fa796 Merge pull request #1735 from SAP-Oxygen/3-1-stable-app_plugins_ordering_patch
Patch for #1458 - [3.1.0.rc1] App plugins initialized before engines and plugins inside engines
2011-06-16 13:14:49 -07:00
José Valim
5be61ea5a9 Fix SafeBuffers by adding a dirty flag. 2011-06-16 17:05:53 -03:00
Joseph Wong
a89dfbf2e4 Patch for #1458 - [3.1.0.rc1] App plugins initialized before engines
and plugins inside engines

It seems that plugins inside a Rails 3.1 application proper (i.e. in
/vendor/plugins) are initialized before engines and plugins inside
engines.

After some debugging, I found the culprit in
Rails::Application::Railties#all:

  def all(&block)
    @all ||= railties + engines + super
    @all.each(&block) if block
    @all
  end

The call to super here implicitly passes the &block argument, which
has the unfortunate side-effect of adding the plugin initializers
first (in front of other railties and engines) in the case of
Rails::Engine#initializers:

def initializers
  initializers = []
  railties.all { |r| initializers += r.initializers }
  initializers += super
  initializers
end

The solution here is to replace the super call with a call
to #plugins.
2011-06-16 12:58:08 -07:00
wycats
f4db3d72ea Make the API for compression consistent between JS and CSS. By default, users just need to say whether they want compression or not, and a default will be chosen by a Railtie. In the case of CSS, this default is already chosen by the sass-rails gem.
Users can still explicitly choose a compressor in their application.rb if they have a preference, but will usually want to let plugins choose defaults in their Railties.
2011-06-16 12:08:26 -07:00
Santiago Pastorino
efa9695c21 Merge pull request #1728 from vijaydev/doc-merge-fix
Doc merge fixes (3-1-stable)
2011-06-16 06:19:04 -07:00
José Valim
c5930b406c Merge pull request #1726 from arunagw/mysql_bump_3-1-stable
Mysql bump to 0.3.5
2011-06-16 05:02:18 -07:00
José Valim
60a319040f Merge pull request #1460 from SAP-Oxygen/27d7083addd1bc8ecf0ef258a50c5e36eb980060
[3.1.0.rc1] Plugins inside engines not eager-loaded properly and their rake tasks ignored
2011-06-16 03:37:40 -07:00
Vijay Dev
eb89729370 fix merge errors 2011-06-16 11:37:38 +05:30
Arun Agrawal
bf588c69de Mysql bump 2011-06-16 10:48:28 +05:30
Santiago Pastorino
014008d349 Merge pull request #1724 from brianmario/lazy-mysql2-casting
re-enable eager-casting for mysql2
2011-06-15 20:23:16 -07:00
Brian Lopez
d2b13403ff bump mysql2 version 2011-06-15 20:17:35 -07:00
Brian Lopez
7b04e5051e on second thought, lets keep casting on by default. it can be disabled in database.yml by setting 'cast: false' 2011-06-15 20:03:12 -07:00
José Valim
a7039df4ce load_generators from engine should also handle self automatically. 2011-06-15 11:52:45 -07:00
Santiago Pastorino
677df61c82 Merge pull request #1719 from ryanb/fix_generated_engine_javascript
Fix generated JavaScript for mountable engine in 3-1-stable
2011-06-15 11:21:44 -07:00
Ryan Bates
7f9656640d properly require javascript libraries when generating mountable engine (from baf2a9c) 2011-06-15 11:16:11 -07:00
Santiago Pastorino
b4b27a34e9 Merge pull request #1716 from ryanb/namespace_engine_assets_3_1
Namespace engine assets for 3-1-stable
2011-06-15 10:45:26 -07:00
Ryan Bates
40dd641ede namespace engine assets 2011-06-15 09:58:38 -07:00
José Valim
1f813d98e0 Merge pull request #1713 from dmathieu/3-1-cherry
Cherry picking encoding for 3.1
2011-06-15 04:08:45 -07:00
Lukáš Konarovský
055a88d345 Use assert_equal instead of assert in uploaded file test. 2011-06-15 13:03:07 +02:00
Damien Mathieu
fa5529366c all requests are utf-8. Don't use the external encoding. 2011-06-15 13:01:30 +02:00
Damien Mathieu
f6fe174168 encode the uploaded file's name in the default external encoding - Closes #869 2011-06-15 13:01:25 +02:00
Damien Mathieu
9267a431b8 simplify to only one condition
Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>
2011-06-15 09:52:02 +01:00
Andrew White
8624996f9c Make MissingTranslation exception handler respect :rescue_format 2011-06-15 01:21:59 +01:00
José Valim
5daef25f0a Merge pull request #1702 from brianmario/lazy-mysql2-casting
Turn off mysql2's eager-casting
2011-06-14 15:50:55 -07:00
Brian Lopez
aeb7beb3c6 mysql2 casting changes require mysql2 >= 0.3.3 2011-06-14 15:42:08 -07:00
Brian Lopez
e56567c0b2 Turn off eager casting for mysql2, so ActiveRecord can lazily cast values later. This should help performance for tables with complex types like DATETIME, TIMESTAMP 2011-06-14 15:17:01 -07:00
Joshua Peek
78587a5835 Fix appending sprockets paths 2011-06-14 14:41:51 -05:00
Joseph Wong
27d7083add Patch for https://github.com/rails/rails/issues/1460
[3.1.0.rc1] Plugins inside engines not eager-loaded properly and their
rake tasks ignored

Working with the new support for plugins inside engines in Rails 3.1,
I found that certain things that work for regular plugins don't work
for these new nested plugins. In particular, these methods in
Rails::Engine don't seem to understand that an engine could have
nested plugins:

#load_tasks
#load_generators
#load_console
#eager_load!

A solution which worked out for me is to move the calls to
railties.all { ... } from the overriding methods in Rails::Application
into Rails::Engine.
2011-06-14 11:11:26 -07:00
Jon Leighton
34d16e1ff6 Add Gemfile dependency for require_relative on mri18. This is a dependency of linecache which is a dependency of ruby-debug. However, the latest release of linecache (0.45) omits the dependency from its gemspec, causing the build to fail. I have emailed the maintainer so we should remove this when it's fixed upstream. 2011-06-13 22:20:29 +01:00
Andrew White
a52b14100a Remove obsolete compatibility module 2011-06-13 18:29:15 +01:00
Andrew White
45509ee6b7 Pass mass-assignment options to nested models - closes #1673. 2011-06-13 13:07:44 +01:00
Andrew White
113466cd94 Rename tests to reflect associations 2011-06-13 10:02:24 +01:00
José Valim
00c12ff100 Merge pull request #1675 from thoefer/3-1-stable
Fix for startup problems due to deprecation warning on nested models
2011-06-13 01:17:28 -07:00
thoefer
1863f12713 Make sure to have a Hash under the i18n keys 'activerecord.attributes' and 'activerecord.models' as this might not always be the case. See issue #1662. 2011-06-12 21:28:38 +02:00
Jon Leighton
fb1fd61634 Add support for using an ARCONFIG environment variable to specify the location of the config.yml file for running the tests 2011-06-12 19:13:25 +01:00
Jon Leighton
df63c99f06 Replace inline lambdas with named methods 2011-06-12 18:31:42 +01:00
Jon Leighton
bdd549a1c0 Refactor tests to be less brittle 2011-06-12 18:31:26 +01:00
Jon Leighton
5f43a2a2b1 Move BEGIN and COMMIT into IGNORED_SQL rather than having them as a special case in assert_queries 2011-06-12 18:31:20 +01:00
benedikt
b17fd25a2d Don't wrap operations on collection associations in transactions when they are not needed, so the connection adapter does not send empty BEGIN COMMIT transactions blocks to the database. 2011-06-12 18:26:29 +01:00
Andrew White
c1938d16fd Define ActiveSupport#to_param as to_str - closes #1663 2011-06-12 15:23:12 +01:00
Xavier Noria
e51b8fb38e backslash insertion for RDoc main page ignores code blocks, also adds comments to explain what's this hack about 2011-06-12 15:04:02 +02:00
José Valim
edc0b2b80b Make i18n tests more robust. 2011-06-12 12:44:27 +02:00
Xavier Noria
7c4625a113 revises the pattern that excludes generator templates in API generation
With the previous pattern RDoc processed

    railties/lib/rails/generators/rails/plugin_new/templates/test/%name%_test.rb

and that resulted in a spurious "<" class.
2011-06-12 12:09:54 +02:00
José Valim
0bbc145f68 Update CHANGELOG. 2011-06-11 18:04:27 +02:00
José Valim
c19bd4f88e Add a deprecation for nested i18n namespace lookup. 2011-06-11 17:58:07 +02:00
José Valim
83efad01e9 Get rid of the alternate namespace lookup. 2011-06-11 17:31:11 +02:00
Santiago Pastorino and José Ignacio Costa
41b73fe033 Revert "Make sure that we don't perform in-place mutation on SafeBuffer string"
This reverts commit 317e7c829d.
2011-06-10 23:08:58 -03:00
Aaron Patterson
e88508eb20 Merge pull request #1641 from sikachu/3-1-stable-render-inline
Render inline fix for 3-1-stable
2011-06-10 16:28:06 -07:00