Commit Graph

4524 Commits

Author SHA1 Message Date
Xavier Noria
db520042b3 Merge branch 'master' of git://github.com/lifo/docrails 2010-10-06 23:16:13 +02:00
Hemant Kumar
2a04110f26 fix ruby 1.9 deadlock problem, fixes #5736 add connection pool tests 2010-10-06 14:45:56 -06:00
José Valim
d649bf158b Provide a cleaner syntax for paths configuration that does not rely on method_missing. 2010-10-06 17:20:15 +02:00
Aaron Patterson
e7d860c6be create fewer objects, call fewer methods in extract_pg_identifier_from_name 2010-10-04 15:25:20 -07:00
Aaron Patterson
d8135eb452 * + flatten is not required in >= Ruby 1.8.7 2010-10-04 15:19:27 -07:00
Aaron Patterson
69a2c6b041 converting inject([]) to map 2010-10-03 16:42:08 -07:00
Aaron Patterson
365c93b7cd speed up duplicate migration detection 2010-10-03 16:39:48 -07:00
Aaron Patterson
40761c4bf3 reduce the number of calls to camelize 2010-10-03 16:36:43 -07:00
Aaron Patterson
e6583901e5 convertion MigrationProxy to a Struct, initialize instance variables 2010-10-03 16:32:27 -07:00
Aaron Patterson
341e71a1b9 dry up some migration logic 2010-10-03 16:23:07 -07:00
Aaron Patterson
8beda11fd3 no need to differentiate between nil and false in this case 2010-10-03 16:13:45 -07:00
Aaron Patterson
5154a464cc lengths will be nil or an array 2010-10-03 15:35:56 -07:00
Aaron Patterson
7836616a64 remove a few function calls 2010-10-03 15:18:32 -07:00
Aaron Patterson
bd78d24bd8 be kind to the garbage collector and reuse our visitor object 2010-10-03 14:40:06 -07:00
Aaron Patterson
83633b807a avoid creating objects when we can 2010-10-03 14:40:06 -07:00
José Valim
50215f9525 Rely on Rack::Session stores API for more compatibility across the Ruby world. 2010-10-03 21:24:22 +02:00
Carlos Antonio da Silva
4e93179ed3 Refactor AssociationCollection#include? with objects in memory
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-02 08:40:38 +02:00
Evgeniy Dolzhenko
ee31847a5a Fix serialization :include option name 2010-10-01 14:26:17 +04:00
Aaron Patterson
45edeed1ee Arel::Sql::Engine.new does not do anything anymore 2010-09-30 16:28:12 -07:00
Aaron Patterson
0238228e5d type_name should check for blank because people may have messed up databases 2010-09-30 16:03:05 -07:00
Aaron Patterson
15419a5dc6 build_where should be private 2010-09-30 14:37:09 -07:00
Aaron Patterson
fb4ee9c7e5 type_name is never a blank string, so use faster .nil? call 2010-09-30 14:37:04 -07:00
Marcelo Giorgi
ef6df93a8d AssociationCollection#include? working properly for objects added with build method [#3472 state:resolved] 2010-09-30 12:13:52 -07:00
Aaron Patterson
505b532605 speeding up object instantiation by eliminating instance_eval 2010-09-30 12:13:12 -07:00
Aaron Patterson
a8a62f87f6 [#5441 state:resolved] refactoring code to determine aggregate column 2010-09-30 10:17:38 -07:00
Aaron Patterson
cc18034c8c group clause must be more specific 2010-09-30 10:17:34 -07:00
oleg dashevskii
ab9622ee62 Tests proving #5441 2010-09-30 10:17:29 -07:00
yalab
91deff08c9 Fix 'rake db:create' is ignore encoding when using postgres [#5717 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-30 13:53:06 -03:00
Piotr Sarnacki
f851352318 Added config.app_generators to allow configuring application's generators from railties.
With config.generators becomes a way to configure generators
for current instance only. For example:

module Blog
  class Engine < Rails::Engine
    config.generators do |g|
      g.orm :active_record
    end

    config.app_generators do |g|
      g.test_framework :rspec
    end
  end
end

such definition sets :active_record as orm for engine and :rspec
as test_framework for application. The values set with app_generators
can be overwritten in application using config.generators as you would
normally do:

module MyApp
  class Application < Rails::Application
    config.generators do |g|
      g.test_framework :test_unit
    end
  end
end
2010-09-30 09:47:06 +02:00
Neeraj Singh
396f3a28f1 double negative is not good 2010-09-30 08:11:36 +08:00
Neeraj Singh
299e9f6927 no need of nil check 2010-09-29 16:43:00 -07:00
Emilio Tagua
61cf11247b Use detect instead select to avoid "sh: [mysqldump]: command not found".
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-29 20:29:51 +02:00
Aaron Patterson
5793d5e002 eliminating method_missing on TableDefinition 2010-09-29 11:18:43 -07:00
Aaron Patterson
b9215273a9 DRY up postgresql quote logic 2010-09-29 10:36:33 -07:00
Aaron Patterson
4350a5c73f fixing where clause indentation 2010-09-29 10:36:33 -07:00
Aaron Patterson
5e77872ac9 use consistent method calls for column inspection 2010-09-29 10:36:33 -07:00
Aaron Patterson
df9abfab6f require pg when this adapter is loaded 2010-09-29 10:36:33 -07:00
Aaron Patterson
b5b7f2e442 only reopen ConnectionAdapters once 2010-09-29 10:36:33 -07:00
Aaron Patterson
b2979117e0 use inheritence to deal with custom methods 2010-09-29 10:36:32 -07:00
Aaron Patterson
2cc4b7f297 fisting test organization 2010-09-29 10:36:32 -07:00
Aaron Patterson
995ad3b378 just use if rather than nil? 2010-09-29 10:36:32 -07:00
Aaron Patterson
b3c7766df7 just require sqlite3 when the database adapter is required 2010-09-29 10:36:32 -07:00
Aaron Patterson
dec3a759d1 removing more useless code! yay! 2010-09-28 17:32:38 -07:00
Aaron Patterson
8d9f7b5b99 SqlLiteral is a string, so we can dry up these conditionals 2010-09-28 17:31:31 -07:00
Aaron Patterson
b50b1ef9e8 shorten up or sql literal creation statements 2010-09-28 17:12:19 -07:00
Aaron Patterson
39d98e5c09 we only care about arrays and strings 2010-09-28 17:05:32 -07:00
Aaron Patterson
957e6fbe2a dry up calls to arel.join() 2010-09-28 17:03:36 -07:00
Aaron Patterson
ef2392f60b removing unused lasgns 2010-09-28 16:59:38 -07:00
Aaron Patterson
e6ca7e7197 refactoring to remove crazy logic 2010-09-28 16:14:39 -07:00
Aaron Patterson
c2cad2d97e where_values_hash always returns a hash 2010-09-28 15:56:08 -07:00