Commit Graph

1895 Commits

Author SHA1 Message Date
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
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
Xavier Noria
46c7dd2348 normalize author names in changelogs [#1495 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-12-16 14:33:32 +01: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
c3fe6ebbfa How'd that sneak in there? 2008-12-09 11:16:30 -08: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