aboutsummaryrefslogtreecommitdiffstats
path: root/railties/bin/railsgen
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-07-02 11:40:00 +0200
committerJosé Valim <jose.valim@gmail.com>2009-07-02 11:40:00 +0200
commit826a6a72fe8ab44080312b8bcc1f5dfd39c5a163 (patch)
tree9a4d518b70d01f7b78acc6451a1a6d3d67b9a1fe /railties/bin/railsgen
parentec55e59e993d6c39c6ba8d57d4ef6d270ee8c14f (diff)
downloadrails-826a6a72fe8ab44080312b8bcc1f5dfd39c5a163.tar.gz
rails-826a6a72fe8ab44080312b8bcc1f5dfd39c5a163.tar.bz2
rails-826a6a72fe8ab44080312b8bcc1f5dfd39c5a163.zip
Updated rake tasks.
Diffstat (limited to 'railties/bin/railsgen')
-rwxr-xr-xrailties/bin/railsgen18
1 files changed, 18 insertions, 0 deletions
diff --git a/railties/bin/railsgen b/railties/bin/railsgen
new file mode 100755
index 0000000000..809e75acb5
--- /dev/null
+++ b/railties/bin/railsgen
@@ -0,0 +1,18 @@
+require File.dirname(__FILE__) + '/../lib/ruby_version_check'
+Signal.trap("INT") { puts; exit }
+
+require File.dirname(__FILE__) + '/../lib/rails/version'
+if %w(--version -v).include? ARGV.first
+ puts "Rails #{Rails::VERSION::STRING}"
+ exit(0)
+end
+
+require File.dirname(__FILE__) + '/../lib/generators'
+
+if ARGV.size == 0
+ Rails::Generators.help
+ exit
+end
+
+name = ARGV.shift
+Rails::Generators.invoke name, ARGV, :invoke