diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-09-24 14:01:31 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-09-24 16:11:41 -0700 |
commit | f0dd77c6be6a86fe384bb0015151e0a497973d39 (patch) | |
tree | ad81bb4c807c39edeaa37035882a16d9d95ebaa9 /railties/lib/generators/rails/plugin/plugin_generator.rb | |
parent | 610b81beca461a6fa4f00c7023e0e4315eb2b8be (diff) | |
download | rails-f0dd77c6be6a86fe384bb0015151e0a497973d39.tar.gz rails-f0dd77c6be6a86fe384bb0015151e0a497973d39.tar.bz2 rails-f0dd77c6be6a86fe384bb0015151e0a497973d39.zip |
Move railties/lib/* into railties/lib/*
Diffstat (limited to 'railties/lib/generators/rails/plugin/plugin_generator.rb')
-rw-r--r-- | railties/lib/generators/rails/plugin/plugin_generator.rb | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/railties/lib/generators/rails/plugin/plugin_generator.rb b/railties/lib/generators/rails/plugin/plugin_generator.rb deleted file mode 100644 index ee785caf7d..0000000000 --- a/railties/lib/generators/rails/plugin/plugin_generator.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'generators/rails/generator/generator_generator' - -module Rails - module Generators - class PluginGenerator < NamedBase - class_option :tasks, :desc => "When supplied creates tasks base files." - - check_class_collision - - def create_root_files - directory '.', plugin_dir, :recursive => false - end - - def create_lib_files - directory 'lib', plugin_dir('lib'), :recursive => false - end - - def create_tasks_files - return unless options[:tasks] - directory 'tasks', plugin_dir('tasks') - end - - hook_for :generator do |instance, generator| - instance.inside instance.send(:plugin_dir), :verbose => true do - instance.invoke generator, [ instance.name ], :namespace => false - end - end - - hook_for :test_framework do |instance, test_framework| - instance.inside instance.send(:plugin_dir), :verbose => true do - instance.invoke test_framework - end - end - - protected - - def plugin_dir(join=nil) - if join - File.join(plugin_dir, join) - else - "vendor/plugins/#{file_name}" - end - end - - end - end -end |