Commit Graph

1536 Commits

Author SHA1 Message Date
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
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
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
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
Jeremy Kemper
e8550ee032 Cherry-pick core extensions 2009-05-13 12:00:15 -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
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
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
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
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
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
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
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
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
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
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
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
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
Jeremy Kemper
df2adc4c51 Merge branch 'master' of git@github.com:rails/rails 2009-02-27 12:21:34 -08:00
Jeremy Kemper
eb217b2cf0 Ruby 1.9 compat: limit const_defined? 2009-02-27 12:18:18 -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
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
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
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
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
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
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
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
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
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
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
Joshua Peek
8c3a543664 Introduce Rails Metal
# app/metal/poller.rb
  class Poller < Rails::Rack::Metal
    def call(env)
      if env["PATH_INFO"] =~ /^\/poller/
        [200, {"Content-Type" => "application/json"}, Message.recent.to_json]
      else
        super
      end
    end
  end

* There is a generator to help you get started
    `script/generate metal poller`

* Also, metal bits can be ran standalone with rackup
    `rackup app/metal/poller.rb`
2008-12-16 13:15:06 -06:00
Joshua Peek
ed70830713 Switch to Rack based session stores. 2008-12-15 16:33:31 -06:00
David Heinemeier Hansson
f9a02b12d1 Added gem backtrace pretty priting (Juan Lupión) [#1497 state:committed] 2008-12-15 15:37:27 +01:00
Joshua Peek
75fa82418d Prefer Rails.logger over RAILS_DEFAULT_LOGGER 2008-12-10 18:08:14 -06:00
Jeremy Kemper
39de112e7b Use full path to environment 2008-12-08 19:14:07 -08:00
Sergio Gil
e4eadf3910 Fix message when running TemplateRunner#git. [#1526 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-08 00:26:49 +00:00
Pratik Naik
f7f113610e Add a rake task to apply a template to an existing application.
Example : rake rails:template LOCATION=~/template.rb
2008-12-07 03:40:23 +01:00
Pratik Naik
2dc5d12c91 Remove unused TemplateRunner attributes 2008-12-07 03:28:39 +01:00
Pratik Naik
dbbae5e00e Merge with docrails 2008-12-07 03:27:53 +01:00
Peter Cooper
9eca588bdf Added support for plugins to be installed as submodules with the application templater. [#1517 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-06 00:01:42 +01:00
Joshua Peek
731dcd8404 Silence server backtrace in rescue templates and log files. Also remove some noise from missing template errors. 2008-12-05 11:24:28 -06:00
Jeremy Kemper
57f0b9738e Remove config dir from the load path 2008-12-03 21:46:36 -06:00
Pratik Naik
e52affb210 Add :env and :sudo options to TemplateRunner#rake.
Examples :

  rake("gems:install", :sudo => true)
  rake("db:migrate", :env => "production")
2008-12-04 01:08:36 +01:00
Pratik Naik
ef0b1cbb1b Make TemplateRunner#generate accept any number of arguments 2008-12-03 22:05:54 +01:00
Jeremy Kemper
99f2cb4918 Merge branch 'master' of git@github.com:rails/rails 2008-12-03 10:32:30 -06:00
Jeremy Kemper
0b4858cf38 Require rack/utils explicitly 2008-12-03 10:23:58 -06:00
Pratik Naik
be75cb8877 Remove docs for TemplateRunner#gem as the behaviour has been changed 2008-12-02 19:48:25 +01:00
Jeremy McAnally
e8cc4b116c Add "-m/--template" option to Rails generator to apply template to generated application.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-12-02 19:39:11 +01:00
Aliaksey Kandratsenka
a0bc480e1d establish mysql connection before dropping database
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#63 state:committed]
2008-12-01 21:38:30 +01:00
Michael Koziarski
a8fc494dbb Manually load the DB config rather than firing the whole initializer [Gerrit Kaiser] 2008-12-01 21:38:30 +01:00
Joshua Peek
06ed8e4511 Add internal middleware stack to Dispatcher
config.middleware.use Rack::Cache
2008-12-01 13:49:34 -06:00
Matt Jones
3c07a8828e handle missing dependecies in gem loading
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-12-01 20:42:46 +01:00
Joshua Peek
25f6524b89 opps, inner_app is in the wrong conditional 2008-12-01 12:24:02 -06:00
Joshua Peek
61958032d3 Generate rackup dispatcher with rails:update:generate_dispatchers 2008-12-01 12:21:18 -06:00
Joshua Peek
926844e869 Switch FCGI handler over to Rack 2008-12-01 11:54:32 -06:00
David Heinemeier Hansson
3b3c0507e2 Extracted the process scripts (inspector, reaper, spawner) into the plugin irs_process_scripts [DHH] 2008-11-30 16:23:20 -06:00
David Heinemeier Hansson
be140e8c6b Changed Rails.root to return a Pathname object (allows for Rails.root.join("app", "controllers") => "#{RAILS_ROOT}/app/controllers") [#1482] 2008-11-30 15:59:30 -06:00
David Heinemeier Hansson
c5f461d7b0 Cleanup the app generator 2008-11-30 15:52:50 -06:00
David Heinemeier Hansson
471f024018 Me loves me some whitespace 2008-11-30 14:58:42 -06:00
Jeremy Kemper
cfb2126726 Load app initializers by path relative to Rails.root 2008-11-29 20:06:49 -08:00
Joshua Peek
cec8a92a6d Merge branch 'master' of git@github.com:rails/rails 2008-11-29 15:59:47 -06:00
David Heinemeier Hansson
fdfcdf4673 Enhanced Rails.root to take parameters that'll be join with the root, like Rails.root('app', 'controllers') => File.join(Rails.root, 'app', 'controllers') [#1482 state:committed] (Damian Janowski) 2008-11-29 10:57:36 +01:00
David Heinemeier Hansson
1e8f9634f6 Include Rack in the server noise 2008-11-29 10:45:52 +01:00
David Heinemeier Hansson
34905673a3 Revert "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading.
This reverts commit 4d910b033379727e5e7355590c50c72fc75e56db.
2008-11-29 10:45:06 +01:00
Joshua Peek
9fc23745f1 Reinstate "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading." 2008-11-28 11:18:28 -06:00
David Heinemeier Hansson
5fa0457542 Revert "Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache." as it killed dev mode reloading.
This reverts commit 4d910b033379727e5e7355590c50c72fc75e56db.
2008-11-27 21:04:24 +01:00
David Heinemeier Hansson
6fa9957e0e Merge branch 'master' of git@github.com:rails/rails 2008-11-27 18:59:33 +01:00
David Heinemeier Hansson
f2ee056873 Added view path support for engines [DHH] 2008-11-27 18:59:24 +01:00
Joshua Peek
4d910b0333 Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache. 2008-11-26 20:54:47 -06:00
David Heinemeier Hansson
3cc9d1c5ad Let all plugins not just engines have a config/routes.rb file 2008-11-26 20:30:21 +01:00
David Heinemeier Hansson
4999d52e08 Added that config/routes.rb files in engine plugins are automatically loaded (and reloaded when they change in dev mode) [DHH] 2008-11-26 20:03:25 +01:00
David Heinemeier Hansson
63d8f56774 Added app/[models|controllers|helpers] to the load path for plugins that has an app directory (go engines ;)) [DHH] 2008-11-26 14:41:20 +01:00
Jeremy Kemper
8d2ca7dde1 Merge branch 'master' of git@github.com:rails/rails 2008-11-25 18:48:46 -08:00
Joshua Peek
c80fe1093d Move debugger into middleware 2008-11-25 15:05:07 -06:00
Joshua Peek
e126e1aac0 don't try to require vendored rack in script/server 2008-11-25 13:26:38 -06:00
Jeremy Kemper
ce50ca1baf Explicitly require AS::Deprecation for the SecretKeyGenerator. Bring in ActiveSupport::TestCase for its tests. 2008-11-24 22:39:11 -08:00
Jeremy Kemper
36dcfcf126 Really remove components. 2008-11-24 18:48:00 -08:00
Jeremy Kemper
104f3a5776 Add config.preload_frameworks to load all frameworks at startup. Default to false so Rails autoloads itself as it's used. 2008-11-24 18:43:04 -08:00
Jeremy Kemper
d01f75b1f0 Initializer#env relies on StringInquirer autoload. Style fixes. 2008-11-24 18:10:23 -08:00
Pratik Naik
1cbdd53bd3 Add a rake task to generate dispatchers : rake rails:generate_dispatchers 2008-11-24 19:50:09 +01:00
Pratik Naik
b7568e77d7 Fix typo in 5b5730cc6e9194fb5f67fe79d2c7849e200ba6ed 2008-11-24 19:35:09 +01:00
Yaroslav Markin
5b5730cc6e Don't generate public/dispatch.cgi/fcgi/rb files by default.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-11-24 19:31:58 +01:00
Joshua Peek
5ffd1e0c02 Ensure integration test is load in script/console [#1452 state:resolved] 2008-11-24 09:58:52 -06:00
David Heinemeier Hansson
42b4407e35 Strip out the ./ part of the test path so the backtrace align perfectly 2008-11-24 15:43:47 +01:00
Manfred Stienstra
1f48c09094 Accept a prefix argument to filter_backtrace_with_cleaning [#1456 state:committed]
Add a prefix argument to filter_backtrace_with_cleaning so it has
the same arity as test/unit's filter_backtrace.

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-24 11:35:55 +01:00
Joshua Peek
d75a234501 simplify console with helpers 2008-11-23 15:15:20 -06:00
David Heinemeier Hansson
9e08a3bb1d Added rake rails:update:application_controller to renamed application.rb to application_controller.rb -- included in rake rails:update so upgrading to 2.3 will automatically trigger it [#1439 state:committed] (kastner) 2008-11-23 13:39:30 +01:00
Joshua Peek
708f4c3ae6 Switch script/server to use rack processor 2008-11-22 14:48:32 -06:00
Joshua Peek
40c6a8b970 Drop lighttpd support from script/server 2008-11-22 14:10:50 -06:00
Joshua Peek
0ecf2f6bdb Kill dead "new_mongrel" handler 2008-11-22 14:00:58 -06:00
Cyril Mougel
2144c0f8ff Add flush by ensure in script/runner because no flush in production mode [#803 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-11-22 13:32:36 -06:00
David Heinemeier Hansson
f42c77f927 Added ActiveSupport::BacktraceCleaner and Rails::BacktraceCleaner for cutting down on backtrace noise (inspired by the Thoughtbot Quiet Backtrace plugin) [DHH] 2008-11-22 18:06:08 +01:00
Akira Matsuda
baa8ee5eb1 Require active_support/secure_random for Ruby 1.9.
[#1326 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-11-19 09:57:09 -08:00
David Heinemeier Hansson
51a19ae2bf Assume that the next version is going to be 2.3 for now 2008-11-19 14:12:38 +01:00
Matt Jones
45ba4ec626 add vendor/ back to load paths; catch errors in constant loading
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-18 14:32:46 +01:00
David Heinemeier Hansson
d9b92ee11b Added config.i18n settings gatherer to config/environment, auto-loading of all locales in config/locales/*.rb,yml, and config/locales/en.yml as a sample locale [DHH] 2008-11-18 14:23:13 +01:00
Eugene Bolshakov
3c9beb3dab Add helper test generators [#1199 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-11-17 21:56:39 -06:00
Pratik Naik
d22fe41cf8 Fix a typo in test helper 2008-11-18 08:40:38 +05:30
Pratik Naik
3319fa6965 Dont require 'application' when running tests 2008-11-18 08:38:01 +05:30
Pratik Naik
8f71d6bcf6 Fix script/console 2008-11-18 08:28:26 +05:30
Jeremy Kemper
5a4789e86a Explicitly require test/unit so tests autorun 2008-11-17 15:18:01 -08:00
David Heinemeier Hansson
fcce1f17ea BACKWARDS INCOMPATIBLE: Renamed application.rb to application_controller.rb and removed all the special casing that was in place to support the former. You must do this rename in your own application when you upgrade to this version [DHH] 2008-11-17 19:27:35 +01:00
Jeremy Kemper
eeea1a26ec Merge branch 'master' into testing 2008-11-15 12:21:04 -08:00
David Heinemeier Hansson
61e43700b8 Prepare for RC2 2008-11-14 12:26:50 +01:00
David Heinemeier Hansson
ff4ccb8334 Revert "Move fixtures settings from AR::TestCase to railties test_help" -- it broke all the tests!
This reverts commit 9a88ab64bb45ddb2bdcf80fab9203111d8f8abb4.
2008-11-14 12:01:26 +01:00
Chris Wanstrath
334178722b Properly check silence_spec_warnings class variable [#1372 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-14 11:49:30 +01:00
Jeremy Kemper
9a88ab64bb Move fixtures settings from AR::TestCase to railties test_help 2008-11-13 19:09:23 -08:00
Jeremy Kemper
b17eb65d00 Move fixtures settings from AR::TestCase to railties test_help 2008-11-12 11:33:09 -08:00
Jeremy Kemper
a0e7b99443 Remove deprecated Gem.manage_gems 2008-11-12 11:32:36 -08:00
Jeremy Kemper
582aa2ead5 Set up fixtures in app's test_help 2008-11-07 16:23:22 -05:00
Matt Jones
01433af6a5 Make refresh_specs more resilient. Always add vendor/gems to gem search path. Use Gem.clear_paths to ensure we get a current searcher.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-11-01 17:35:56 +01:00
Mathias Meyer
7418d367f0 Fixed plugin generator so that generated unit tests would subclass ActiveSupport::TestCase, also introduced a helper script to reduce the needed require statements. [#1137 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-10-30 12:57:52 +01:00
Pratik Naik
896058b485 Merge with docrails 2008-10-22 23:14:00 +05:30
Pratik Naik
a03e2b356c Merge with docrails. Also add a rake task to generate guides in your rails application :
rake doc:guides

The rake task will generate guides inside doc/guides directory of your application. Open index.html to browse.
2008-10-21 18:33:40 +01:00
Pratik Naik
326036de46 Fix script/generate warning 2008-10-21 01:47:44 +01:00
Matt Jones
326030a1e8 config.gem: Fix typo in unpack, skip dependencies on unloaded gems, and silence spec warnings on refresh. [#1128]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-20 21:45:01 +01:00
Michael Koziarski
6d1d48de6a Memoize the require and construction of the StringInquirer 2008-10-19 13:26:36 +02:00
Pratik Naik
5384ba3081 Don't create test/performance/test_helper.rb. Just require the needed files from test directly. [#1135 state:resolved] 2008-10-17 22:58:37 +02:00
Michael Koziarski
09c1718198 Remove the class_path from the collisions test.
The class_path is often taken already in situations like Admin namespaces etc.
2008-10-14 21:59:55 +02:00
Joshua Peek
9ab83b1cd1 Don't include the path when checking class collisions [#545 state:resolved] 2008-10-13 21:43:58 -05:00
Matt Jones
1b44bbff42 Initialize silence_spec_warnings
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1128 state:resolved]
2008-10-13 17:27:31 +02:00
Matt Jones
9f15870946 Make VendorGemSourceIndex handle broken/missing specs generated by previous versions.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-10-13 17:27:25 +02:00
Matt Jones
aa4a7c3530 Fix script/console --sandbox warning. [#1194 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-09 01:35:21 +01:00
Matt Jones
0dea211f44 Fix definition of find_name
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1128 state:committed]
2008-10-08 17:36:53 +02:00
Matt Jones
2d644fd136 Mark gem as not loaded when spec not found
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-10-08 17:36:52 +02:00
Chris Cherry
1c75b4fd42 Fix deprecated ActionController::Base.relative_url_root call in mongrel command
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-10-05 17:25:57 -05:00
Pratik Naik
a2932784bb Merge docrails 2008-10-05 22:16:26 +01:00
Matt Jones
2bf58aa782 Fix a number of errors in the config.gem mechanism.
* Rails::GemDependency was missing definitions for hash and eql?, causing Array#uniq to not work.

* If several versions of a gem are unpacked in vendor, now chooses the highest if no version is specified.

* streamlined add_load_path. Now sets up Rubygems correctly to allow 'gem' to find frozen gems, with
  gems frozen to vendor/gems and specifications in vendor/gems/<gem-name>/.specification

* Rails::GemDependency#specification would return a spec for the highest installed version, even for
  frozen gems and/or previously loaded lower versions. See in part ticket #1123.

* removed vendor from default_load_paths - it was causing autoloading to append Gems::Gems::<gem-dir> to
  constant names

* added additional tests for loading frozen gems.

* incorporates the fix from #1107 for vendor rails

* defers to freeze:gems for handling the Rails framework. gems:unpack WILL NOT place a copy of Rails
  in vendor/gems. Should close #1123 completely.

* incorporates, via using the gem loader for frozen gems, fixes corresponding to #227, #324, #362, #527, and #742.

* gem plugins now work the same whether frozen or not. Correctness of the behavior is a matter for another ticket...

Signed-off-by: rick <technoweenie@gmail.com>
2008-10-05 10:16:17 -07:00
Antonio Cangiano
f0e90740d0 Add IMB DB support to Rails application generator. [#1136 state:resolved]
Usage : rails app_name -d ibm_db

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-10-04 13:54:27 +01:00
Luca Guidi
1bc267d216 Make sure recreate MySQL test database with the proper encoding and collation [#1165 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1165 state:committed]
2008-10-03 22:08:55 +02:00
Michael Koziarski
a78ec93036 Partially revert 185fe2e9cce737d69d3b47a656f3651ce152c0c1
We shouldn't quote the unpack command's requirement as it's passed through GemRunner which takes care of it for us.
2008-09-24 18:46:45 +02:00
Michael Koziarski
5f86451a4c Bump the Version constants to align with the *next* release rather than the previous release.
This allows people tracking non-release gems or git submodules to use the constants.
2008-09-22 21:32:12 +02:00
Philip Hallstrom
c47525a583 make db:migrate:redo rake task accept an optional VERSION to target that specific migration to redo
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-09-17 11:14:21 +02:00
miloops
c98cb8ffc2 Add --debugger option to script/console.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1025 state:committed]
2008-09-11 17:12:00 +02:00
Antonio Cangiano
854cf3d721 Fix for SQLite's db creation warnings [status:committed #614]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-09-09 23:56:37 -05:00
David Heinemeier Hansson
dc8b21dc3c Dont reference the class being tested when it can be assumed 2008-09-09 17:59:34 -05:00
Akira Matsuda
5f7c42413b Ruby 1.9 compat: remove instance variables and global variables from block parameters
[#1000 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-09 10:35:53 -07:00
Akira Matsuda
8e68ec4dcc Ruby 1.9 compat: use String#lines instead of to_a in Ruby 1.9
[#1001 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-09 10:35:24 -07:00
Akira Matsuda
07eb9ffd15 Ruby 1.9 compat: remove constants from block parameters
[#1002 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-09-09 10:07:59 -07:00
Pratik Naik
6ef35461dc Merge docrails 2008-09-03 17:58:47 +01:00
Jeremy Kemper
6f932b4790 Database connections are now pooled, one pool per #establish_connection call.
Pools start out empty and grow as necessary to a maximum size (default is 5,
configure size with key 'pool' in your database configuration). If no
connections are available, a thread will wait up to a 'wait_timeout' time
(default is 5 seconds).

Connections are verified and reset when checked out from the pool (usually
upon first access to ActiveRecord::Base.connection), and returned back to the
pool after each request.

If you would like to use connection pools outside of ActionPack, there is an
ActiveRecord::Base.connection_pool method that gives you access to the pool,
and you can manually checkout/checkin connections, or supply a block to
ActiveRecord::Base.connection_pool.with_connection which takes care of the
checkout/checkin for you.

[#936 state:resolved]
2008-09-02 18:32:54 +02:00
Jeremy Kemper
a1eb4e11c2 Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>

Conflicts:

	actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00
Nathaniel Bibler
efa6620a2a Added optional rake doc:app TITLE environment parameter
[#939 state:resolved]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-08-29 21:04:04 -07:00
Nick Sieger
c1b949869c Remove call to active_record.allow_concurrency since it's deprecated 2008-08-29 14:12:13 -05:00
Nick Sieger
3151d96663 Revert "Change all databases.rake adapter 'when' statements to use regexes."
This reverts commit 3d2512d38d2e28b3ea669139f7c7b0307522aa72.
2008-08-29 14:12:09 -05:00
Nick
1a81f156bd Change all databases.rake adapter 'when' statements to use regexes.
This is more friendly to JRuby/JDBC adapters (with names like 'jdbcmysql')
and leaves the door open to alternate implementations of adapters in the
future.
2008-08-29 14:12:08 -05:00
Michael Koziarski
b7cd4ded93 Formally deprecate the old secret key generator 2008-08-27 15:18:07 +02:00
Hongli Lai (Phusion
b3411ff59e Deprecate Rails::SecretKeyGenerator in favor of ActiveSupport::SecureRandom.
SecureRandom has a few minor security enhancements and can be used as a drop-in replacement

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#913 state:committed]
2008-08-27 15:08:16 +02:00
Michael Koziarski
eb2b81c766 Reverse the priority of the mysql commands in dbconsole 2008-08-24 13:20:23 +02:00
Tarmo Tänav
b1f3c6e6ec Generate belongs_to association when generating a model 2008-08-23 21:54:43 +03:00
Tarmo Tänav
9223a91911 Generate belongs_to associations automatically for 'references' types [#640 state:resolved] 2008-08-23 20:58:44 +03:00
Tarmo Tänav
cf28109158 Always require activesupport, even if its constant already exists
This is needed because the existance of the ActiveSupport
constant by itself does not guarantee that the whole library
has been loaded.

Also load the StringInquirer in the Rails#env method as
the it might be called inside the initializer block
before activesupport itself has been loaded.
2008-08-23 18:05:52 +03:00
Chris Lloyd
4e4277b9e0 Fixed that rake doc:plugins to uses UTF-8. [#573 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-08-22 13:36:47 +01:00
Tom Ward
89d1c77dd0 Initializer to sort files before eager loading. [#859 state:resolved]
Changed Rails::Initializer to sort files before eager loading them. This ensures that
any files in a parent directory will be loaded before files in a subdirectory of the
'same' name. i.e. zoo.rb will be loaded before zoo/reptile_house.rb

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-08-22 13:06:34 +01:00
Joshua Peek
5df8ff1d6b Touch file with git revision when freezing edge 2008-08-19 17:16:35 -05:00
Joshua Peek
bd7edcf286 Removed config.ru template from app generator 2008-08-19 16:46:15 -05:00
Joshua Peek
e9ae2b2f4c Added rack logger middleware that tails the environment log 2008-08-19 00:18:26 -05:00
Joshua Peek
c1a8690d58 Consistently use the framework's configured logger and avoid reverting to RAILS_DEFAULT_LOGGER unless necessary. 2008-08-18 23:36:13 -05:00
Matthew Rudy Jacobs
eb4668b26a rake db:fixtures:load and db:fixtures:identify now accept a FIXTURES_PATH option eg. "rake db:fixtures:load FIXTURES_PATH=spec/fixtures"
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#792 state:committed]
2008-08-09 18:36:40 +02:00
Daniel Rodríguez Troitiño
06e4eb49ea Added file name information for errors and exceptions in script/runnner
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-08-08 10:48:52 +02:00
Joshua Peek
f5bcbde1e3 Make sure ActionView is loaded inorder to build view paths 2008-08-06 17:40:03 -05:00
Joshua Peek
e5b1ab7cc3 MemoryStore is the only "unsafe" store. Make it threadsafe by default. 2008-08-06 14:54:18 -05:00
Joshua Peek
177a35e711 Added config.threadsafe! to toggle allow concurrency settings and disable the dependency loader 2008-08-04 22:19:41 -05:00
Ben Sandofsky
61842d97c5 Make requiring gems optional.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#743 state:resolved]
2008-08-04 14:53:21 +02:00
Jeremy Kemper
46a458206f Merge branch 'master' of git@github.com:rails/rails 2008-07-31 16:35:58 -07:00
Jeremy Kemper
a540725f0d load_application_classes requires files relative to the load path and without .rb extension, including .rb files in subdirectories 2008-07-31 16:35:17 -07:00
Tarmo Tänav
0b9bfbdebf Use "/usr/bin/env ruby" instead of "/usr/local/bin/ruby"
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-31 16:39:48 -05:00
Tarmo Tänav
656f0e7c6c Fix file permissions
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-31 16:36:23 -05:00
Joshua Peek
030d5854ad Turn cache_classes on by default [#645 state:resolved] 2008-07-31 13:42:28 -05:00
Michael Koziarski
f64bd2ca85 Ensure dbconsole includes the -p parameter to mysql as intended 2008-07-31 09:46:40 +02:00
José Valim
c4038764d2 Initializer requires ERB explicitly instead of assuming Action Pack loaded it. [#722 state:resolved] 2008-07-30 01:49:49 -07:00
José Valim
c8e80f6389 Initializer skips prepare_dispatcher if Action Controller isn't in use. [#721 state:resolved] 2008-07-30 01:41:51 -07:00
Michael Koziarski
d9452d3ab3 Remove incomplete non-blocking logger functionality 2008-07-29 20:01:25 +02:00
Sam Granieri
11fdcf88c2 Check for ActionMailer and ActionController before attempting to eager load their view paths
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-24 13:51:54 -05:00
Joshua Peek
3fd9036fc5 Added config.dependency_loading to enable or disable the dependency loader after initialization 2008-07-24 11:58:26 -05:00
Joshua Peek
97a954bf1d Load view path cache after plugins and gems. 2008-07-23 10:41:28 -05:00
Miles Georgi
92f944818e Make script/plugin work with svn+ssh urls. [#662 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-22 01:43:23 +01:00
Joshua Peek
89ec72c281 Added configurable eager load paths. Defaults to app/models, app/controllers, and app/helpers 2008-07-21 13:43:23 -05:00
Joshua Peek
3bd34b6ffe Preload application classes. Uses same strategy as phusion passenger. 2008-07-21 13:43:23 -05:00
Joshua Peek
e0d7bace4e Prefer Mongrel over Thin [#658 state:resolved] 2008-07-19 11:42:27 -05:00
Nik Wakelin
bbab639136 Set config.active_record.timestamped_migrations = false to have migrations with numeric prefix instead of UTC timestamp. [#446 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-17 02:54:45 +01:00
Pratik Naik
0432d15164 Merge with docrails. 2008-07-16 13:01:23 +01:00
Pratik Naik
8b933517ea Add config.ru to rails app generator 2008-07-16 05:20:29 +01:00
Joshua Peek
fea5b6fd41 ActionMailer and ActionView can share the same view path cache 2008-07-15 22:58:42 -05:00
Joshua Peek
83e29b9773 Removed config.action_view.cache_template_loading, use config.cache_classes instead 2008-07-15 22:58:42 -05:00
Jeremy Kemper
1edb5c85b5 Give more info on missing gems and abort instead of printing a warning. App can begin in incomplete state otherwise. 2008-07-15 15:50:37 -07:00
Pratik Naik
b337ab0221 Move performance test helper settings to railties 2008-07-15 21:07:25 +01:00
Sebastian A. Espindola
0176e6adb3 Added db:charset support to PostgreSQL. [#556 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-14 04:11:52 +01:00
Tim Pope
5c08607082 Make script/plugin install <plugin> -r <revision> option work with git based plugins. [#257 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-14 03:47:22 +01:00
Jacek Becela
697ee1a50d Enable loading fixtures from arbitrary locations. [#586 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-14 01:32:01 +01:00
Tapajós
0d241f4434 Use full path in database tasks so commands will work outside of Rails root [#612 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-13 14:19:03 -05:00
Joshua Peek
73b34e9f75 Refactor template preloading. New abstractions include Renderable mixins and a refactored Template class. 2008-07-12 14:33:46 -05:00
Daniel Guettler
f90eb81c65 Ensure script/generate finds generators from symlinked plugins. [#449 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-12 17:51:48 +01:00
Michael Koziarski
292501c7e0 Use require_dependency 'application' not require in the console bootstraps to avoid requiring application.rb twice 2008-07-11 22:27:36 +02:00
Joshua Peek
f522a89d64 Revert "Fixed generator collisions for nested controller modules."
This reverts commit 2d372d704987e05712ccd937e78d8dbd41242efe.
2008-07-11 12:05:02 -05:00
Hongli Lai (Phusion
2b4eb586ef Plugin locator: sort directory listing because we can't assume that the OS will do it for us. This fixes some unit test failures. 2008-07-09 13:34:36 +02:00
Pratik Naik
cb645c8877 Use ActiveSupport::TimeZone in time:zones rake tasks 2008-07-04 20:07:00 +01:00
Michael Koziarski
dc2d754d60 Support for custom annotations with rake notes:custom and DRY up the task definition.
e.g.  rake notes:custom ANNOTATION=WTF
2008-07-03 19:42:58 +03:00
Joshua Peek
6c0edef26e Added Rails.initialized? flag 2008-07-02 21:29:57 -05:00
Ricardo Santos
820992c98f Ensure script/plugin unsource 'Usage' text is correct. [#526 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-02 17:47:19 +01:00
Tim Pope
3a95ee73cf Make rake test:uncommitted work with Git.
Note : rake test:uncommitted is considering only unstaged files.

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-02 05:21:59 +01:00
Carl Porth
a81f16af31 Ensure Rails::Generator quotes file names while generating diff. [#264 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-02 03:28:02 +01:00