Commit Graph

2210 Commits

Author SHA1 Message Date
José Valim
0bb95968db More code refactoring. 2009-06-25 15:45:15 +02:00
José Valim
d5bdf31d89 Refactoring out descriptions. 2009-06-25 13:46:19 +02:00
José Valim
6e6c0117b3 Added Mailer generaator template engine and test framework agnostic. 2009-06-25 12:57:58 +02:00
José Valim
ed33c29a4e Added class collision checks. 2009-06-25 11:56:18 +02:00
José Valim
4573fd2e06 Added observer generator. 2009-06-25 11:24:35 +02:00
José Valim
eaef1ee09c Make tests pass again after merge. 2009-06-25 10:44:46 +02:00
José Valim
5337766fa0 Tests for metal generator. 2009-06-25 10:39:44 +02:00
José Valim
f596495556 Tests for plugin generator. 2009-06-25 10:39:44 +02:00
José Valim
a748bb7961 Get base_name from class_name. 2009-06-25 10:39:43 +02:00
José Valim
0ed602b3ef Removed TODOs. 2009-06-25 10:39:43 +02:00
José Valim
ccd26575d1 Clean up plugin generator. 2009-06-25 10:39:43 +02:00
José Valim
b72d966707 Merge branch 'master' of git://github.com/rails/rails 2009-06-25 10:38:17 +02:00
Yehuda Katz + Carl Lerche
3aad4d7fbe Separate Rails module methods, the config object, and the initializer into separate files. 2009-06-23 16:10:43 -07:00
Yehuda Katz + Carl Lerche
ce9d9fda77 Resurrect threadsafe! 2009-06-23 14:49:04 -07:00
Yehuda Katz + Carl Lerche
042bd0a5c8 Tests pass, AWDoR passes, and a fresh app boots. 2009-06-23 14:49:04 -07:00
Yehuda Katz + Carl Lerche
9d398f4827 Got all the railties tests to pass, rails must boot! 2009-06-23 14:49:04 -07:00
Yehuda Katz + Carl Lerche
30baaac546 Fix the default frameworks 2009-06-23 14:49:04 -07:00
Yehuda Katz + Carl Lerche
9cfd1d4491 Get more tests to pass 2009-06-23 14:49:04 -07:00
Yehuda Katz + Carl Lerche
f2aea4d3ea Get initializer_test.rb to pass with the new initializer. 2009-06-23 14:49:03 -07:00
Yehuda Katz + Carl Lerche
a3309e4d70 Started making progress on implementing a new initializer.
Class.any_instance.expects(:require).raises(LoadError)
	... w0t
