Commit Graph

1441 Commits

Author SHA1 Message Date
Jeremy Kemper
42f6e9fb38 Freeze the middleware stack after it's built
So apps that accidentally add middlewares later aren't unwittingly dumping them in a black hole.

Closes #5911
2012-04-20 16:02:12 -07:00
Santiago Pastorino
3df776c9ad Fix test 2012-04-16 23:36:09 -03:00
Arun Agrawal
ba3e27532b fix scaffold_generator_test.rb and model_generator_test.rb
Broken after this 6a054b0038bac288a1f6e45feb5470f4ee492081
2012-04-16 12:10:39 +05:30
ask
4bb76eecfe "rails new -h" shows message in rails directory 2012-04-09 22:26:52 +06:00
Jeremy Kemper
e4f911aa2a Fix a couple more script[type=text/javascript] tests affected by #5748 2012-04-08 07:28:31 -07:00
Jurriaan Pruis
2d8396fc9f Updated/changed useless tr/gsubs 2012-04-03 15:16:09 +02:00
Piotr Sarnacki
fff3e75e1c Usage file in generators shouldn't be fetched only based on source_root
In case `source_roout` is not set, `default_source_root` is used,
which includes also `templates` directory. If there is no `templates`
directory, `default_source_root` is not available and USAGE will not
be displayed. USAGE should be also checked based on default
directory excluding `templates`.
2012-04-01 23:51:18 +02:00
Ben Woosley
f7a39c848a Drop Paths::Root initializer check of #path as it isn't checked in the #path= or anywhere else 2012-03-29 02:53:25 -07:00
Franck Verrot
4882271f6b Rails.initialized? can be called at any time without raising an exception [Closes #2507]
Changes:

* `Rails.initialized=` has been removed
* `Rails.initialized?` and `Rails.application.initialized?` are now
* delegating to `MyApp::Application.initialized?`
2012-03-28 00:42:59 +02:00
Aaron Patterson
4946107925 favor composition over inheritance 2012-03-26 17:25:44 -07:00
Aaron Patterson
e944b296a9 Merge pull request #5550 from schneems/schneems/server_env
Fix environment support for rails server, and match interface of rails console
2012-03-23 10:36:16 -07:00
schneems
7529283732 match rails console environment support, to server
rails server takes `-e` as an argument to specify RAILS_ENV, rails console currently does not have the same interface. This commit fixes this disparity so developers can manually specify `RAILS_ENV` or can pass in an environment with a `-e`.
2012-03-22 13:13:12 -04:00
Anton Lindqvist
c5f4b20275 Fixed missing space bug introduces in rails/rails@9299bfdcd3. 2012-03-22 12:25:28 +01:00
Marcelo Silveira
86d1dfb821 Avoid another blank line in generated migration and remove assertion as per @spastorino request 2012-03-21 19:28:34 -03:00
José Valim
14b2cf6a0a Merge pull request #5532 from mhfs/migration_blank_line
Remove blank line from generated migration
2012-03-21 00:34:38 -07:00
Travis Jeffery
b2a59388b2 Generate Migration Thats Adds Removed Index
When generating a migration that removes a field with an index, the down
will add both the field and its index.
2012-03-21 01:20:35 +00:00
schneems
0a555dd421 fix rails server support of RAILS_ENV variable
When launching rails server from the command line with a rails environment specified such as `rails server RAILS_ENV=production` an error would occur since rails will try to use `RAILS_ENV=production` as it's server. 

When launching rails with a specified server such as thin `rails server thin RAILS_ENV=production` no error will be thrown, but rails will not start up in the specified environment.

This fixes both of those cases
2012-03-20 20:58:50 -04:00
Marcelo Silveira
c63306b1a8 Remove blank line from generated migration 2012-03-20 21:44:45 -03:00
Piotr Sarnacki
d3bbb23b2f Merge pull request #5492 from arunagw/build_fix_app_generator_test
Build fix for app_generator_test.rb
2012-03-18 04:58:41 -07:00
Arun Agrawal
62e0337db1 Build fix for app_generator_test.rb 2012-03-18 10:24:18 +05:30
Aaron Patterson
2b5cb1cd41 Merge pull request #5486 from kennyj/fix_5435
Fix GH #5435. db:structure:dump should be re-enable.
2012-03-17 21:50:37 -07:00
Rafael Mendonça França
9ec63eb049 Rack::SSL -> ActionDispatch::SSL 2012-03-17 13:36:35 -03:00
kennyj
0360b3eb1f Fix GH #5435. db:structure:dump should be reenable. 2012-03-17 13:57:10 +09:00
José Valim
fbc9d0f44f Simplify helpers handling. Ensure Metal can run AC hooks. 2012-03-15 08:48:38 +01:00
José Valim
6db930cb5b Remove --http. 2012-03-14 22:30:01 +01:00
Carlos Antonio da Silva
2963ee6b4b Fix scaffold controller template, ensure rake scaffold test pass by default 2012-03-14 14:47:20 -03:00
Carlos Antonio da Silva
96aea58f22 Do not generate app/views and sprockets entries on http app
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:25 -03:00
Carlos Antonio da Silva
570cc89bad Generate special controller and functional test templates for http apps
The main goal is to not generate the format.html block in scaffold
controller, and to generate a different functional test as we don't rely
on redirects anymore, we should test for http responses.

In addition to that, the :edit action is removed from the http
controller and the edit route is not generated by default, as they
usually do not make sense in this scenario.

[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:25 -03:00
Carlos Antonio da Silva
3e138df977 Rename http-only app generator option to http
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
7f3847cc14 Add test to ensure setting config.generators.http_only actually disables the generator options
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
ff8e9e07b4 Allow generator configs from http_only! to be overriden by app
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
2b355757d5 Remove duplicated tests from shared generator
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
219ff43639 Disable template, helper and assets options when using http_only!
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
c825e9a5ea Create generators http_only! setup and hide some common namespaces for now
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:24 -03:00
Carlos Antonio da Silva
124838b508 Generate middleware http_only! config when running http only app generator
[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:23 -03:00
Carlos Antonio da Silva
5c8c7ca2f9 Add http-only option to Rails app generator
Change application controller template accordingly, to inherit from
ActionController::HTTP and not generate protect_from_forgery call.

[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:23 -03:00
Santiago Pastorino
4c16791f35 Add ActionController::HTTP
More info http://edgeguides.rubyonrails.org/api_app.html

[Carlos Antonio da Silva & Santiago Pastorino]
2012-03-14 12:46:23 -03:00
Carlos Antonio da Silva
a8dd21d8b4 Remove IdentityMap 2012-03-13 20:08:54 -03:00
Guillermo Iguaran
e8296a0288 The sprockets railtie was moved to sprockets/rails/railtie 2012-03-13 18:06:02 -05:00
José Valim
2d3550c4be Merge pull request #5415 from rafaelfranca/refactor
Refactor the test_unit scaffold generator to use the key_value method
2012-03-13 14:20:43 -07:00
José Valim
ae67a63fe9 Merge pull request #572 from sikachu/remove_activeresource
Remove Active Resource source files from the repository.
2012-03-13 14:04:03 -07:00
Piotr Sarnacki
52bfb48745 Environment in engines tests is required on boot_rails, no need to require explicitly 2012-03-13 21:01:45 +01:00
Piotr Sarnacki
5e754a0a98 Don't need to share engine's tests anymore, plugins are gone 2012-03-13 21:01:44 +01:00
Piotr Sarnacki
24e00e1eb7 Ensure that engine can be mounted at root (#4314)
It's already fixed and the fix was actually in journey library,
but with #4314 it reappeared second time, so probably this
kind of integration test will be good to have to not allow it to
sneak in after changes in journey or rails itself.
2012-03-13 21:01:44 +01:00
Prem Sichanugrist
f1637bf2bb Remove Active Resource source files from the repository
Dear Active Resource,

It's not that I hate you or anything, but you didn't get much attention lately. There're so many alternatives out there, and I think people have made their choice to use them than you. I think it's time for you to have a big rest, peacefully in this Git repository.

I will miss you,

@sikachu.
2012-03-13 14:55:44 -04:00
Rafael Mendonça França
7c00cde79f Refactor the test_unit scaffold generator to use the key_value method 2012-03-13 14:19:03 -03:00
Rafael Mendonça França
08db3d5af3 Use the attributes hash explicitly 2012-03-13 11:21:29 -03:00
Rafael Mendonça França
7ad4c7c881 Do not use the attributes hash in the scaffold functional tests 2012-03-12 19:45:01 -03:00
Michael Koziarski
411a826583 Merge pull request #5326 from lest/patch-2
configure how unverified request will be handled
2012-03-10 16:16:35 -08:00
Santiago Pastorino
147c20b629 Fix broken tests 2012-03-10 19:15:29 -02:00