== Appendix == If you prefer to use RSpec instead of tets, you may be interested in the http://github.com/pat-maddox/rspec-plugin-generator/tree/master[RSpec Plugin Generator]. === References === * http://nubyonrails.com/articles/the-complete-guide-to-rails-plugins-part-i * http://nubyonrails.com/articles/2006/05/09/the-complete-guide-to-rails-plugins-part-ii * http://github.com/technoweenie/attachment_fu/tree/master * http://daddy.platte.name/2007/05/rails-plugins-keep-initrb-thin.html * http://www.mbleigh.com/2008/6/11/gemplugins-a-brief-introduction-to-the-future-of-rails-plugins === Final plugin directory structure === The final plugin should have a directory structure that looks something like this: ------------------------------------------------ |-- MIT-LICENSE |-- README |-- Rakefile |-- generators | |-- yaffle_definition | | |-- USAGE | | |-- templates | | | `-- definition.txt | | `-- yaffle_definition_generator.rb | |-- yaffle_migration | | |-- USAGE | | |-- templates | | `-- yaffle_migration_generator.rb | `-- yaffle_route | |-- USAGE | |-- templates | `-- yaffle_route_generator.rb |-- install.rb |-- lib | |-- app | | |-- controllers | | | `-- woodpeckers_controller.rb | | |-- helpers | | | `-- woodpeckers_helper.rb | | `-- models | | `-- woodpecker.rb | |-- db | | `-- migrate | | `-- 20081116181115_create_birdhouses.rb | |-- yaffle | | |-- acts_as_yaffle.rb | | |-- commands.rb | | `-- core_ext.rb | `-- yaffle.rb |-- pkg | `-- yaffle-0.0.1.gem |-- rails | `-- init.rb |-- tasks | `-- yaffle_tasks.rake |-- test | |-- acts_as_yaffle_test.rb | |-- core_ext_test.rb | |-- database.yml | |-- debug.log | |-- definition_generator_test.rb | |-- migration_generator_test.rb | |-- route_generator_test.rb | |-- schema.rb | |-- test_helper.rb | |-- woodpecker_test.rb | |-- woodpeckers_controller_test.rb | |-- wookpeckers_helper_test.rb | |-- yaffle_plugin.sqlite3.db | `-- yaffle_test.rb `-- uninstall.rb ------------------------------------------------