Commit Graph

26570 Commits

Author SHA1 Message Date
Aaron Patterson
d09b67cfc0 Errno::ENOENT error makes more sense when a file cannot be found 2011-12-10 16:32:07 -08:00
Aaron Patterson
4beaa9b839 Try to keep people from calling the deprecated flush method. 2011-12-10 16:31:59 -08:00
Piotr Sarnacki
cde99812f1 Ensure that files that compile to js/css are not compiled by default with rake assets:precompile
This case was not tested and documentation was a bit confusing
on that topic, so it was not obvious if current code
works properly or not.
2011-12-11 00:12:09 +01:00
Piotr Sarnacki
1c2cb7d740 Clarify the default assets.precompile matcher behavior 2011-12-11 00:03:24 +01:00
José Valim
cd7fbcbba8 Fix AS test suite. 2011-12-10 11:17:00 +01:00
Yehuda Katz
aace38ae09 Merge pull request #3925 from guilleiguaran/extra-test-for-therubyrhino
Add test to verify that therubyrhino isn't included when JRuby isn't used
2011-12-09 21:25:02 -08:00
Yehuda Katz
7fc0964133 Merge pull request #3926 from guilleiguaran/skip-assets-group-if-sprockets-skipped
Skip assets groups if --skip-sprockets option is given
2011-12-09 21:24:02 -08:00
Guillermo Iguaran
b12a17665a Skip assets groups if --skip-sprockets option is given 2011-12-09 21:52:10 -05:00
Guillermo Iguaran
55afc7dc60 Add test to verify that therubyrhino isn't included when JRuby isn't used 2011-12-09 21:38:10 -05:00
Xavier Noria
3e5592848a revises some stuff that was out of sync with the recent generated README.rdoc 2011-12-10 02:10:18 +01:00
Piotr Sarnacki
efed2d56e2 Update partials documentation, partial_path is no longer generated using RecordIdentifier 2011-12-10 01:30:21 +01:00
Aaron Patterson
04ef93dae6 * ActiveSupport::BufferedLogger#silence is deprecated. If you want to squelch
logs for a certain block, change the log level for that block.

*   ActiveSupport::BufferedLogger#open_log is deprecated.  This method should
    not have been public in the first place.

*   ActiveSupport::BufferedLogger's behavior of automatically creating the
    directory for your log file is deprecated.  Please make sure to create the
    directory for your log file before instantiating.

*   ActiveSupport::BufferedLogger#auto_flushing is deprecated.  Either set the
    sync level on the underlying file handle like this:

        f = File.open('foo.log', 'w')
        f.sync = true
        ActiveSupport::BufferedLogger.new f

    Or tune your filesystem.  The FS cache is now what controls flushing.

*   ActiveSupport::BufferedLogger#flush is deprecated.  Set sync on your
    filehandle, or tune your filesystem.
2011-12-09 16:05:57 -08:00
Aaron Patterson
f79b257e0b Merge pull request #3924 from laserlemon/readme-ext
Add the .rdoc extension to the README that Rails generates for a new app
2011-12-09 14:27:41 -08:00
Steve Richert
5c60b44837 Add the .rdoc extension to the README that Rails generates for a new application 2011-12-09 17:00:37 -05:00
Piotr Sarnacki
866d2dbd87 Fix indentation 2011-12-09 22:00:56 +01:00
Piotr Sarnacki
35a1744a45 Allow to run migrations with given scope, with SCOPE=<scope>
Scope in migrations can be defined by adding suffix in filename,
like: 01_a_migration.blog.rb. Such migration have blog scope.

Scope is automatically added while copying migrations from engine,
so if you want to revert all of the migrations from given engine,
you can just run db:migrate with SCOPE, like:

    rake db:migrate SCOPE=blog
2011-12-09 22:00:51 +01:00
Piotr Sarnacki
f0b782d060 Allow to filter migrations by passing a block
Example:
  ActiveRecord::Migrator.migrate(path) do |migration|
    migration.name =~ /User/
  end

