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
Pratik Naik
39e1ac658e
Merge docrails
2009-01-18 18:10:58 +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
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
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
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
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
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
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
Joshua Peek
61958032d3
Generate rackup dispatcher with rails:update:generate_dispatchers
2008-12-01 12:21:18 -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
c5f461d7b0
Cleanup the app generator
2008-11-30 15:52:50 -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
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
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
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
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
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
326036de46
Fix script/generate warning
2008-10-21 01:47:44 +01: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
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
David Heinemeier Hansson
dc8b21dc3c
Dont reference the class being tested when it can be assumed
2008-09-09 17:59:34 -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
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
Joshua Peek
bd7edcf286
Removed config.ru template from app generator
2008-08-19 16:46:15 -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
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
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
Joshua Peek
f522a89d64
Revert "Fixed generator collisions for nested controller modules."
...
This reverts commit 2d372d704987e05712ccd937e78d8dbd41242efe.
2008-07-11 12:05:02 -05: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
Pratik Naik
76e00fc784
Ensure observer test inherits from ActiveSupport::TestCase
2008-06-27 18:18:39 +01:00
Pat George
4ddca325ee
Warn and uses singularized ModelName if a plural ModelName is given to script/generate. Override with --force-plural. [ #333 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-06-27 16:35:26 +01:00