aboutsummaryrefslogtreecommitdiffstats
path: root/railties/CHANGELOG
diff options
context:
space:
mode:
authorJeremy McAnally <jeremymcanally@gmail.com>2008-12-02 17:22:27 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-12-02 19:39:11 +0100
commite8cc4b116c460c524961a07da92da3f323854c15 (patch)
treeaac0dee8ad4b1ebcf2f1e71f4cd963c1123003ce /railties/CHANGELOG
parent2014d9141aaa8e40a030875de35570b1061b7c2f (diff)
downloadrails-e8cc4b116c460c524961a07da92da3f323854c15.tar.gz
rails-e8cc4b116c460c524961a07da92da3f323854c15.tar.bz2
rails-e8cc4b116c460c524961a07da92da3f323854c15.zip
Add "-m/--template" option to Rails generator to apply template to generated application.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'railties/CHANGELOG')
-rw-r--r--railties/CHANGELOG43
1 files changed, 43 insertions, 0 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 3c56f9cecb..ca49c5d1c7 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,48 @@
*2.3.0 [Edge]*
+* Add "-m/--template" option to Rails generator to apply a template to the generated application. [Jeremy McAnally]
+
+ This has been extracted from rg - http://github.com/jeremymcanally/rg
+
+ Example:
+
+ # template.rb
+
+ # Install plugins from git or svn
+ plugin "will-paginate", :git => "git://github.com/mislav/will_paginate.git"
+ plugin "old-restful-auth", :svn => "http://svn.techno-weenie.net/projects/plugins/restful_authentication/"
+
+ # Add gems to environment.rb
+ gem "jeremymcanally-context"
+ gem "bluecloth"
+
+ # Vendor file. Data in a string or...
+ vendor("borrowed.rb", <<CODE
+ def helpful_method
+ do_something_helpful_here
+ end
+ CODE
+
+ # ...file data from block return value.
+ # #initializer creates a new initializer file
+ initializer("crypto.rb") do
+ salt = "--#{Time.now}--#{rand}--#{srand(Time.now.to_i)}"
+
+ "SPECIAL_SALT = '#{salt}'"
+ end
+
+ Usage:
+
+ To use a template, provide a file path or URL:
+
+ 1. Using a local file :
+
+ rails <application name> -m /path/to/my/template.rb
+
+ 2. Or directly from a URL :
+
+ rails <application name> --template=http://gist.github.com/31208.txt
+
* Extracted the process scripts (inspector, reaper, spawner) into the plugin irs_process_scripts [DHH]
* Changed Rails.root to return a Pathname object (allows for Rails.root.join('app', 'controllers') => "#{RAILS_ROOT}/app/controllers") #1482 [Damian Janowski/?]