The above example will migrate only migrations with User in
the name
2011-12-09 21:43:36 +01:00
José Valim
ab30570b69 Fix extend -> include. 2011-12-09 21:42:18 +01:00
Aaron Patterson
5b82f50fef Use table_exists? from the schema cache. 2011-12-09 11:23:19 -08:00
Aaron Patterson
007965a651 don't need a begin / end. 2011-12-09 10:18:10 -08:00
Aaron Patterson
a29d1dbd59 squelch table exists? queries. 2011-12-09 10:14:49 -08:00
Aaron Patterson
c212a34e1d only load converter if the encodings are different 2011-12-09 09:33:36 -08:00
David Heinemeier Hansson
22a6079a20 Make ActiveSupport::Benchmarkable a default module for ActionController::Base, so the #benchmark method is once again available in the controller context like it used to be *DHH* 2011-12-09 18:17:57 +01:00
Piotr Sarnacki
929b2646b6 Compare migrations for copying only by name and scope 2011-12-09 12:15:54 +01:00
Piotr Sarnacki
ed0b1f6eed Add suffix for migrations copied from engines 2011-12-09 11:45:19 +01:00
Piotr Sarnacki
255d9f5ac1 String#to_a is not available in 1.9 2011-12-09 10:33:37 +01:00
José Valim
5ad5215211 Deprecate implicit layout lookup in favor of inheriting the _layout config. 2011-12-09 07:20:55 +01:00
José Valim
2995134cba Simplify path traversal logic 2011-12-09 06:25:10 +01:00
Piotr Sarnacki
1d9de9d758 Run also migrations in subdirectories.
With this commit, ActiveRecord will also look for migrations
in db/migrate subdirectories.
2011-12-09 03:33:06 +01:00
Piotr Sarnacki
b164ab75d6 Fix railties tests, identical migrations are not considered when copying 2011-12-09 03:33:06 +01:00
Piotr Sarnacki
62d556424a Ignore origin comment when checking for duplicates on Migration.copy
49ebe51 fixed copying migrations, but existing migrations would still
trigger warnings. The proper way to compare migrations is to ignore
origin lines - if migration is identical it means that we can
silently skip it, regardless where it comes from.
2011-12-09 01:54:20 +01:00
Piotr Sarnacki
652db2fc3e Fix copying migrations from engines
There was a bug in ActiveRecord::Migration.copy method, which
prevented adding special comment about the origin of migration.

Because of that, the check if migration is identical or if it's
not and should be skipped was always saying that migration is
skipped, which was causing additional useless warnings about
skipped migrations.
2011-12-09 01:54:20 +01:00
Aaron Patterson
2c471b3ac8 load the encoding converter to work around [ruby-core:41556] when switching encodings 2011-12-08 15:14:07 -08:00
Aaron Patterson
8c26cd5d97 Exceptions should read from the spec configu 2011-12-08 15:14:07 -08:00
José Valim
d4d99bbc87 Fix another regression related to the layout optimization. 2011-12-08 22:56:50 +01:00
José Valim
c41f08cefe Move symbolize keys to the inner options as we can assume url_options will be properly symbolized. 2011-12-08 21:20:47 +01:00
Jon Leighton
5da90b3483 Fix #3890. (Calling proxy_association in scope chain.) 2011-12-08 20:10:04 +00:00
José Valim
ebd71fd0e3 Fix a regression and also fix broken test. 2011-12-08 21:00:34 +01:00
Vijay Dev
94dcbe8115 fix nodocs 2011-12-09 01:15:54 +05:30
Vijay Dev
120861c023 add haml and slim to the list of extensions supported by rake notes 2011-12-09 01:02:27 +05:30
Vijay Dev
965f6f22aa fix comments 2011-12-09 01:02:27 +05:30
Vijay Dev
c81bb97753 minor text change 2011-12-09 01:02:27 +05:30
José Valim
d1abf29e79 Remove NilClass whiners feature.
Removing this feature causes boost in performance when using Ruby 1.9.

Ruby 1.9 started to do implicit conversions using `to_ary` and `to_str`
in some STDLIB methods (like Array#join). To do such implicit conversions,
Ruby 1.9 always dispatches the method and rescues the NoMethodError exception
in case one is raised.

Therefore, since the whiners feature defined NilClass#method_missing, such
implicit conversions for nil became much, much slower. In fact, just defining
NilClass#method_missing (even without the whiners feature) already causes a
massive slow down. Here is a snippet that shows such slow down:

    require "benchmark"
    Benchmark.realtime { 1_000.times { [nil,nil,nil].join } }

    class NilClass
      def method_missing(*args)
        raise NoMethodError
      end
    end

    Benchmark.realtime { 1_000.times { [nil,nil,nil].join } }
2011-12-08 20:28:09 +01:00
José Valim
7280787a53 Improve cache on route_key lookup. 2011-12-08 19:53:16 +01:00
Aaron Patterson
3cae753963 fixing eval'd line numbers. 2011-12-08 10:39:12 -08:00
Aaron Patterson
d80e4ee20e Regexp.union seems to have different results in 1.8 2011-12-08 10:20:14 -08:00
José Valim
859a4556dd Revert accidental change from cattr_accessor to class_attribute. 2011-12-08 19:01:15 +01:00
Xavier Noria
b989b80960 Merge pull request #3909 from laserlemon/patch-1
Add dependency status (a la build status) to the README
2011-12-08 09:30:31 -08:00
Steve Richert
255c485d63 Add dependency status (a la build status) to the README 2011-12-08 12:17:28 -05:00
José Valim
7b1930a9b2 Merge pull request #3908 from kennyj/should_use_default_charset
Fix a failure in railties on ruby 1.8.x
2011-12-08 08:55:03 -08:00