Commit Graph

1772 Commits

Author SHA1 Message Date
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
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
David Heinemeier Hansson
bf024b6a11 Github comments are an excellent way to perform community code review -- keep it up! 2008-12-01 23:06:29 -06: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
725928854d fix failing railties test 2008-12-01 12:12:57 -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
668872efd8 Add restart notice where missing 2008-11-30 15:54:44 -06:00
David Heinemeier Hansson
6e66e7d646 Even more polish of the default configration files and split off the session store configuration into its own file 2008-11-30 15:53:21 -06:00
David Heinemeier Hansson
c5f461d7b0 Cleanup the app generator 2008-11-30 15:52:50 -06:00
David Heinemeier Hansson
73213f4ca7 Say it briefly 2008-11-30 15:18:46 -06:00
David Heinemeier Hansson
6358e6c107 More organization based on priority 2008-11-30 15:06:55 -06:00
David Heinemeier Hansson
471f024018 Me loves me some whitespace 2008-11-30 14:58:42 -06:00
David Heinemeier Hansson
201b64b4e1 Cleanup other examples and wording 2008-11-30 14:53:22 -06:00