diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-18 13:44:32 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-18 16:21:11 +0100 |
commit | 9fffdc5cdb80b1824473a6d7ae1fedf9e74aa748 (patch) | |
tree | 88f429511bf65f1104efeab10d6310b68ab24837 /railties/lib/generators/rails/plugin/templates | |
parent | e75ea474346e74e36d92febd47985c3571b1472b (diff) | |
download | rails-9fffdc5cdb80b1824473a6d7ae1fedf9e74aa748.tar.gz rails-9fffdc5cdb80b1824473a6d7ae1fedf9e74aa748.tar.bz2 rails-9fffdc5cdb80b1824473a6d7ae1fedf9e74aa748.zip |
Generators load path now will be Ruby load path. If you want to use rspec:install generator, you need generators/rspec/install_generator in your load path.
Diffstat (limited to 'railties/lib/generators/rails/plugin/templates')
8 files changed, 63 insertions, 0 deletions
diff --git a/railties/lib/generators/rails/plugin/templates/MIT-LICENSE.tt b/railties/lib/generators/rails/plugin/templates/MIT-LICENSE.tt new file mode 100644 index 0000000000..8717df053d --- /dev/null +++ b/railties/lib/generators/rails/plugin/templates/MIT-LICENSE.tt @@ -0,0 +1,20 @@ +Copyright (c) <%= Date.today.year %> [name of plugin creator] + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/railties/lib/generators/rails/plugin/templates/README.tt b/railties/lib/generators/rails/plugin/templates/README.tt new file mode 100644 index 0000000000..702db07cb1 --- /dev/null +++ b/railties/lib/generators/rails/plugin/templates/README.tt @@ -0,0 +1,13 @@ +<%= class_name %> +<%= "=" * class_name.size %> + +Introduction goes here. + + +Example +======= + +Example goes here. + + +Copyright (c) <%= Date.today.year %> [name of plugin creator], released under the MIT license diff --git a/railties/lib/generators/rails/plugin/templates/Rakefile.tt b/railties/lib/generators/rails/plugin/templates/Rakefile.tt new file mode 100644 index 0000000000..23c2245a41 --- /dev/null +++ b/railties/lib/generators/rails/plugin/templates/Rakefile.tt @@ -0,0 +1,22 @@ +require 'rake' +require 'rake/testtask' +require 'rake/rdoctask' + +desc 'Default: run unit tests.' +task :default => :test + +desc 'Test the <%= file_name %> plugin.' +Rake::TestTask.new(:test) do |t| + t.libs << 'lib' + t.libs << 'test' + t.pattern = 'test/**/*_test.rb' +end + +desc 'Generate documentation for the <%= file_name %> plugin.' +Rake::RDocTask.new(:rdoc) do |rdoc| + rdoc.rdoc_dir = 'rdoc' + rdoc.title = '<%= class_name %>' + rdoc.options << '--line-numbers' << '--inline-source' + rdoc.rdoc_files.include('README') + rdoc.rdoc_files.include('lib/**/*.rb') +end diff --git a/railties/lib/generators/rails/plugin/templates/init.rb b/railties/lib/generators/rails/plugin/templates/init.rb new file mode 100644 index 0000000000..3c19a743c9 --- /dev/null +++ b/railties/lib/generators/rails/plugin/templates/init.rb @@ -0,0 +1 @@ +# Include hook code here diff --git a/railties/lib/generators/rails/plugin/templates/install.rb b/railties/lib/generators/rails/plugin/templates/install.rb new file mode 100644 index 0000000000..f7732d3796 --- /dev/null +++ b/railties/lib/generators/rails/plugin/templates/install.rb @@ -0,0 +1 @@ +# Install hook code here diff --git a/railties/lib/generators/rails/plugin/templates/lib/%file_name%.rb.tt b/railties/lib/generators/rails/plugin/templates/lib/%file_name%.rb.tt new file mode 100644 index 0000000000..d8d908a959 --- /dev/null +++ b/railties/lib/generators/rails/plugin/templates/lib/%file_name%.rb.tt @@ -0,0 +1 @@ +# <%= class_name %> diff --git a/railties/lib/generators/rails/plugin/templates/tasks/%file_name%_tasks.rake.tt b/railties/lib/generators/rails/plugin/templates/tasks/%file_name%_tasks.rake.tt new file mode 100644 index 0000000000..72920a9d3a --- /dev/null +++ b/railties/lib/generators/rails/plugin/templates/tasks/%file_name%_tasks.rake.tt @@ -0,0 +1,4 @@ +# desc "Explaining what the task does" +# task :<%= file_name %> do +# # Task goes here +# end diff --git a/railties/lib/generators/rails/plugin/templates/uninstall.rb b/railties/lib/generators/rails/plugin/templates/uninstall.rb new file mode 100644 index 0000000000..9738333463 --- /dev/null +++ b/railties/lib/generators/rails/plugin/templates/uninstall.rb @@ -0,0 +1 @@ +# Uninstall hook code here |