2009-06-23 14:49:03 -07:00
Yehuda Katz + Carl Lerche
99b8248f6e Initial initializer impl 2009-06-23 14:49:03 -07:00
Yehuda Katz + Carl Lerche
805369c8c8 Starting to write the new initializer 2009-06-23 14:49:03 -07:00
José Valim
8843b91da7 Delete uneeded USAGE file. 2009-06-23 20:45:27 +02:00
José Valim
ea106cf051 Added plugin generators (and a couple of TODOs). 2009-06-23 20:42:29 +02:00
José Valim
d7bab3a43a Splitting base into several files. 2009-06-23 19:45:50 +02:00
José Valim
a7ba4b95e9 TestUnit, you have a home. 2009-06-23 19:27:46 +02:00
José Valim
4494a752c3 Change current sstructure. 2009-06-23 19:10:42 +02:00
José Valim
75fbd73936 Add GeneratedAttribute. 2009-06-23 18:12:37 +02:00
José Valim
d4ec091580 Removing template runner old specs. 2009-06-23 16:58:43 +02:00
José Valim
83f7fe2028 NamedBase. 2009-06-23 16:53:48 +02:00
José Valim
301c48c15c Added a generator file responsable for loading generator files. 2009-06-23 16:53:47 +02:00
José Valim
1845675822 Added metal generator. 2009-06-23 16:53:47 +02:00
José Valim
f03890e151 Use Rails generators files organization. 2009-06-23 16:53:47 +02:00
José Valim
04eb5b6e34 Use Rails default banner. 2009-06-23 16:53:47 +02:00
José Valim
6dd196914c Remove class level conditions and ensure that RAILS_GEM_VERSION is commented when freeze. 2009-06-20 22:04:34 +02:00
José Valim
2c3ebc00b7 More tests to app generator. 2009-06-20 16:58:15 +02:00
José Valim
181feecfb9 First stub at app generators test. 2009-06-20 15:43:25 +02:00
José Valim
68739eed57 Skip Rails::VERSION warnings. 2009-06-19 16:19:15 +02:00
José Valim
631deb5992 Removing duplicated files. 2009-06-19 16:14:49 +02:00
José Valim
5b8fe9c4c7 Moving tests to new generators schema. 2009-06-19 16:11:55 +02:00
José Valim
9dd1e2f2b0 Starting test structure. 2009-06-19 16:11:55 +02:00
José Valim
bd216924a3 No more application generator. 2009-06-19 16:11:55 +02:00
José Valim
6658711775 Template wwas not found? Raise an error. 2009-06-19 16:11:55 +02:00
José Valim
98adc9a42e Secret key generator. You are gone. 2009-06-19 16:11:55 +02:00
José Valim
94a83007b6 Kick boot_test back to life. 2009-06-19 16:11:54 +02:00
José Valim
7a8e284766 Refactor shebang to a class method, so other generators can use it. 2009-06-19 16:11:54 +02:00
José Valim
748e1d6745 Require open-uri, we will need it. 2009-06-19 16:11:54 +02:00
José Valim
cd05ed6711 Do not show status when calling gsub_file or append_file. 2009-06-19 16:11:54 +02:00
José Valim
e0a4d8be93 Fix shebang on created files. 2009-06-19 16:11:54 +02:00
José Valim
6f044c9b6c Change --freeze alias from -f to -F to avoid conflict with --force. 2009-06-19 16:11:54 +02:00
José Valim
768d763436 Apply template when required. 2009-06-19 16:11:54 +02:00
José Valim
9b82fa159a Freeze rails when required. 2009-06-19 16:11:54 +02:00
José Valim
b9d8fafd7e Update templates to be backwards compatible. 2009-06-19 16:11:54 +02:00
José Valim
090de591fc Raise an error if invalid value for database is provided. 2009-06-19 16:11:54 +02:00
José Valim
6619357f75 When rails is invoked without args, be sure that help is called. 2009-06-19 16:11:54 +02:00
José Valim
01cde13290 Updated namespace so help can show usage properly. 2009-06-19 16:11:54 +02:00
José Valim
30fff3077d Updated dependency, so we can remove extra code. 2009-06-19 16:11:54 +02:00
José Valim
5ff80e7433 bin/rails uses the new generator. 2009-06-19 16:11:53 +02:00
José Valim
b6f826376a Added a couple more options to app generator. 2009-06-19 16:11:53 +02:00
José Valim
615527dcb0 Allow user to skip ActiveRecord, TestUnit and/or Prototype. However any customization should be done with templates. 2009-06-19 16:11:53 +02:00
José Valim
fef38fd542 Small alias typo. 2009-06-19 16:11:53 +02:00
José Valim
a8b3efbe5c Moved prototypes files to where they should be. 2009-06-19 16:11:53 +02:00
José Valim
4bf8f40638 Added usage to app generator. 2009-06-19 16:11:53 +02:00
José Valim
34ed2d8d5e Send new files too. 2009-06-19 16:11:51 +02:00
José Valim
d57b19380e Add base and port actions. Not functional though. 2009-06-19 16:10:43 +02:00
José Valim
ceede90017 Move prototype files to javascripts folder. 2009-06-19 16:10:42 +02:00
José Valim
720aceeea9 Send new files too. 2009-06-19 16:10:42 +02:00
José Valim
ced68c7430 App generator is working using new generators (except for templates). 2009-06-19 16:10:42 +02:00
José Valim
42e51ea9c0 More tasks into app generator. 2009-06-19 16:10:42 +02:00
José Valim
489f422152 Initial scratch of application generator. 2009-06-19 16:10:42 +02:00
Jeremy Kemper
54f4851770 Turn on autolist for debugging also 2009-06-18 21:55:13 -04:00
Yehuda Katz + Carl Lerche
d8f352e970 Rename ActionView::Template::Path ActionView::Resolver 2009-06-17 15:32:55 -07:00
Yehuda Katz + Carl Lerche
85f2f34d5e Remove a stray process2 require 2009-06-16 16:29:33 -07:00
Yehuda Katz + Carl Lerche
7b1f483fda Get all of rake tests to pass 2009-06-15 16:14:45 -07:00
Matt Jones
d7e0cb05cc Fix incorrect specification path in GemDependency#from_directory_name
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2009-06-10 09:57:58 +12:00
Matt Jones
41a94048e5 Fix several issues with the 2.3.2 gem loader.
Incorporates the following:

- migrates back small change to gems:build:force from bfc1609a501fc3ed442685819de5bcdb5fbada1c to finish closing #2266.

- unrolls to_proc calls in gems.rake, to match the change in master.

- fixes #2722 by passing the options hash to dependencies during build. (includes a test)

- fixes #2721 by loading the specification directly in from_directory_name. Adds an option to opt-out of specification loading when needed (in gems:refresh_specs, for instance). Includes tests.

- fixes #2679 by refreshing specs for all frozen gems rather than just gems loaded from the environment.

