Commit Graph

962 Commits

Author SHA1 Message Date
Jack Dempsey
88d8ca2ef9 use parens and silence ambiguous args warnings 2011-03-14 02:54:44 +08:00
José Valim
f00a398456 log and readme should respect --quiet 2011-03-04 13:05:27 +01:00
Prem Sichanugrist
515ea955b6 Always use ActionDispatch::ShowExceptions middleware [#6462 state:resolved]
This will make sure the application will raise `ActionController::RoutingError` in case "X-Cascade: pass" header was set, usually when there's no route match.
2011-02-25 10:03:53 -08:00
Prem Sichanugrist
439a74520d Make sure that we set env["action_dispatch.show_exceptions"]
This has been used by `show_exception` middleware even the setting wasn't get passed to `env` hash.
2011-02-25 10:03:40 -08:00
Vinicius Baggio
e8a578224f Removing redundant File.expand_path from generators test
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-02-23 19:42:51 +01:00
Emilio Tagua
18439e28e0 We really don't care about IM middleware order, the important is that it gets included. 2011-02-18 14:57:29 -08:00
Emilio Tagua
0b702ba3de Merge remote branch 'rails/master' into identity_map
Conflicts:
	activerecord/lib/active_record/associations/association.rb
	activerecord/lib/active_record/fixtures.rb
2011-02-18 15:29:33 -03:00
Timothy N. Tsvetkov
c6fac7b449 Fixed issue #6363, avoid to pluralized already pluralized names and singularize a single in generators, for example stadia is a valid plural for stadium. But calling pluralize for stadia will return stadias which sematically is not corrent in this case
[#6363 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-16 15:09:06 -02:00
Emilio Tagua
8ee0b44148 Merge remote branch 'rails/master' into identity_map
Conflicts:
	activerecord/examples/performance.rb
	activerecord/lib/active_record/association_preload.rb
	activerecord/lib/active_record/associations.rb
	activerecord/lib/active_record/associations/association_proxy.rb
	activerecord/lib/active_record/autosave_association.rb
	activerecord/lib/active_record/base.rb
	activerecord/lib/active_record/nested_attributes.rb
	activerecord/test/cases/relations_test.rb
2011-02-15 12:01:04 -03:00
Eric Allam
d729e5f97e Failing test for #6388 2011-02-09 12:19:08 +01:00
John Hawthorn
a3f5d7159d fix db:fixtures:load with FIXTURES specified [#6061 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-06 18:45:42 -02:00
Ben Orenstein
4b2889e771 Correct migration name the test is looking to match.
[#6375 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-04 20:25:13 -02:00
Michał Łomnicki
4e39072017 Configurable generation of add_index for references columns
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-01 22:50:51 -02:00
Saimon Moore
b1ca339b53 Additionally trigger i18n configuration setup before any eager loading [#6353 state:resolved]
This handles the case where config.cache_classes is true and classes
are loaded before the I18n load path has had a chance to be populated.

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-02-01 15:35:48 -02:00
Philip Arndt
99f751ffef Test non zero exit code and that a message still appears when generating inside an existing Rails directory. 2011-01-29 16:51:42 +08:00
Philip Arndt
a812cb6707 Dir.chdir is not useful in this test, that was for another one I am planning to do. 2011-01-29 16:51:41 +08:00
Philip Arndt
34fef7e258 Added test to ensure non zero exit codes when generating an application with a reserved name.
Unfortunately, I can't find out how to suppress its output so we see ....Invalid application name test. Please give a name which does not match one of the reserved rails words.....................................
2011-01-29 16:51:41 +08:00
Aaron Patterson
8f88a28416 change sqlite3-ruby => sqlite3 in the generators 2011-01-16 13:29:08 -08:00
Santiago Pastorino
bbcdc864a6 README.rdoc is a template 2011-01-15 04:13:43 -02:00
Santiago Pastorino
d75ff73a72 plugin new generator should generate config/routes.rb file for full engines 2011-01-14 23:34:10 -02:00
Santiago Pastorino
20897a6c2c Allow generators nested in more than one level 2011-01-12 21:42:56 -02:00
Aaron Patterson
31293ba9d3 remove locales external to the system before assertion 2011-01-12 11:15:11 -08:00
Prem Sichanugrist
4805ec1449 Add test cases for model and migration generators which use change method. 2011-01-04 11:17:07 -08:00
Prem Sichanugrist
ad343d7263 Use Rails 3.1 change method in 'add_' migration generator 2011-01-04 11:16:52 -08:00
Prem Sichanugrist
9e64dfad0d Use Rails 3.1 change method in model generator 2011-01-04 11:16:52 -08:00
Prem Sichanugrist
fd1daf9a8e Make sure that generator's default banner is showing its namespace
This will make `rails g rspec:install --help` shows "rails generate rspec:install [options]" and not "rails generate install  [options]"
2011-01-01 11:58:09 -08:00
Piotr Sarnacki
484d2aaed7 Do not take gems' i18n locales while testing locales paths 2010-12-31 13:56:07 +01:00
Emilio Tagua
02fc6fbccd Merge remote branch 'rails/master' into identity_map
Conflicts:
	activerecord/lib/active_record/associations/association_proxy.rb
	activerecord/lib/active_record/autosave_association.rb
	activerecord/lib/active_record/base.rb
	activerecord/lib/active_record/persistence.rb
2010-12-20 11:23:07 -03:00
José Valim
0cbfd6c28d Small changes on AD::Reloader. 2010-12-20 12:43:02 +01:00
John Firebaugh
435bccda93 Replace AD::Callbacks.to_prepare with AD::Reloader.to_prepare
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-20 12:43:02 +01:00
John Firebaugh
0f7c970e4f Introduce ActionDispatch::Reloader
Based on the implementation on the 2-3-stable branch, patches by Hongli
Lai <hongli@phusion.nl>, and helpful suggestions from José Valim.

Hongli Lai's patches included locking around the request cycle; this is
now handled by Rack::Lock (https://github.com/rack/rack/issues/issue/87/).

[#2873]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-20 12:43:02 +01:00
Piotr Sarnacki
d4f995301b More love for engines tests 2010-12-19 23:36:29 +01:00
John Firebaugh
916c25aeee Use assert_body 2010-12-19 22:39:21 +01:00
Piotr Sarnacki
37e643120a Temporary fix for railties test for newest rack changes 2010-12-19 17:57:36 +01:00
Piotr Sarnacki
d9b732fcad Fix tests in railties 2010-12-18 21:47:27 +01:00
Santiago Pastorino
3b9120fa52 Generate add_index by default when giving type belongs_to or references 2010-12-16 20:58:58 -02:00
Piotr Sarnacki
e89fff2f6b Bring back config.action_view.cache_template_loading [#5847 state:resolved] 2010-12-16 22:24:48 +01:00
Santiago Pastorino
81cf98d342 dragdrop was tested twice and effects.js was missing, added checks for controls.js, dragdrop.js and effects.js to another test 2010-12-16 11:37:11 -02:00
Piotr Sarnacki
ed32c8fe51 Generate default layout in engine with --mountable option 2010-12-16 01:49:30 +05:30
Piotr Sarnacki
7f77d6691f Fix generation of prototype files, it should work with --javascript prototype, not --prototype 2010-12-16 01:49:30 +05:30
Piotr Sarnacki
978314c4e1 Generate javascripts in engine with --mountable option 2010-12-16 01:49:30 +05:30
Piotr Sarnacki
a462a76bd3 Set proper engine's asset directories when assets are served from engine.
When using stylesheet_link_tag(:all) or javascript_include_tag(:all),
assets directories are searched for css or js files. When
config.serve_static_assets is set to true, those files can be
served directly from engine's directories. That's why assets paths
should be set individually for controllers inside engine
if we want to serve static assets with ActionDispatch::Static
2010-12-16 01:49:29 +05:30
Piotr Sarnacki
0dc39cd8ee Skip creating migration if --skip option is passed to model generator [#6144 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-16 01:49:28 +05:30
Piotr Sarnacki
e6928e8c35 Allow to generate namespaced generators [#6140 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-16 01:49:28 +05:30
José Valim
1860d873f2 Ensure asset_path defaults to nil for application 2010-12-09 21:19:06 +01:00
Piotr Sarnacki
051127d4d3 Rails::Engine.find(path) - method to find engine by path 2010-12-09 01:59:54 +01:00
Piotr Sarnacki
5df72a238e Rake tasks for managing database while development and testing of engines
Some of the engines needs database. As engine needs to be run inside
Rails application, migrations and other database operations are run
from dummy application. To make that process simple I changed db
tasks to look for migrations in both engine's and application's
db/migrate directory. You can run all of the database tasks from
test/dummy or directly from engine with prefix app, like:

  rake app:db:migrate
  rake app:db:migrate:redo
2010-12-09 01:59:54 +01:00
Mikel Lindsaar
667bcac439 Application templates should work with HTTPS too 2010-11-27 22:16:15 +11:00
Piotr Sarnacki
f821055dc7 Do not create table_name_prefix method on isolated module if the method already exists.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-11-22 13:43:12 +01:00
Emilio Tagua
5098302fa1 Simplify remove_from_config. 2010-11-19 19:09:00 -03:00