- fixes #2678 by passing the options hash to dependencies during unpack.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
2009-06-09 19:57:38 +12:00
Tim Connor
6a3f8ae407 Work around a gem dependency edge case that prevents Rails from booting..
If you have a frozen gem with unfrozen dependencies (for instance if the
dependency has native extensions so can't be frozen) you can have a
nightmare upgrade problem, where you cannot rake gems:install, because
rake is broken by a gem loading problem.

If you bump up your frozen gem to a newer version that requires a newer
dependency, everybody else on the team will have rake broken by that
dependency mismatch, since you will have had to specify the dependency
in your config.gems, otherwise nobody will have installed it, since the
parent is frozen. And now the config.gems loading code will kill rake.

[#2609 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-06-05 21:54:56 -07:00
Jeremy Kemper
dcba6e1148 Fix initializer i18n path test 2009-06-01 13:44:43 -07:00
Jeff Dean
b3839f1c98 Updated the db:structure:dump task to properly format the pgdump command when you have multiple schemas in your schema search path.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#2695 state:committed]
2009-06-01 12:12:45 +12:00
Vladimir Dobriakov
64756e8f71 better db:create for mysql - do not assume root user
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1459 state:committed]
2009-06-01 12:09:19 +12:00
Luke Melia
54984f0f24 Avoid loading the ActiveRecord::SessionStore class on initialization if it is not in use [#2737 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-30 09:35:25 -05:00
Jeremy Kemper
cf3ccd7be0 Ruby 1.9: use UTF-8 for default internal and external encodings. 2009-05-28 17:12:48 -05:00
Joshua Peek
d17fb9dc76 Fix script/server's default mount path [#2731 state:resolved] 2009-05-28 09:16:29 -05:00
calavera
0d9e904da3 ensure initialize_database_middleware doesn't use ActionController if action_controller framework is not enabled [#2680 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-27 14:56:14 -05:00
anupom syam
746f3860c1 server command help inconsistency fix [#2685 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-27 14:45:16 -05:00
Fabien Jakimowicz
2cb60abfec Add an model_subclass generator.
This generator creates a new model as a subclass of an existing model and the unit test for that model.  Lets users avoid having to manually delete the fixtures and migration or remember to pass those arguments.

[#2702 state:committed]

Signed-off-by: Michael Koziarski <michael@koziarski.com>
2009-05-27 13:14:04 +02:00
Jeremy Kemper
5f222c524e Remove 'core' fluff. Hookable ActiveSupport.load_all! 2009-05-20 18:12:44 -07:00
Jeremy Kemper
0bdef30f35 Lazy-require Kernel#silence_warnings 2009-05-19 12:19:58 -07:00
Joshua Peek
092089015b Extract generic callbacks middleware from dispatcher 2009-05-17 13:39:55 -05:00
Joshua Peek
8118fca9be Merge Failsafe middleware into ShowExceptions 2009-05-17 12:24:59 -05:00
Mike Gunderloy
344ee681d6 Remove obsolete wiki reference [#2291 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-05-17 15:15:43 +02:00
Paulo Schneider
34874b3bcd Fix typo in the generated routes.rb [#2433 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-05-17 15:00:05 +02:00
Jacob Kjeldahl
d6645a5e52 Supply valid ruby-prof parameters [#1804 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-05-17 14:53:06 +02:00
Yehuda Katz
4fa871654d Get Railties passing again 2009-05-16 12:28:25 -07:00
Pratik Naik
a6d8ca0f0e Include guides directory in the rails gem 2009-05-16 17:10:04 +02:00
Jeremy Kemper
e8550ee032 Cherry-pick core extensions 2009-05-13 12:00:15 -07:00
Jeremy Kemper
4c963972fd Defer rake/contrib requires so we can use the stdlib rake instead of the full gem 2009-05-13 11:43:03 -07:00
David Heinemeier Hansson
4932f7b38f Added db/seeds.rb as a default file for storing seed data for the database. Can be loaded with rake db:seed (or created alongside the db with db:setup). (This is also known as the "Stop Putting Gawd Damn Seed Data In Your Migrations" feature) [DHH] 2009-05-11 19:08:13 +02:00
Matt Jones
bfc1609a50 Remove stray call to gems:unpack in gems:build:force
[#2266 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-05-06 18:57:27 -07:00
Jeremy Kemper
bd7659e014 Fix old reference to ActionController::Failsafe 2009-05-06 01:28:06 -07:00
Tim Connor
e3891601d1 fix problems with requires in metal choking under development reloading [#2579 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-05-04 20:11:24 -05:00
Joshua Peek
b9f9dd8fe9 Fix console 2009-05-04 20:02:14 -05:00
David Dollar
7149ddd2a1 Additional tests for the gem subsystem
* test_gem_ignores_development_dependencies
  * test_gem_guards_against_duplicate_unpacks
  * test_gem_does_not_unpack_framework_gems

[#2236 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-04-29 08:07:57 -07:00
David Dollar
599f2cfb4a Attempt to deal with more cases of gems with native components.
This commit adds a rudimentary check for 'unbuilt' gems, so that we can abort
the application load if there are any gems that have native components that
have not yet been built.

The rake task gems:build has now only builds 'unbuilt' gems as a result.

The rake task gems:build:force has been added to deal with cases of incomplete
builds, or any case where you need to force the build of all of your gems.

Changes the gems:build task to get its gem list by parsing directory entries
in vendor/gems, which sidesteps the chicken/egg issues involved with having a
gem unpacked into vendor/gems without before its native bits are compiled.

[#2266 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-04-28 23:16:47 -07:00
Jeremy Kemper
acd5db300b Rejig active support dependencies to behave better with the boot process 2009-04-28 18:25:35 -07:00
Jeremy Kemper
b825bef74c Fix missing core extension dependencies 2009-04-28 17:58:51 -07:00
Yehuda Katz + Carl Lerche
cecafc52ee Refactor ActionView::Template
ActionView::Template is now completely independent from template
  storage, which allows different back ends such as the database.
  ActionView::Template's only responsibility is to take in the
  template source (passed in from ActionView::Path), compile it,
  and render it.
2009-04-27 11:49:11 -07:00
Hongli Lai (Phusion)
cd9bb88eef Remove reference to Rack::RewindableInput, which has been removed a while ago.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-04-26 11:22:03 -05:00
Jeremy Kemper
cbcc0ca57b Use Symbol#to_proc in rails plugin internals 2009-04-24 10:41:45 -07:00
Jeremy Kemper
bab2bfa692 Removed rest of Symbol#to_proc from railties tests 2009-04-22 19:52:28 -07:00
Jeremy Kemper
236169e85e Missed one 2009-04-22 19:50:24 -07:00
Jeremy Kemper
d23ab4fbb6 Remove Symbol#to_proc dependency 2009-04-22 19:35:58 -07:00
Jeremy Kemper
f5d720fb96 Opt in to Dependencies 2009-04-22 16:42:14 -07:00
Jeremy Kemper
ab321268f8 No more free lunch 2009-04-22 16:10:49 -07:00
Stephen Celis
7a99dc0ac2 Update rails:template task to expand file paths [#2528 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-04-21 17:44:35 +01:00
lifo
5b92dcb675 Merge docrails 2009-04-17 14:28:46 +01:00
Carl Lerche & Yehuda Katz
3c1187699a Makes rails-dev-boost work again 2009-04-14 18:32:31 -07:00
Jeremy Kemper
1120aaceae Fix requires so tests run 2009-04-14 10:53:46 -05:00
Carl Lerche & Yehuda Katz
d9afc51391 Rails server boots again 2009-04-13 17:16:07 -07:00
Carl Lerche & Yehuda Katz
906aebceed Bring abstract_controller up to date with rails/master
Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list
of commits that could not be applied cleanly or are obviated with the
abstract_controller refactor. They all need to be revisited to ensure
that fixes made in 2.3 do not reappear in 3.0:

2259ecf368e6a6715966f69216e3ee86bf1a82a7
AR not available
  * This will be reimplemented with ActionORM or equivalent

06182ea02e92afad579998aa80144588e8865ac3
implicitly rendering a js response should not use the default layout
[#1844 state:resolved]
  * This will be handled generically

893e9eb99504705419ad6edac14d00e71cef5f12
Improve view rendering performance in development mode and reinstate
template recompiling in production [#1909 state:resolved]
  * We will need to reimplement rails-dev-boost on top of the refactor;
    the changes here are very implementation specific and cannot be
    cleanly applied. The following commits are implicated:

      199e750d46c04970b5e7684998d09405648ecbd4
      3942cb406e1d5db0ac00e03153809cc8dc4cc4db
      f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690
      e3b166aab37ddc2fbab030b146eb61713b91bf55
      ae9f258e03c9fd5088da12c1c6cd216cc89a01f7
      44423126c6f6133a1d9cf1d0832b527e8711d40f

0cb020b4d6d838025859bd60fb8151c8e21b8e84
workaround for picking layouts based on wrong view_paths
[#1974 state:resolved]
  * The specifics of this commit no longer apply. Since it is a two-line
    commit, we will reimplement this change.

8c5cc66a831aadb159f3daaffa4208064c30af0e
make action_controller/layouts pick templates from the current instance's
view_paths instead of the class view_paths [#1974 state:resolved]
  * This does not apply at all. It should be trivial to apply the feature
    to the reimplemented ActionController::Base.

87e8b162463f13bd50d27398f020769460a770e3
fix HTML fallback for explicit templates [#2052 state:resolved]
  * There were a number of patches related to this that simply compounded
    each other. Basically none of them apply cleanly, and the underlying
    issue needs to be revisited. After discussing the underlying problem
    with Koz, we will defer these fixes for further discussion.
2009-04-13 15:18:45 -07:00
Manfred Stienstra
f209d3898f Improve tests and code for Rails::InfoController and Rails::Info [#2411 state:resolved]
- Refactor Rails::InfoController tests.
- Return forbidden status from the InfoController for remote requests instead of a 500.
- Add tests for displaying middleware in Rails::Info.

Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-04-07 09:16:48 -05:00
Pratik Naik
632bbbfe1c Merge docrails 2009-04-05 12:36:36 +01:00
Michael Schuerig
cad3e8b261 Show installed middleware in builtin rails info (/rails/info/properties) [#2396 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-04-02 11:54:52 -05:00
Pratik Naik
f97832b1e4 Merge docrails 2009-03-24 12:15:43 +00:00
Pratik Naik
93b98cb841 Ensure script/plugin doesn't show error message when svn externals are not there 2009-03-18 18:39:56 +00:00
Pratik Naik
11f53db216 Remove outdated script/plugin options 2009-03-18 18:33:44 +00:00
Pratik Naik
dc88847e5c Try to use actionpack gem to generate guide when Rails is not vendored 2009-03-17 12:26:34 +00:00
Pratik Naik
18eb80ccc7 Merge docrails 2009-03-16 11:28:36 +00:00
Joshua Peek
5a575bb992 update metal fixtures to be ruby 1.9 compat 2009-03-15 23:21:29 -05:00
David Heinemeier Hansson
73fc42cc0b Prepare for final 2.3 release 2009-03-15 22:06:50 -05:00
Luca Guidi
5f10533949 Make sure Metal use ActionController class name conventions [#2242 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-15 18:41:21 -05:00
Joshua Peek
112056333f Add Rack version to Rails info 2009-03-14 10:37:20 -05:00
David Dollar
99d75a7b02 Makes the gem system understand development vs. runtime dependencies [#2195 state:resolved]
The patch also fixes:

* Fixes the chicken/egg problem present in the current gem system when
  gems are defined in the config that are not yet installed.

* Remove the need to have hoe as a dependency of your production app.

* Makes the gem 'unpacking' system a lot less fragile.

Signed-off-by: Matt Jones <al2o3cr@gmail.com>
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-13 10:20:23 +00:00
Zack Hobson
5b751ae0b3 Execute the appropriate gem command when using JRuby [#2215 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-13 10:14:51 +00:00
John Dzak
9d906707be Vendored gem paths now being loaded if they exist [#2204 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-13 10:13:57 +00:00
Damian Terentiev
8a17fd1a65 Fixed that template runner gem method to output :lib => false correctly [#1940 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-12 14:45:55 +00:00
Jeff Schwab
e609d83f1a Fixed an incompatibility with Ruby 1.9.
Ruby 1.8 strings are Enumerable, but there is no String#lines method. In
Ruby 1.9, the situation is reversed.  To work around this disparity, the
RailsEnvironment#externals method now explicitly checks whether a String
responds_to? :lines.

[#2130 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-03-10 11:37:23 -07:00
Joshua Peek
e8b07dc340 Ensure public folder structure is setup correctly if the tests are ran out of order, fixes tests in 0c9bbf8 2009-03-10 11:19:32 -05:00
Joshua Peek
0c9bbf8c9d Fix serving index files with rack static file server [#2180 state:resolved] 2009-03-09 23:31:04 -05:00
Andrew Timberlake
1d88a111b5 Ensure TemplateRunner#ask? works with the rake task to apply a template [#1655 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-09 14:58:12 +00:00
Matt Jones
0da8e45baf Correctly clean backtraces from vendor/gems and gems in alternate install locations
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-03-09 12:49:58 +01:00
Jeremy Kemper
1c36172c13 Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.
[#1617 state:resolved]
2009-03-08 13:11:58 -07:00
karmi
4185fb1e58 Raise LoadError instead of a runtime exception [#1498 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-07 16:02:52 +00:00
Pratik Naik
8bc0f90d6d script/plugin install should remove .gitignore too. [#1306 state:resolved] [Esad Hajdarevic] 2009-03-06 17:23:31 +00:00
Simon Jefford
e97180c273 Ensure that loading metals from the main app and engines works on older Ruby versions [#2143 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-05 18:50:52 -06:00
David Heinemeier Hansson
de540416e9 Make sure that Rails frameworks are silenced when running in gem mode too 2009-03-05 12:22:42 +01:00
David Heinemeier Hansson
713b9c6a1b Push the guides 2009-03-05 12:20:00 +01:00
David Heinemeier Hansson
dfef3d8b14 Release RC2 today 2009-03-05 11:00:04 +01:00
Joshua Peek
6087fe8eed stray character in railties test 2009-03-04 12:26:53 -06:00
Simon Jefford
4d4d2c3896 Enhanced Rails Metal - the load order of metals can now be configured [#2057 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-03-03 12:39:19 -06:00
Jeremy Kemper
04fdb6eccb Revert "Speed up script/console by launching IRB directly."
[#2104 state:open]

This reverts commit 3b169cd693f45911ee71e26708fb9267811c8d83.
2009-03-01 19:04:32 -08:00
Matt Jones
a3ac1e1621 Display gem dependencies correctly and unpack exactly once [#2097 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-01 11:53:58 +00:00
Charles Nutter
3b169cd693 Speed up script/console by launching IRB directly.
[#2104 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-02-28 17:03:37 -08:00
Pratik Naik
0db6c3f518 Merge docrails and update the release notes 2009-02-28 19:44:25 +00:00
Pratik Naik
5029210914 Use Array.wrap() instead of Array() and handle action_view.cache_template_loading being false 2009-02-28 19:03:41 +00:00
Pratik Naik
2686286a70 Ensure 16b3d2b621b1682f249209097c31b0a10f0f87ef works with Ruby 1.9 2009-02-28 18:31:24 +00:00
Andrew Vit
16b3d2b621 Added :env option for gem in template runner [#1983 state:resolved]
For installing gems that are only needed in the test environment, specify the :env option so the dependency is written to config/environments/test.rb:

    gem 'rspec', :env => 'test'
    gem 'quietbacktrace', :env => %w[development test]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-02-28 17:59:01 +00:00
David Heinemeier Hansson
7058c1366e So it didnt happen yesterday, but very soon! Just need the final details ironed out 2009-02-28 10:30:49 +01:00
Jeremy Kemper
df2adc4c51 Merge branch 'master' of git@github.com:rails/rails 2009-02-27 12:21:34 -08:00
Jeremy Kemper
884068a13a Skip console test when using minitest 2009-02-27 12:19:23 -08:00
Jeremy Kemper
1ceddd9514 Skip backtrace filter test when using minitest 2009-02-27 12:18:45 -08:00
Jeremy Kemper
eb217b2cf0 Ruby 1.9 compat: limit const_defined? 2009-02-27 12:18:18 -08:00
Jeremy Kemper
f732c16808 Invoke tests with the same ruby 2009-02-27 12:12:42 -08:00
David Heinemeier Hansson
77b0994c78 Prep for RC2 later today 2009-02-27 14:46:23 +01:00
Matthew Rudy Jacobs
319106d09c Metal can now line in plugins under app/metal [#2045 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-02-27 14:37:11 +01:00
David Heinemeier Hansson
6de83562f9 Force all internal calls to Array#to_sentence to use English [#2010 state:resolved] 2009-02-27 14:22:39 +01:00
Jeremy Kemper
dec91a2e06 Fix test failure introduced by 6099f261ea7c624aa45b47be7573ed1cab7b6b71 2009-02-25 14:01:44 -08:00
Manfred Stienstra
6099f261ea Test view path loading from the initializer.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-25 12:49:21 -06:00
Manfred Stienstra
ea5d288606 Test database middleware loading from the initializer.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-25 12:49:10 -06:00
Joshua Peek
1b22071b27 Ensure ActiveRecord session store's connections are checked in after each request [#1927 state:resolved] 2009-02-24 11:34:32 -06:00
Joshua Peek
d32eb410f1 Put back dispatcher cleanup call in console reload! [#2056 state:resolved] 2009-02-24 10:52:51 -06:00
Pratik Naik
53cd102b39 Merge with docrails 2009-02-24 12:29:25 +00:00
Sven Fuchs
441e4e2235 load plugin view_paths to action_mailer view_paths and make action_mailer use them [#2031 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-22 10:39:56 -06:00
David Heinemeier Hansson
b61cad6ae1 Ensure that the app routes file is loaded even when engines are in play (Thjis) [#1970 state:committed] 2009-02-22 16:04:04 +01:00
Matt Jones
01c818e99f break out of initializer early if gems aren't loaded [#1750 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-20 14:16:07 -06:00
Joshua Peek
69c049f5ab Move development mode reloading up the stack to avoid issues with class reloading in middleware 2009-02-20 12:04:57 -06:00
Joshua Peek
f8ea9f85d4 Fix templates reloading in development when using custom view path [#2012 state:resolved] 2009-02-19 20:55:56 -06:00
Joshua Peek
c33ab118f8 Properly skip fcgi tests if the gem is not installed 2009-02-16 15:12:28 -06:00
unknown
2414fdb244 Ensure template_runner can run script/* ruby scripts under Windows. [#1859 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-02-16 20:22:02 +01:00
Oshoma Momoh
a650852757 Fix loader's LoadError exception message to mention missing plugins and omit loaded plugins.
Prior to this change the LoadError message listed all plugins if any one of them was missing.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1921 state:committed]
2009-02-13 21:40:30 +13:00
Pat Nakajima
0c95644396 Changed scaffold generated controller tests to use #to_param.
Before, the generated controller tests were calling #id, which
can change over time, making for brittle tests.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1913 state:committed]
2009-02-13 21:37:03 +13:00
thedarkone
3942cb406e Port fast reloadable templates from rails-dev-boost. 2009-02-12 13:04:12 -06:00
Andrew White
199e750d46 Fix some edge cases when the same template is called with different local assigns
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-10 12:09:49 -06:00
Gaspard Bucher
1dab1d3803 Fixes a typo in initializer.rb producing error: undefined local variable or method `view_path'. 2009-02-10 12:00:22 -06:00
Joshua Peek
5c63be1f92 Still need to setup view paths 2009-02-09 14:53:14 -06:00
Andrew White
893e9eb995 Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-09 14:20:30 -06:00
Joshua Peek
f98d8ee72b Fix up failing tests broke by 2316e7d 2009-02-07 00:35:15 -06:00
Joshua Peek
2316e7dfb1 Fix FCGI handler with lighttpd [#1854 state:resolved] 2009-02-07 00:25:07 -06:00
David Heinemeier Hansson
10b6073968 This is no longer relevant when the 500.html is comletely static 2009-02-06 15:22:04 +01:00
David Heinemeier Hansson
7a5da7ce78 Merge branch 'master' of git@github.com:rails/rails 2009-02-06 12:13:44 +01:00
David Heinemeier Hansson
81c7a5d48d Remove the ERb in the 500 as it looks dumb when served by the web server directly. Also, to instructions will often be wrong (the error might well be in the web server log) 2009-02-06 12:13:23 +01:00
Joshua Peek
be098f8406 Cleanup application has been merged with reload 2009-02-05 20:39:52 -06:00
Pratik Naik
96d610553e Merge docrails along with the new guides and guides generation code 2009-02-06 02:01:22 +00:00
Joshua Peek
f75b98d67e Revert "Fixed FCGI handling [#1854 state:resolved]"
This reverts commit dcc2407d9976740cebe6736ec6adeae269b81203.
2009-02-05 19:40:51 -06:00
Will Bryant
ba146a84d0 re-enable db:schema:dump so db:migrate:redo dumps the schema after migrating back up
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1412 state:committed]
2009-02-06 13:40:58 +13:00
Joshua Peek
c96382a71a Make sure all autoload constants are pulled in when using config.threadsafe! [#1831 state:resolved] 2009-02-05 16:39:32 -06:00
Peter Wagenet
dcc2407d99 Fixed FCGI handling [#1854 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-05 16:21:50 -06:00
Chris Cherry
b6e7a76cc5 script/server command can accept --path option to set app's root path [#1156 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-02-05 15:19:40 -06:00
Mike Gunderloy
4866ce45d0 Fix broken scaffolding tests [#1889 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-02-05 21:07:51 +01:00
David Heinemeier Hansson
a2da7fd349 A few more minor scaffold template cleanups 2009-02-05 20:30:33 +01:00
Mike Gunderloy
44f02de2ad Update scaffolding [#1840 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-02-05 20:27:48 +01:00
Jeremy Kemper
4d6d2e9f83 Merge branch 'master' of git@github.com:rails/rails 2009-02-03 18:41:28 -08:00
Jeremy Kemper
278186534c Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. 2009-02-03 18:40:22 -08:00
Pratik Naik
59fde8a5d6 Remove all the existing asciidoc guides 2009-02-04 01:18:32 +00:00
Pratik Naik
a0f5e0b6d9 Merge docrails 2009-02-03 22:52:07 +00:00
Yehuda Katz
d4a817c066 Make tests pass 2009-02-02 14:01:29 -08:00
David Heinemeier Hansson
ed5fa2fe33 Mark CHANGELOGs for release 2009-02-01 22:06:40 +01:00
Pratik Naik
886124e688 Merge docrails 2009-02-01 18:25:03 +00:00
Mike Gunderloy
3be0ad60e4 Add Rails Guides to the default links on generated index.html [#1839 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-02-01 17:41:12 +00:00
Mike Gunderloy
8d35b36d1a Add :reconnect option to generated mysql database.yml [#1838 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-02-01 17:39:20 +00:00
Yehuda Katz
3030bc90c9 Merge commit 'rails/3-0-unstable'
Conflicts:

	actionpack/lib/action_controller/base.rb
	actionpack/lib/action_dispatch/http/mime_type.rb
	actionpack/lib/action_dispatch/http/request.rb
	actionpack/lib/action_view/base.rb
	actionpack/lib/action_view/paths.rb
	actionpack/test/controller/session/cookie_store_test.rb
	actionpack/test/dispatch/rack_test.rb
	actionpack/test/dispatch/request_test.rb
2009-01-30 11:30:27 -08:00
Bryan Ray
f725b19710 Added options to script/dbconsole to sqlite3 console in various different modes. [#607 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-01-28 19:47:45 +00:00
Joshua Peek
a0f2b1d95d Reorganize ActionController folder structure 2009-01-27 18:17:39 -06:00
Joshua Peek
f716ab92bf Disable eager loading for all rake tasks [#802 state:resolved] 2009-01-27 15:53:02 -06:00
Pratik Naik
b2192888ab Fix the changelog entry 2009-01-23 15:38:19 +00:00
Joshua Peek
73cc5f270a Setup ActiveRecord QueryCache middleware in the initializer 2009-01-21 12:44:07 -06:00
Joshua Peek
82334a7431 Only insert metal middleware if any exist 2009-01-21 12:37:03 -06:00
Pratik Naik
39e1ac658e Merge docrails 2009-01-18 18:10:58 +00:00
Pratik Naik
085991891e Bump up the year in MIT license files 2009-01-18 05:28:21 +00:00
Pratik Naik
41af606db3 Remove script/performance/profiler in favour of performance integration tests.
To continue using script/performance/profiler, install the request_profiler plugin :

  script/plugin install git://github.com/rails/request_profiler.git
2009-01-18 05:20:39 +00:00
Lourens Naude
b08c968875 Decouple the local cache strategy from MemCacheStore for reuse with other remote stores [#1653 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-17 18:05:48 -06:00
Nahum Wild
a53ad5bba3 Added in a local per request cache to MemCacheStore. It acts as a buffer to stop unneccessary requests being sent through to memcache [#1653 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-15 21:29:32 -06:00
Joshua Peek
b281a6a5b2 Use Rack's MethodOverride lib [#1699 state:resolved] 2009-01-13 17:26:29 -06:00
Cody Fauser
d3107ce3b0 Use :key instead of old :session_key in session_store.rb generator and docs [#1746 state:resovled]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-13 14:27:23 -06:00
Jeremy Kemper
859e1508be Fix test broken by test process changes 2009-01-07 16:37:32 -08:00
Jeremy Kemper
35fa007313 Include process methods in ActionController::TestCase only. No need to alias_method_chain :process either. 2009-01-07 14:49:05 -08:00
Jeremy Kemper
9b96e8d1cc Consolidate test_help requires 2009-01-06 15:36:08 -08:00
Joshua Peek
ed2e776bde Move metal above method piggybacking middleware and add some test coverage 2009-01-03 23:02:29 -06:00
ddemaree
f90160c6c1 Fixed bug where calling app method from console would raise ArgumentError [#1629 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-01-02 10:31:21 -06:00
Jeremy Kemper
a5004573d8 Only silence backtrace from plugin lib dirs 2008-12-30 18:25:44 -08:00
Jeremy Kemper
2f9edde142 Clean trailing / after rails root from backtraces 2008-12-30 12:44:31 -08:00
Joshua Peek
558ab327b7 Clean up view path cruft and split path implementations into Template::Path and Template::EagerPath 2008-12-29 19:27:19 -06:00
Mike Gunderloy
490c26c843 Fix failing gem dependency tests [#1659 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-29 20:00:47 +00:00
Mike Gunderloy
36af857c43 Fix FCGI dispatching tests
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-29 19:58:10 +00:00
Joshua Peek
1f0aecd931 Allow custom rails generators to pass in their own binding to Create command so that the corresponding erb templates get rendered with the proper binding [#1493 state:resolved] 2008-12-28 15:10:41 -06:00
Mike Gunderloy
1fb275541a Ensure template runner tests don't depend on hash ordering [#1654 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-28 17:49:58 +00:00
Aaron Quint
c0c79f779c Use SimpleLogger for Rails::TemplateRunner outside of the Generator context [#1618 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-28 16:49:19 +00:00
Aaron Quint
9fd35fc2d8 Adding test coverage and better logging to Rails::TemplateRunner [#1618 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-27 21:03:44 +00:00
Pratik Naik
db5a98e6cb Merge docrails 2008-12-26 17:19:59 +00:00
Pratik Naik
f5b7f0911b Merge commit 'fred/more_pullable' 2008-12-21 19:04:48 +00:00
pfagiani
7cda0df7f1 Fix script/dbconsole not handling numeric password [#1395 state:resolved]
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
2008-12-21 16:48:02 +00:00
Pratik Naik
fab4f96bf2 Correct description of tmp:create task [#1607 state:resolved] [Roderick van Domburg] 2008-12-21 16:10:26 +00:00
Joshua Peek
12e416a04b Diverge Metal implementation from Rack::Cascade since we want the last app to return its headers and body if the status is a 404. 2008-12-19 11:07:25 -06:00
Pratik Naik
c3f53f412c Merge docrails 2008-12-19 14:27:43 +00:00
Jeremy Kemper
6ce4b43035 Cheaper metal cascade 2008-12-18 16:55:03 -08:00
Jeremy Kemper
03f6ecc6c6 Use LogTailer 2008-12-18 16:53:53 -08:00
Jeremy Kemper
a10e473b81 Rename Rails::Rack::Logger -> LogTailer. Speed up log mtime checks. 2008-12-18 14:42:06 -08:00
Jeremy Kemper
6703f909c7 Cheaper log tail time comparison 2008-12-18 14:17:43 -08:00
Joshua Peek
2eb2ec9e63 Move gaint lock into middleware 2008-12-18 12:00:54 -06:00
Joshua Peek
61a41154f7 Make generated Metal bits a pure rack endpoint application (not middleware)
Instead of calling super to pass the request on, return a 404.
The modified app looks like this:

  # app/metal/poller.rb
  class Poller
    def self.call(env)
      if env["PATH_INFO"] =~ /^\/poller/
        [200, {"Content-Type" => "text/html"}, "Hello, World!"]
      else
        [404, {"Content-Type" => "text/html"}, "Not Found"]
      end
    end
  end

But you aren't locked in to just Rails:

  # app/metal/api.rb
  require 'sinatra'
  Sinatra::Application.default_options.merge!(:run => false, :env => :production)
  Api = Sinatra.application unless defined? Api

  get '/interesting/new/ideas' do
    'Hello Sinatra!'
  end
2008-12-17 09:53:56 -06:00