spree 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of spree might be problematic. Click here for more details.
- data/History.txt +24 -0
- data/License.txt +26 -0
- data/Manifest.txt +534 -0
- data/README.txt +1 -0
- data/Rakefile +4 -0
- data/bin/spree +157 -0
- data/config/hoe.rb +78 -0
- data/config/requirements.rb +15 -0
- data/lib/spree/version.rb +9 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/script/txt2html +74 -0
- data/setup.rb +1585 -0
- data/starter-app/README +182 -0
- data/starter-app/Rakefile +10 -0
- data/starter-app/app/controllers/application.rb +14 -0
- data/starter-app/app/helpers/application_helper.rb +3 -0
- data/starter-app/app/models/role.rb +3 -0
- data/starter-app/app/models/tag.rb +37 -0
- data/starter-app/app/models/tagging.rb +16 -0
- data/starter-app/app/models/user.rb +102 -0
- data/starter-app/app/views/layouts/application.rhtml +46 -0
- data/starter-app/app/views/shared/_store_menu.rhtml +6 -0
- data/starter-app/config/boot.rb +45 -0
- data/starter-app/config/database.yml +23 -0
- data/starter-app/config/environment.rb +140 -0
- data/starter-app/config/environments/development.rb +21 -0
- data/starter-app/config/environments/production.rb +21 -0
- data/starter-app/config/environments/test.rb +19 -0
- data/starter-app/config/routes.rb +28 -0
- data/starter-app/db/migrate/001_create_users.rb +17 -0
- data/starter-app/db/migrate/002_create_roles.rb +20 -0
- data/starter-app/db/migrate/003_create_tags_and_taggings.rb +28 -0
- data/starter-app/db/migrate/004_spree_to_version_21.rb +9 -0
- data/starter-app/db/sample/addresses.yml +24 -0
- data/starter-app/db/sample/categories.yml +35 -0
- data/starter-app/db/sample/countries.yml +3 -0
- data/starter-app/db/sample/credit_cards.yml +12 -0
- data/starter-app/db/sample/images.yml +252 -0
- data/starter-app/db/sample/line_items.yml +23 -0
- data/starter-app/db/sample/option_types.yml +6 -0
- data/starter-app/db/sample/option_values.yml +35 -0
- data/starter-app/db/sample/orders.yml +15 -0
- data/starter-app/db/sample/product_option_types.yml +8 -0
- data/starter-app/db/sample/products.yml +35 -0
- data/starter-app/db/sample/roles.yml +3 -0
- data/starter-app/db/sample/skus.yml +28 -0
- data/starter-app/db/sample/states.yml +154 -0
- data/starter-app/db/sample/taggings.yml +16 -0
- data/starter-app/db/sample/tags.yml +6 -0
- data/starter-app/db/sample/txns.yml +7 -0
- data/starter-app/db/sample/users.yml +6 -0
- data/starter-app/db/sample/variations.yml +31 -0
- data/starter-app/doc/README_FOR_APP +2 -0
- data/starter-app/lib/authenticated_system.rb +116 -0
- data/starter-app/lib/authenticated_test_helper.rb +10 -0
- data/starter-app/lib/custom_fixtures.rb +7 -0
- data/starter-app/lib/hijacker.rb +78 -0
- data/starter-app/lib/role_requirement_system.rb +142 -0
- data/starter-app/lib/role_requirement_test_helper.rb +86 -0
- data/starter-app/lib/tagging_extensions.rb +104 -0
- data/starter-app/lib/tasks/sample/products/0000/0001/ror_tote.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0001/ror_tote_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0001/ror_tote_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0001/ror_tote_small.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0002/ror_tote_back.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0002/ror_tote_back_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0002/ror_tote_back_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0002/ror_tote_back_small.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0003/ror_bag.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0003/ror_bag_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0003/ror_bag_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0003/ror_bag_small.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0004/ror_baseball.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0004/ror_baseball_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0004/ror_baseball_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0004/ror_baseball_small.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0005/ror_baseball_back.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0005/ror_baseball_back_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0005/ror_baseball_back_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0005/ror_baseball_back_small.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0006/ror_jr_spaghetti.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0006/ror_jr_spaghetti_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0006/ror_jr_spaghetti_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0006/ror_jr_spaghetti_small.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0007/ror_mug.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0007/ror_mug_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0007/ror_mug_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0007/ror_mug_small.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0008/ror_mug_back.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0008/ror_mug_back_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0008/ror_mug_back_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0008/ror_mug_back_small.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0009/ror_ringer.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0009/ror_ringer_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0009/ror_ringer_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0009/ror_ringer_small.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0010/ror_ringer_back.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0010/ror_ringer_back_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0010/ror_ringer_back_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0010/ror_ringer_back_small.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0011/ror_stein.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0011/ror_stein_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0011/ror_stein_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0011/ror_stein_small.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0012/ror_stein_back.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0012/ror_stein_back_mini.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0012/ror_stein_back_product.jpeg +0 -0
- data/starter-app/lib/tasks/sample/products/0000/0012/ror_stein_back_small.jpeg +0 -0
- data/starter-app/lib/tasks/spree_sample_data.rake +38 -0
- data/starter-app/public/.htaccess +40 -0
- data/starter-app/public/404.html +30 -0
- data/starter-app/public/500.html +30 -0
- data/starter-app/public/dispatch.cgi +10 -0
- data/starter-app/public/dispatch.fcgi +24 -0
- data/starter-app/public/dispatch.rb +10 -0
- data/starter-app/public/favicon.ico +0 -0
- data/starter-app/public/images/rails.png +0 -0
- data/starter-app/public/index.html +277 -0
- data/starter-app/public/javascripts/application.js +2 -0
- data/starter-app/public/javascripts/controls.js +833 -0
- data/starter-app/public/javascripts/dragdrop.js +942 -0
- data/starter-app/public/javascripts/effects.js +1088 -0
- data/starter-app/public/javascripts/prototype.js +4184 -0
- data/starter-app/public/robots.txt +1 -0
- data/starter-app/public/stylesheets/application.css +209 -0
- data/starter-app/public/stylesheets/cart/_controller.css +4 -0
- data/starter-app/public/stylesheets/checkout/_controller.css +13 -0
- data/starter-app/script/about +3 -0
- data/starter-app/script/breakpointer +3 -0
- data/starter-app/script/console +3 -0
- data/starter-app/script/destroy +3 -0
- data/starter-app/script/generate +3 -0
- data/starter-app/script/performance/benchmarker +3 -0
- data/starter-app/script/performance/profiler +3 -0
- data/starter-app/script/plugin +3 -0
- data/starter-app/script/process/inspector +3 -0
- data/starter-app/script/process/reaper +3 -0
- data/starter-app/script/process/spawner +3 -0
- data/starter-app/script/runner +3 -0
- data/starter-app/script/server +3 -0
- data/starter-app/test/fixtures/users.yml +7 -0
- data/starter-app/test/test_helper.rb +28 -0
- data/starter-app/test/unit/user_test.rb +8 -0
- data/starter-app/vendor/plugins/acts_as_list/README +23 -0
- data/starter-app/vendor/plugins/acts_as_list/init.rb +3 -0
- data/starter-app/vendor/plugins/acts_as_list/lib/active_record/acts/list.rb +256 -0
- data/starter-app/vendor/plugins/acts_as_list/test/list_test.rb +332 -0
- data/starter-app/vendor/plugins/acts_as_tree/README +26 -0
- data/starter-app/vendor/plugins/acts_as_tree/Rakefile +22 -0
- data/starter-app/vendor/plugins/acts_as_tree/init.rb +1 -0
- data/starter-app/vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb +96 -0
- data/starter-app/vendor/plugins/acts_as_tree/test/abstract_unit.rb +0 -0
- data/starter-app/vendor/plugins/acts_as_tree/test/acts_as_tree_test.rb +219 -0
- data/starter-app/vendor/plugins/acts_as_tree/test/database.yml +0 -0
- data/starter-app/vendor/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
- data/starter-app/vendor/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
- data/starter-app/vendor/plugins/acts_as_tree/test/schema.rb +0 -0
- data/starter-app/vendor/plugins/attachment_fu/CHANGELOG +24 -0
- data/starter-app/vendor/plugins/attachment_fu/README +162 -0
- data/starter-app/vendor/plugins/attachment_fu/Rakefile +22 -0
- data/starter-app/vendor/plugins/attachment_fu/amazon_s3.yml.tpl +14 -0
- data/starter-app/vendor/plugins/attachment_fu/init.rb +14 -0
- data/starter-app/vendor/plugins/attachment_fu/install.rb +5 -0
- data/starter-app/vendor/plugins/attachment_fu/lib/geometry.rb +93 -0
- data/starter-app/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb +410 -0
- data/starter-app/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/db_file_backend.rb +39 -0
- data/starter-app/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb +97 -0
- data/starter-app/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/s3_backend.rb +309 -0
- data/starter-app/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/image_science_processor.rb +61 -0
- data/starter-app/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/mini_magick_processor.rb +56 -0
- data/starter-app/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/rmagick_processor.rb +53 -0
- data/starter-app/vendor/plugins/attachment_fu/test/amazon_s3.yml +6 -0
- data/starter-app/vendor/plugins/attachment_fu/test/backends/db_file_test.rb +16 -0
- data/starter-app/vendor/plugins/attachment_fu/test/backends/file_system_test.rb +80 -0
- data/starter-app/vendor/plugins/attachment_fu/test/backends/remote/s3_test.rb +103 -0
- data/starter-app/vendor/plugins/attachment_fu/test/base_attachment_tests.rb +57 -0
- data/starter-app/vendor/plugins/attachment_fu/test/basic_test.rb +64 -0
- data/starter-app/vendor/plugins/attachment_fu/test/database.yml +18 -0
- data/starter-app/vendor/plugins/attachment_fu/test/extra_attachment_test.rb +57 -0
- data/starter-app/vendor/plugins/attachment_fu/test/fixtures/attachment.rb +127 -0
- data/starter-app/vendor/plugins/attachment_fu/test/fixtures/files/fake/rails.png +0 -0
- data/starter-app/vendor/plugins/attachment_fu/test/fixtures/files/foo.txt +1 -0
- data/starter-app/vendor/plugins/attachment_fu/test/fixtures/files/rails.png +0 -0
- data/starter-app/vendor/plugins/attachment_fu/test/geometry_test.rb +101 -0
- data/starter-app/vendor/plugins/attachment_fu/test/processors/image_science_test.rb +31 -0
- data/starter-app/vendor/plugins/attachment_fu/test/processors/mini_magick_test.rb +31 -0
- data/starter-app/vendor/plugins/attachment_fu/test/processors/rmagick_test.rb +241 -0
- data/starter-app/vendor/plugins/attachment_fu/test/schema.rb +86 -0
- data/starter-app/vendor/plugins/attachment_fu/test/test_helper.rb +142 -0
- data/starter-app/vendor/plugins/attachment_fu/test/validation_test.rb +55 -0
- data/starter-app/vendor/plugins/calendar_date_select/CHANGELOG +170 -0
- data/starter-app/vendor/plugins/calendar_date_select/MIT-LICENSE +20 -0
- data/starter-app/vendor/plugins/calendar_date_select/README +10 -0
- data/starter-app/vendor/plugins/calendar_date_select/init.rb +15 -0
- data/starter-app/vendor/plugins/calendar_date_select/js_test/functional/cds_test.html +324 -0
- data/starter-app/vendor/plugins/calendar_date_select/js_test/prototype.js +4184 -0
- data/starter-app/vendor/plugins/calendar_date_select/js_test/test.css +40 -0
- data/starter-app/vendor/plugins/calendar_date_select/js_test/unit/cds_helper_methods.html +46 -0
- data/starter-app/vendor/plugins/calendar_date_select/js_test/unittest.js +564 -0
- data/starter-app/vendor/plugins/calendar_date_select/lib/calendar_date_select.rb +192 -0
- data/starter-app/vendor/plugins/calendar_date_select/lib/includes_helper.rb +22 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/images/calendar_date_select/calendar.gif +0 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/calendar_date_select.js +439 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_american.js +34 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_euro_24hr.js +7 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_finnish.js +24 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_hyphen_ampm.js +36 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/format_italian.js +24 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/javascripts/calendar_date_select/locale/fi.js +10 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/blue.css +130 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/default.css +135 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/plain.css +128 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/red.css +135 -0
- data/starter-app/vendor/plugins/calendar_date_select/public/stylesheets/calendar_date_select/silver.css +133 -0
- data/starter-app/vendor/plugins/calendar_date_select/test/functional/calendar_date_select_test.rb +95 -0
- data/starter-app/vendor/plugins/calendar_date_select/test/functional/helper_methods_test.rb +15 -0
- data/starter-app/vendor/plugins/calendar_date_select/test/test_helper.rb +26 -0
- data/starter-app/vendor/plugins/engines/CHANGELOG +258 -0
- data/starter-app/vendor/plugins/engines/MIT-LICENSE +21 -0
- data/starter-app/vendor/plugins/engines/README +63 -0
- data/starter-app/vendor/plugins/engines/Rakefile +32 -0
- data/starter-app/vendor/plugins/engines/about.yml +7 -0
- data/starter-app/vendor/plugins/engines/boot.rb +18 -0
- data/starter-app/vendor/plugins/engines/generators/plugin_migration/USAGE +45 -0
- data/starter-app/vendor/plugins/engines/generators/plugin_migration/plugin_migration_generator.rb +79 -0
- data/starter-app/vendor/plugins/engines/generators/plugin_migration/templates/plugin_migration.erb +13 -0
- data/starter-app/vendor/plugins/engines/init.rb +2 -0
- data/starter-app/vendor/plugins/engines/lib/engines.rb +169 -0
- data/starter-app/vendor/plugins/engines/lib/engines/assets.rb +38 -0
- data/starter-app/vendor/plugins/engines/lib/engines/plugin.rb +125 -0
- data/starter-app/vendor/plugins/engines/lib/engines/plugin/list.rb +30 -0
- data/starter-app/vendor/plugins/engines/lib/engines/plugin/loader.rb +18 -0
- data/starter-app/vendor/plugins/engines/lib/engines/plugin/locator.rb +11 -0
- data/starter-app/vendor/plugins/engines/lib/engines/plugin/migrator.rb +60 -0
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/action_mailer.rb +85 -0
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/active_record.rb +24 -0
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/asset_helpers.rb +119 -0
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb +145 -0
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/migrations.rb +161 -0
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/rails.rb +11 -0
- data/starter-app/vendor/plugins/engines/lib/engines/rails_extensions/routing.rb +84 -0
- data/starter-app/vendor/plugins/engines/lib/engines/testing.rb +87 -0
- data/starter-app/vendor/plugins/engines/tasks/engines.rake +176 -0
- data/starter-app/vendor/plugins/in_place_editing/README +14 -0
- data/starter-app/vendor/plugins/in_place_editing/Rakefile +22 -0
- data/starter-app/vendor/plugins/in_place_editing/init.rb +2 -0
- data/starter-app/vendor/plugins/in_place_editing/lib/in_place_editing.rb +25 -0
- data/starter-app/vendor/plugins/in_place_editing/lib/in_place_macros_helper.rb +71 -0
- data/starter-app/vendor/plugins/in_place_editing/test/in_place_editing_test.rb +69 -0
- data/starter-app/vendor/plugins/paginating_find/CHANGELOG +120 -0
- data/starter-app/vendor/plugins/paginating_find/README +89 -0
- data/starter-app/vendor/plugins/paginating_find/init.rb +2 -0
- data/starter-app/vendor/plugins/paginating_find/lib/paginating_find.rb +138 -0
- data/starter-app/vendor/plugins/paginating_find/lib/paging_enumerator.rb +158 -0
- data/starter-app/vendor/plugins/paginating_find/lib/paging_helper.rb +47 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/Rakefile +10 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/app/controllers/application.rb +2 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/config/boot.rb +44 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/config/database.yml +6 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/config/environment.rb +53 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/config/environments/test.rb +19 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/config/routes.rb +22 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/db/schema.rb +16 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/script/breakpointer +3 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/script/console +3 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/test/fixtures/articles.yml +19 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/test/fixtures/authors.yml +7 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/test/fixtures/edits.yml +11 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/test/fixtures/models.rb +18 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/test/test_helper.rb +33 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/test/unit/abstract_test.rb +7 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/test/unit/group_test.rb +40 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/test/unit/paginating_find_test.rb +194 -0
- data/starter-app/vendor/plugins/paginating_find/test_app/test/unit/paging_enumerator_test.rb +143 -0
- data/starter-app/vendor/plugins/spree/.rakeTasks +7 -0
- data/starter-app/vendor/plugins/spree/CHANGELOG +1 -0
- data/starter-app/vendor/plugins/spree/LICENSE +26 -0
- data/starter-app/vendor/plugins/spree/README +1 -0
- data/starter-app/vendor/plugins/spree/Rakefile +10 -0
- data/starter-app/vendor/plugins/spree/VERSION +1 -0
- data/starter-app/vendor/plugins/spree/app/controllers/account_controller.rb +48 -0
- data/starter-app/vendor/plugins/spree/app/controllers/admin/base_controller.rb +7 -0
- data/starter-app/vendor/plugins/spree/app/controllers/admin/categories_controller.rb +107 -0
- data/starter-app/vendor/plugins/spree/app/controllers/admin/images_controller.rb +15 -0
- data/starter-app/vendor/plugins/spree/app/controllers/admin/option_types_controller.rb +70 -0
- data/starter-app/vendor/plugins/spree/app/controllers/admin/orders_controller.rb +247 -0
- data/starter-app/vendor/plugins/spree/app/controllers/admin/overview_controller.rb +14 -0
- data/starter-app/vendor/plugins/spree/app/controllers/admin/products_controller.rb +207 -0
- data/starter-app/vendor/plugins/spree/app/controllers/admin/reports_controller.rb +53 -0
- data/starter-app/vendor/plugins/spree/app/controllers/admin/users_controller.rb +45 -0
- data/starter-app/vendor/plugins/spree/app/controllers/admin/variations_controller.rb +73 -0
- data/starter-app/vendor/plugins/spree/app/controllers/cart_controller.rb +45 -0
- data/starter-app/vendor/plugins/spree/app/controllers/checkout_controller.rb +184 -0
- data/starter-app/vendor/plugins/spree/app/controllers/rails_cart/base_controller.rb +47 -0
- data/starter-app/vendor/plugins/spree/app/controllers/store_controller.rb +27 -0
- data/starter-app/vendor/plugins/spree/app/helpers/account_helper.rb +2 -0
- data/starter-app/vendor/plugins/spree/app/helpers/admin/base_helper.rb +14 -0
- data/starter-app/vendor/plugins/spree/app/helpers/admin/categories_helper.rb +3 -0
- data/starter-app/vendor/plugins/spree/app/helpers/admin/option_values_helper.rb +2 -0
- data/starter-app/vendor/plugins/spree/app/helpers/admin/orders_helper.rb +11 -0
- data/starter-app/vendor/plugins/spree/app/helpers/admin/overview_helper.rb +12 -0
- data/starter-app/vendor/plugins/spree/app/helpers/admin/products_helper.rb +7 -0
- data/starter-app/vendor/plugins/spree/app/helpers/admin/users_helper.rb +2 -0
- data/starter-app/vendor/plugins/spree/app/helpers/admin/variations_helper.rb +2 -0
- data/starter-app/vendor/plugins/spree/app/helpers/cart_helper.rb +6 -0
- data/starter-app/vendor/plugins/spree/app/helpers/checkout_helper.rb +17 -0
- data/starter-app/vendor/plugins/spree/app/helpers/rails_cart/base_helper.rb +101 -0
- data/starter-app/vendor/plugins/spree/app/helpers/search_helper.rb +10 -0
- data/starter-app/vendor/plugins/spree/app/helpers/store_helper.rb +3 -0
- data/starter-app/vendor/plugins/spree/app/models/address.rb +17 -0
- data/starter-app/vendor/plugins/spree/app/models/cart.rb +37 -0
- data/starter-app/vendor/plugins/spree/app/models/cart_item.rb +29 -0
- data/starter-app/vendor/plugins/spree/app/models/category.rb +66 -0
- data/starter-app/vendor/plugins/spree/app/models/country.rb +3 -0
- data/starter-app/vendor/plugins/spree/app/models/credit_card.rb +24 -0
- data/starter-app/vendor/plugins/spree/app/models/image.rb +12 -0
- data/starter-app/vendor/plugins/spree/app/models/line_item.rb +24 -0
- data/starter-app/vendor/plugins/spree/app/models/option_type.rb +4 -0
- data/starter-app/vendor/plugins/spree/app/models/option_value.rb +5 -0
- data/starter-app/vendor/plugins/spree/app/models/order.rb +87 -0
- data/starter-app/vendor/plugins/spree/app/models/order_mailer.rb +22 -0
- data/starter-app/vendor/plugins/spree/app/models/order_operation.rb +7 -0
- data/starter-app/vendor/plugins/spree/app/models/payment.rb +49 -0
- data/starter-app/vendor/plugins/spree/app/models/product.rb +42 -0
- data/starter-app/vendor/plugins/spree/app/models/product_option_type.rb +5 -0
- data/starter-app/vendor/plugins/spree/app/models/search_criteria.rb +27 -0
- data/starter-app/vendor/plugins/spree/app/models/sku.rb +7 -0
- data/starter-app/vendor/plugins/spree/app/models/state.rb +3 -0
- data/starter-app/vendor/plugins/spree/app/models/tax_treatment.rb +2 -0
- data/starter-app/vendor/plugins/spree/app/models/txn.rb +7 -0
- data/starter-app/vendor/plugins/spree/app/models/variation.rb +8 -0
- data/starter-app/vendor/plugins/spree/app/views/account/index.rhtml +3 -0
- data/starter-app/vendor/plugins/spree/app/views/account/login.rhtml +12 -0
- data/starter-app/vendor/plugins/spree/app/views/account/signup.rhtml +16 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/categories/_form.rhtml +24 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/categories/edit.rhtml +9 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/categories/list.rhtml +47 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/categories/new.rhtml +8 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/images/new.html.erb +10 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/option_types/_form.rhtml +16 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/option_types/_new_option_value.rhtml +13 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/option_types/_option_values.rhtml +43 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/option_types/edit.rhtml +8 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/option_types/index.rhtml +23 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/option_types/new.rhtml +8 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/option_types/select.rhtml +28 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/option_types/test.rhtml +8 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/orders/_address.rhtml +37 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/orders/index.rhtml +99 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/orders/show.rhtml +72 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/overview/index.rhtml +0 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/products/_form.rhtml +65 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/products/_menu.rhtml +7 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/products/_new_variation.rhtml +11 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/products/_option_types.rhtml +42 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/products/_variations.rhtml +41 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/products/edit.rhtml +8 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/products/index.rhtml +66 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/products/new.rhtml +9 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/reports/index.rhtml +29 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/reports/sales_total.rhtml +28 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/users/_form.rhtml +29 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/users/_menu.rhtml +5 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/users/edit.rhtml +8 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/users/index.rhtml +26 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/users/new.rhtml +6 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/users/show.rhtml +9 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/variations/_form.rhtml +33 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/variations/_option_values.rhtml +5 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/variations/list.rhtml +23 -0
- data/starter-app/vendor/plugins/spree/app/views/admin/variations/new.rhtml +14 -0
- data/starter-app/vendor/plugins/spree/app/views/cart/index.rhtml +49 -0
- data/starter-app/vendor/plugins/spree/app/views/checkout/_address.rhtml +51 -0
- data/starter-app/vendor/plugins/spree/app/views/checkout/_address_ro.rhtml +18 -0
- data/starter-app/vendor/plugins/spree/app/views/checkout/_cart_item.rhtml +5 -0
- data/starter-app/vendor/plugins/spree/app/views/checkout/_extra.rhtml +1 -0
- data/starter-app/vendor/plugins/spree/app/views/checkout/addresses.rhtml +51 -0
- data/starter-app/vendor/plugins/spree/app/views/checkout/cvv.rhtml +15 -0
- data/starter-app/vendor/plugins/spree/app/views/checkout/empty_cart.rhtml +4 -0
- data/starter-app/vendor/plugins/spree/app/views/checkout/final_confirmation.rhtml +92 -0
- data/starter-app/vendor/plugins/spree/app/views/checkout/incomplete.rhtml +7 -0
- data/starter-app/vendor/plugins/spree/app/views/checkout/thank_you.rhtml +11 -0
- data/starter-app/vendor/plugins/spree/app/views/layouts/admin.rhtml +69 -0
- data/starter-app/vendor/plugins/spree/app/views/layouts/products.rhtml +20 -0
- data/starter-app/vendor/plugins/spree/app/views/layouts/simple.rhtml +37 -0
- data/starter-app/vendor/plugins/spree/app/views/order_mailer/cancel.rhtml +15 -0
- data/starter-app/vendor/plugins/spree/app/views/order_mailer/confirm.rhtml +18 -0
- data/starter-app/vendor/plugins/spree/app/views/shared/_images.html.erb +43 -0
- data/starter-app/vendor/plugins/spree/app/views/shared/_order_details.rhtml +35 -0
- data/starter-app/vendor/plugins/spree/app/views/shared/_paginate.rhtml +34 -0
- data/starter-app/vendor/plugins/spree/app/views/shared/_report_criteria.rhtml +32 -0
- data/starter-app/vendor/plugins/spree/app/views/shared/_tax_treatments.rhtml +12 -0
- data/starter-app/vendor/plugins/spree/app/views/store/_image.html.erb +5 -0
- data/starter-app/vendor/plugins/spree/app/views/store/_products.rhtml +10 -0
- data/starter-app/vendor/plugins/spree/app/views/store/_thumbnails.html.erb +9 -0
- data/starter-app/vendor/plugins/spree/app/views/store/list.rhtml +15 -0
- data/starter-app/vendor/plugins/spree/app/views/store/show.rhtml +69 -0
- data/starter-app/vendor/plugins/spree/assets/.htaccess +40 -0
- data/starter-app/vendor/plugins/spree/assets/404.html +30 -0
- data/starter-app/vendor/plugins/spree/assets/500.html +30 -0
- data/starter-app/vendor/plugins/spree/assets/dispatch.cgi +10 -0
- data/starter-app/vendor/plugins/spree/assets/dispatch.fcgi +24 -0
- data/starter-app/vendor/plugins/spree/assets/dispatch.rb +10 -0
- data/starter-app/vendor/plugins/spree/assets/favicon.ico +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/amex_cid.gif +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/creditcard.gif +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/discover_cid.gif +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/master_cid.jpg +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/products/ror_bag.jpg +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/products/ror_baseball_jersey.jpg +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/products/ror_jr_spaghetti.jpg +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/products/ror_mug.jpg +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/products/ror_ringer_tshirt.jpg +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/products/ror_stein.jpg +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/products/ror_tote.jpg +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/rails.png +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/spinner.gif +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/spree/progress.gif +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/spree/spinner.gif +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/spree/spree_logo142x65.gif +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/spree/spree_logo245x112.gif +0 -0
- data/starter-app/vendor/plugins/spree/assets/images/visa_cid.gif +0 -0
- data/starter-app/vendor/plugins/spree/assets/javascripts/application.js +2 -0
- data/starter-app/vendor/plugins/spree/assets/javascripts/controls.js +833 -0
- data/starter-app/vendor/plugins/spree/assets/javascripts/dragdrop.js +942 -0
- data/starter-app/vendor/plugins/spree/assets/javascripts/effects.js +1088 -0
- data/starter-app/vendor/plugins/spree/assets/javascripts/lowpro.js +307 -0
- data/starter-app/vendor/plugins/spree/assets/javascripts/prototype.js +2515 -0
- data/starter-app/vendor/plugins/spree/assets/robots.txt +1 -0
- data/starter-app/vendor/plugins/spree/assets/stylesheets/cart/_controller.css +71 -0
- data/starter-app/vendor/plugins/spree/assets/stylesheets/checkout/_controller.css +31 -0
- data/starter-app/vendor/plugins/spree/assets/stylesheets/fullscreen.css +63 -0
- data/starter-app/vendor/plugins/spree/assets/stylesheets/orders/_controller.css +3 -0
- data/starter-app/vendor/plugins/spree/assets/stylesheets/products/_controller.css +38 -0
- data/starter-app/vendor/plugins/spree/assets/stylesheets/spree-admin.css +348 -0
- data/starter-app/vendor/plugins/spree/assets/stylesheets/spree.css +66 -0
- data/starter-app/vendor/plugins/spree/assets/stylesheets/store/_controller.css +23 -0
- data/starter-app/vendor/plugins/spree/db/migrate/001_create_addresses.rb +20 -0
- data/starter-app/vendor/plugins/spree/db/migrate/002_create_cart_items.rb +14 -0
- data/starter-app/vendor/plugins/spree/db/migrate/003_create_carts.rb +12 -0
- data/starter-app/vendor/plugins/spree/db/migrate/004_create_categories.rb +15 -0
- data/starter-app/vendor/plugins/spree/db/migrate/005_create_categories_products.rb +12 -0
- data/starter-app/vendor/plugins/spree/db/migrate/006_create_line_items.rb +17 -0
- data/starter-app/vendor/plugins/spree/db/migrate/007_create_option_values.rb +15 -0
- data/starter-app/vendor/plugins/spree/db/migrate/008_create_orders.rb +24 -0
- data/starter-app/vendor/plugins/spree/db/migrate/009_create_products.rb +20 -0
- data/starter-app/vendor/plugins/spree/db/migrate/010_create_txns.rb +18 -0
- data/starter-app/vendor/plugins/spree/db/migrate/011_create_variations.rb +11 -0
- data/starter-app/vendor/plugins/spree/db/migrate/012_create_tax_treatments.rb +23 -0
- data/starter-app/vendor/plugins/spree/db/migrate/013_create_skus.rb +13 -0
- data/starter-app/vendor/plugins/spree/db/migrate/014_create_countries.rb +11 -0
- data/starter-app/vendor/plugins/spree/db/migrate/015_create_states.rb +13 -0
- data/starter-app/vendor/plugins/spree/db/migrate/016_create_option_types.rb +13 -0
- data/starter-app/vendor/plugins/spree/db/migrate/017_create_product_option_types.rb +14 -0
- data/starter-app/vendor/plugins/spree/db/migrate/018_create_option_values_variations.rb +12 -0
- data/starter-app/vendor/plugins/spree/db/migrate/019_create_images.rb +19 -0
- data/starter-app/vendor/plugins/spree/db/migrate/020_create_credit_cards.rb +20 -0
- data/starter-app/vendor/plugins/spree/db/migrate/021_create_order_operations.rb +14 -0
- data/starter-app/vendor/plugins/spree/init.rb +11 -0
- data/starter-app/vendor/plugins/spree/install.rb +3 -0
- data/starter-app/vendor/plugins/spree/lib/constants/enumerable_constants.rb +207 -0
- data/starter-app/vendor/plugins/spree/lib/format.rb +12 -0
- data/starter-app/vendor/plugins/spree/lib/gateway/bogus_gateway.rb +63 -0
- data/starter-app/vendor/plugins/spree/lib/shipping/flat_rate.rb +10 -0
- data/starter-app/vendor/plugins/spree/lib/tasks/spree_bootstrap.rake +24 -0
- data/starter-app/vendor/plugins/spree/lib/tax/sales_tax.rb +26 -0
- data/starter-app/vendor/plugins/spree/routes.rb +3 -0
- data/starter-app/vendor/plugins/spree/script/about +3 -0
- data/starter-app/vendor/plugins/spree/script/breakpointer +3 -0
- data/starter-app/vendor/plugins/spree/script/console +3 -0
- data/starter-app/vendor/plugins/spree/script/destroy +3 -0
- data/starter-app/vendor/plugins/spree/script/generate +3 -0
- data/starter-app/vendor/plugins/spree/script/performance/benchmarker +3 -0
- data/starter-app/vendor/plugins/spree/script/performance/profiler +3 -0
- data/starter-app/vendor/plugins/spree/script/plugin +3 -0
- data/starter-app/vendor/plugins/spree/script/process/inspector +3 -0
- data/starter-app/vendor/plugins/spree/script/process/reaper +3 -0
- data/starter-app/vendor/plugins/spree/script/process/spawner +3 -0
- data/starter-app/vendor/plugins/spree/script/runner +3 -0
- data/starter-app/vendor/plugins/spree/script/server +3 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/addresses.yml +29 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/categories.yml +40 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/line_items.yml +32 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/orders.yml +17 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/products.yml +63 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/products_tags.yml +10 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/roles.yml +6 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/roles_users.yml +3 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/skus.yml +5 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/tags.yml +7 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/tax_treatments.yml +7 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/txns.yml +13 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/users.yml +40 -0
- data/starter-app/vendor/plugins/spree/test/fixtures/variations.yml +16 -0
- data/starter-app/vendor/plugins/spree/test/functional/account_controller_test.rb +129 -0
- data/starter-app/vendor/plugins/spree/test/functional/admin/base_controller_test.rb +18 -0
- data/starter-app/vendor/plugins/spree/test/functional/admin/option_groups_controller_test.rb +18 -0
- data/starter-app/vendor/plugins/spree/test/functional/admin/option_values_controller_test.rb +18 -0
- data/starter-app/vendor/plugins/spree/test/functional/admin/orders_controller_test.rb +18 -0
- data/starter-app/vendor/plugins/spree/test/functional/admin/overview_controller_test.rb +18 -0
- data/starter-app/vendor/plugins/spree/test/functional/admin/products_controller_test.rb +125 -0
- data/starter-app/vendor/plugins/spree/test/functional/admin/users_controller_test.rb +58 -0
- data/starter-app/vendor/plugins/spree/test/functional/admin/variations_controller_test.rb +18 -0
- data/starter-app/vendor/plugins/spree/test/functional/application_controller_test.rb +30 -0
- data/starter-app/vendor/plugins/spree/test/functional/cart_controller_test.rb +76 -0
- data/starter-app/vendor/plugins/spree/test/functional/checkout_controller_test.rb +20 -0
- data/starter-app/vendor/plugins/spree/test/integration/authentication_test.rb +53 -0
- data/starter-app/vendor/plugins/spree/test/integration/product_admin_test.rb +135 -0
- data/starter-app/vendor/plugins/spree/test/integration/user_stories_test.rb +59 -0
- data/starter-app/vendor/plugins/spree/test/integration/variations_test.rb +24 -0
- data/starter-app/vendor/plugins/spree/test/test_helper.rb +45 -0
- data/starter-app/vendor/plugins/spree/test/unit/address_test.rb +10 -0
- data/starter-app/vendor/plugins/spree/test/unit/cart_item_test.rb +55 -0
- data/starter-app/vendor/plugins/spree/test/unit/cart_test.rb +35 -0
- data/starter-app/vendor/plugins/spree/test/unit/category_test.rb +52 -0
- data/starter-app/vendor/plugins/spree/test/unit/line_item_test.rb +61 -0
- data/starter-app/vendor/plugins/spree/test/unit/option_group_test.rb +12 -0
- data/starter-app/vendor/plugins/spree/test/unit/order_test.rb +49 -0
- data/starter-app/vendor/plugins/spree/test/unit/product_test.rb +107 -0
- data/starter-app/vendor/plugins/spree/test/unit/role_test.rb +10 -0
- data/starter-app/vendor/plugins/spree/test/unit/sales_tax_test.rb +46 -0
- data/starter-app/vendor/plugins/spree/test/unit/sku_test.rb +10 -0
- data/starter-app/vendor/plugins/spree/test/unit/tag_test.rb +9 -0
- data/starter-app/vendor/plugins/spree/test/unit/tax_treatment_test.rb +10 -0
- data/starter-app/vendor/plugins/spree/test/unit/txn_test.rb +10 -0
- data/starter-app/vendor/plugins/spree/test/unit/variation_test.rb +9 -0
- data/starter-app/vendor/plugins/spree/uninstall.rb +1 -0
- data/tasks/deployment.rake +34 -0
- data/tasks/environment.rake +7 -0
- data/tasks/website.rake +17 -0
- data/test/test_helper.rb +2 -0
- data/test/test_railscart.rb +11 -0
- metadata +628 -0
@@ -0,0 +1,145 @@
|
|
1
|
+
# One of the magic features that that engines plugin provides is the ability to
|
2
|
+
# override selected methods in controllers and helpers from your application.
|
3
|
+
# This is achieved by trapping requests to load those files, and then mixing in
|
4
|
+
# code from plugins (in the order the plugins were loaded) before finally loading
|
5
|
+
# any versions from the main +app+ directory.
|
6
|
+
#
|
7
|
+
# The behaviour of this extension is output to the log file for help when
|
8
|
+
# debugging.
|
9
|
+
#
|
10
|
+
# == Example
|
11
|
+
#
|
12
|
+
# A plugin contains the following controller in <tt>plugin/app/controllers/my_controller.rb</tt>:
|
13
|
+
#
|
14
|
+
# class MyController < ApplicationController
|
15
|
+
# def index
|
16
|
+
# @name = "HAL 9000"
|
17
|
+
# end
|
18
|
+
# def list
|
19
|
+
# @robots = Robot.find(:all)
|
20
|
+
# end
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
# In one application that uses this plugin, we decide that the name used in the
|
24
|
+
# index action should be "Robbie", not "HAL 9000". To override this single method,
|
25
|
+
# we create the corresponding controller in our application
|
26
|
+
# (<tt>RAILS_ROOT/app/controllers/my_controller.rb</tt>), and redefine the method:
|
27
|
+
#
|
28
|
+
# class MyController < ApplicationController
|
29
|
+
# def index
|
30
|
+
# @name = "Robbie"
|
31
|
+
# end
|
32
|
+
# end
|
33
|
+
#
|
34
|
+
# The list method remains as it was defined in the plugin controller.
|
35
|
+
#
|
36
|
+
# The same basic principle applies to helpers, and also views and partials (although
|
37
|
+
# view overriding is performed in Engines::RailsExtensions::Templates; see that
|
38
|
+
# module for more information).
|
39
|
+
#
|
40
|
+
# === What about models?
|
41
|
+
#
|
42
|
+
# Unfortunately, it's not possible to provide this kind of magic for models.
|
43
|
+
# The only reason why it's possible for controllers and helpers is because
|
44
|
+
# they can be recognised by their filenames ("whatever_controller", "jazz_helper"),
|
45
|
+
# whereas models appear the same as any other typical Ruby library ("node",
|
46
|
+
# "user", "image", etc.).
|
47
|
+
#
|
48
|
+
# If mixing were allowed in models, it would mean code mixing for *every*
|
49
|
+
# file that was loaded via +require_or_load+, and this could result in
|
50
|
+
# problems where, for example, a Node model might start to include
|
51
|
+
# functionality from another file called "node" somewhere else in the
|
52
|
+
# <tt>$LOAD_PATH</tt>.
|
53
|
+
#
|
54
|
+
# One way to overcome this is to provide model functionality as a module in
|
55
|
+
# a plugin, which developers can then include into their own model
|
56
|
+
# implementations.
|
57
|
+
#
|
58
|
+
# Another option is to provide an abstract model (see the ActiveRecord::Base
|
59
|
+
# documentation) and have developers subclass this model in their own
|
60
|
+
# application if they must.
|
61
|
+
#
|
62
|
+
# ---
|
63
|
+
#
|
64
|
+
# The Engines::RailsExtensions::Dependencies module includes a method to
|
65
|
+
# override Dependencies.require_or_load, which is called to load code needed
|
66
|
+
# by Rails as it encounters constants that aren't defined.
|
67
|
+
#
|
68
|
+
# This method is enhanced with the code-mixing features described above.
|
69
|
+
#
|
70
|
+
module Engines::RailsExtensions::Dependencies
|
71
|
+
def self.included(base) #:nodoc:
|
72
|
+
base.class_eval { alias_method_chain :require_or_load, :engine_additions }
|
73
|
+
end
|
74
|
+
|
75
|
+
# Attempt to load the given file from any plugins, as well as the application.
|
76
|
+
# This performs the 'code mixing' magic, allowing application controllers and
|
77
|
+
# helpers to override single methods from those in plugins.
|
78
|
+
# If the file can be found in any plugins, it will be loaded first from those
|
79
|
+
# locations. Finally, the application version is loaded, using Ruby's behaviour
|
80
|
+
# to replace existing methods with their new definitions.
|
81
|
+
#
|
82
|
+
# If <tt>Engines.disable_code_mixing == true</tt>, the first controller/helper on the
|
83
|
+
# <tt>$LOAD_PATH</tt> will be used (plugins' +app+ directories are always lower on the
|
84
|
+
# <tt>$LOAD_PATH</tt> than the main +app+ directory).
|
85
|
+
#
|
86
|
+
# If <tt>Engines.disable_application_code_loading == true</tt>, controllers will
|
87
|
+
# not be loaded from the main +app+ directory *if* they are present in any
|
88
|
+
# plugins.
|
89
|
+
#
|
90
|
+
# Returns true if the file could be loaded (from anywhere); false otherwise -
|
91
|
+
# mirroring the behaviour of +require_or_load+ from Rails (which mirrors
|
92
|
+
# that of Ruby's own +require+, I believe).
|
93
|
+
def require_or_load_with_engine_additions(file_name, const_path=nil)
|
94
|
+
return require_or_load_without_engine_additions(file_name, const_path) if Engines.disable_code_mixing
|
95
|
+
|
96
|
+
file_loaded = false
|
97
|
+
|
98
|
+
# try and load the plugin code first
|
99
|
+
# can't use model, as there's nothing in the name to indicate that the file is a 'model' file
|
100
|
+
# rather than a library or anything else.
|
101
|
+
Engines.code_mixing_file_types.each do |file_type|
|
102
|
+
# if we recognise this type
|
103
|
+
# (this regexp splits out the module/filename from any instances of app/#{type}, so that
|
104
|
+
# modules are still respected.)
|
105
|
+
if file_name =~ /^(.*app\/#{file_type}s\/)?(.*_#{file_type})(\.rb)?$/
|
106
|
+
base_name = $2
|
107
|
+
# ... go through the plugins from first started to last, so that
|
108
|
+
# code with a high precedence (started later) will override lower precedence
|
109
|
+
# implementations
|
110
|
+
Engines.plugins.each do |plugin|
|
111
|
+
plugin_file_name = File.expand_path(File.join(plugin.directory, 'app', "#{file_type}s", base_name))
|
112
|
+
Engines.logger.debug("checking plugin '#{plugin.name}' for '#{base_name}'")
|
113
|
+
if File.file?("#{plugin_file_name}.rb")
|
114
|
+
Engines.logger.debug("==> loading from plugin '#{plugin.name}'")
|
115
|
+
file_loaded = true if require_or_load_without_engine_additions(plugin_file_name, const_path)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# finally, load any application-specific controller classes using the 'proper'
|
120
|
+
# rails load mechanism, EXCEPT when we're testing engines and could load this file
|
121
|
+
# from an engine
|
122
|
+
if Engines.disable_application_code_loading
|
123
|
+
Engines.logger.debug("loading from application disabled.")
|
124
|
+
else
|
125
|
+
# Ensure we are only loading from the /app directory at this point
|
126
|
+
app_file_name = File.join(RAILS_ROOT, 'app', "#{file_type}s", "#{base_name}")
|
127
|
+
if File.file?("#{app_file_name}.rb")
|
128
|
+
Engines.logger.debug("loading from application: #{base_name}")
|
129
|
+
file_loaded = true if require_or_load_without_engine_additions(app_file_name, const_path)
|
130
|
+
else
|
131
|
+
Engines.logger.debug("(file not found in application)")
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
# if we managed to load a file, return true. If not, default to the original method.
|
138
|
+
# Note that this relies on the RHS of a boolean || not to be evaluated if the LHS is true.
|
139
|
+
file_loaded || require_or_load_without_engine_additions(file_name, const_path)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
module ::Dependencies #:nodoc:
|
144
|
+
include Engines::RailsExtensions::Dependencies
|
145
|
+
end
|
@@ -0,0 +1,161 @@
|
|
1
|
+
# Contains the enhancements to Rails' migrations system to support the
|
2
|
+
# Engines::Plugin::Migrator. See Engines::RailsExtensions::Migrations for more
|
3
|
+
# information.
|
4
|
+
|
5
|
+
require "engines/plugin/migrator"
|
6
|
+
|
7
|
+
# = Plugins and Migrations: Background
|
8
|
+
#
|
9
|
+
# Rails uses migrations to describe changes to the databases as your application
|
10
|
+
# evolves. Each change to your application - adding and removing models, most
|
11
|
+
# commonly - might require tweaks to your schema in the form of new tables, or new
|
12
|
+
# columns on existing tables, or possibly the removal of tables or columns. Migrations
|
13
|
+
# can even include arbitrary code to *transform* data as the underlying schema
|
14
|
+
# changes.
|
15
|
+
#
|
16
|
+
# The point is that at any particular stage in your application's development,
|
17
|
+
# migrations serve to transform the database into a state where it is compatible
|
18
|
+
# and appropriate at that time.
|
19
|
+
#
|
20
|
+
# == What about plugins?
|
21
|
+
#
|
22
|
+
# If you want to share models using plugins, chances are that you might also
|
23
|
+
# want to include the corresponding migrations to create tables for those models.
|
24
|
+
# With the engines plugin installed, plugins can carry migration data easily:
|
25
|
+
#
|
26
|
+
# vendor/
|
27
|
+
# |
|
28
|
+
# plugins/
|
29
|
+
# |
|
30
|
+
# my_plugin/
|
31
|
+
# |- init.rb
|
32
|
+
# |- lib/
|
33
|
+
# |- db/
|
34
|
+
# |-migrate/
|
35
|
+
# |- 001_do_something.rb
|
36
|
+
# |- 002_and_something_else.rb
|
37
|
+
# |- ...
|
38
|
+
#
|
39
|
+
# When you install a plugin which contains migrations, you are undertaking a
|
40
|
+
# further step in the development of your application, the same as the addition
|
41
|
+
# of any other code. With this in mind, you may want to 'roll back' the
|
42
|
+
# installation of this plugin at some point, and the database should be able
|
43
|
+
# to migrate back to the point without this plugin in it too.
|
44
|
+
#
|
45
|
+
# == An example
|
46
|
+
#
|
47
|
+
# For example, our current application is at version 14 (according to the
|
48
|
+
# +schema_info+ table), when we decide that we want to add a tagging plugin. The
|
49
|
+
# tagging plugin chosen includes migrations to create the tables it requires
|
50
|
+
# (say, _tags_ and _taggings_, for instance), along with the models and helpers
|
51
|
+
# one might expect.
|
52
|
+
#
|
53
|
+
# After installing this plugin, these tables should be created in our database.
|
54
|
+
# Rather than running the migrations directly from the plugin, they should be
|
55
|
+
# integrated into our main migration stream in order to accurately reflect the
|
56
|
+
# state of our application's database *at this moment in time*.
|
57
|
+
#
|
58
|
+
# $ script/generate plugin_migration
|
59
|
+
# exists db/migrate
|
60
|
+
# create db/migrate/015_migrate_tagging_plugin_to_version_3.rb
|
61
|
+
#
|
62
|
+
# This migration will take our application to version 15, and contains the following,
|
63
|
+
# typical migration code:
|
64
|
+
#
|
65
|
+
# class MigrateTaggingPluginToVersion3 < ActiveRecord::Migration
|
66
|
+
# def self.up
|
67
|
+
# Engines.plugins[:tagging].migrate(3)
|
68
|
+
# end
|
69
|
+
# def self.down
|
70
|
+
# Engines.plugins[:tagging].migrate(0)
|
71
|
+
# end
|
72
|
+
# end
|
73
|
+
#
|
74
|
+
# When we migrate our application up, using <tt>rake db:migrate</tt> as normal,
|
75
|
+
# the plugin will be migrated up to its latest version (3 in this example). If we
|
76
|
+
# ever decide to migrate the application back to the state it was in at version 14,
|
77
|
+
# the plugin migrations will be taken back down to version 0 (which, typically,
|
78
|
+
# would remove all tables the plugin migrations define).
|
79
|
+
#
|
80
|
+
# == Upgrading plugins
|
81
|
+
#
|
82
|
+
# It might happen that later in an application's life, we update to a new version of
|
83
|
+
# the tagging plugin which requires some changes to our database. The tagging plugin
|
84
|
+
# provides these changes in the form of its own migrations.
|
85
|
+
#
|
86
|
+
# In this case, we just need to re-run the plugin_migration generator to create a
|
87
|
+
# new migration from the current revision to the newest one:
|
88
|
+
#
|
89
|
+
# $ script/generate plugin_migration
|
90
|
+
# exists db/migrate
|
91
|
+
# create db/migrate/023_migrate_tagging_plugin_to_version_5.rb
|
92
|
+
#
|
93
|
+
# The contents of this migration are:
|
94
|
+
#
|
95
|
+
# class MigrateTaggingPluginToVersion3 < ActiveRecord::Migration
|
96
|
+
# def self.up
|
97
|
+
# Engines.plugins[:tagging].migrate(5)
|
98
|
+
# end
|
99
|
+
# def self.down
|
100
|
+
# Engines.plugins[:tagging].migrate(3)
|
101
|
+
# end
|
102
|
+
# end
|
103
|
+
#
|
104
|
+
# Notice that if we were to migrate down to revision 22 or lower, the tagging plugin
|
105
|
+
# will be migrated back down to version 3 - the version we were previously at.
|
106
|
+
#
|
107
|
+
#
|
108
|
+
# = Creating migrations in plugins
|
109
|
+
#
|
110
|
+
# In order to use the plugin migration functionality that engines provides, a plugin
|
111
|
+
# only needs to provide regular migrations in a <tt>db/migrate</tt> folder within it.
|
112
|
+
#
|
113
|
+
# = Explicitly migrating plugins
|
114
|
+
#
|
115
|
+
# It's possible to migrate plugins within your own migrations, or any other code.
|
116
|
+
# Simply get the Plugin instance, and its Plugin#migrate method with the version
|
117
|
+
# you wish to end up at:
|
118
|
+
#
|
119
|
+
# Engines.plugins[:whatever].migrate(version)
|
120
|
+
#
|
121
|
+
# ---
|
122
|
+
#
|
123
|
+
# The Engines::RailsExtensions::Migrations module defines extensions for Rails'
|
124
|
+
# migration systems. Specifically:
|
125
|
+
#
|
126
|
+
# * Adding a hook to initialize_schema_information to create the plugin schema
|
127
|
+
# info table.
|
128
|
+
#
|
129
|
+
module Engines::RailsExtensions::Migrations
|
130
|
+
def self.included(base) # :nodoc:
|
131
|
+
base.class_eval { alias_method_chain :initialize_schema_information, :engine_additions }
|
132
|
+
end
|
133
|
+
|
134
|
+
# Create the schema tables, and ensure that the plugin schema table
|
135
|
+
# is also initialized. The plugin schema info table is defined by
|
136
|
+
# Engines::Plugin::Migrator.schema_info_table_name.
|
137
|
+
def initialize_schema_information_with_engine_additions
|
138
|
+
initialize_schema_information_without_engine_additions
|
139
|
+
|
140
|
+
# create the plugin schema stuff.
|
141
|
+
begin
|
142
|
+
execute <<-ESQL
|
143
|
+
CREATE TABLE #{Engines::Plugin::Migrator.schema_info_table_name}
|
144
|
+
(plugin_name #{type_to_sql(:string)}, version #{type_to_sql(:integer)})
|
145
|
+
ESQL
|
146
|
+
rescue ActiveRecord::StatementInvalid
|
147
|
+
# Schema has been initialized
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
module ::ActiveRecord #:nodoc:
|
153
|
+
module ConnectionAdapters #:nodoc:
|
154
|
+
module SchemaStatements #:nodoc:
|
155
|
+
include Engines::RailsExtensions::Migrations
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
# Set ActiveRecord to ignore the plugin schema table by default
|
161
|
+
::ActiveRecord::SchemaDumper.ignore_tables << Engines.schema_info_table
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# This is only here to allow for backwards compability with Engines that
|
2
|
+
# have been implemented based on Engines for Rails 1.2. It is preferred that
|
3
|
+
# the plugin list be accessed via Engines.plugins.
|
4
|
+
|
5
|
+
module Rails
|
6
|
+
# Returns the Engines::Plugin::List from Engines.plugins. It is preferable to
|
7
|
+
# access Engines.plugins directly.
|
8
|
+
def self.plugins
|
9
|
+
Engines.plugins
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# Effective use of Rails' routes can help create a tidy and elegant set of URLs,
|
2
|
+
# and is a significant part of creating an external API for your web application.
|
3
|
+
#
|
4
|
+
# When developing plugins which contain controllers, it seems obvious that including
|
5
|
+
# the corresponding routes would be extremely useful. This is particularly true
|
6
|
+
# when exposing RESTful resources using the new REST-ian features of Rails.
|
7
|
+
#
|
8
|
+
# == Including routes in your plugin
|
9
|
+
#
|
10
|
+
# The engines plugin makes it possible to include a set of routes within your plugin
|
11
|
+
# very simply, as it turns out. In your plugin, you simply include a <tt>routes.rb</tt>
|
12
|
+
# file like the one below at the root of your plugin:
|
13
|
+
#
|
14
|
+
# connect "/login", :controller => "my_plugin/account", :action => "login"
|
15
|
+
#
|
16
|
+
# # add a named route
|
17
|
+
# logout "/logout", :controller => "my_plugin/account", :action => "logout"
|
18
|
+
#
|
19
|
+
# # some restful stuff
|
20
|
+
# resources :things do |t|
|
21
|
+
# t.resources :other_things
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# Everywhere in a normal <tt>RAILS_ROOT/config/routes.rb</tt> file
|
25
|
+
# where you might have <tt>map.connect</tt>, you just use <tt>connect</tt> in your
|
26
|
+
# plugin's <tt>routes.rb</tt>.
|
27
|
+
#
|
28
|
+
# === Hooking it up in your application
|
29
|
+
#
|
30
|
+
# While it would be possible to have each plugin's routes automagically included into
|
31
|
+
# the application's route set, to do so would actually be a stunningly bad idea. Route
|
32
|
+
# priority is the key issue here. You, the application developer, needs to be in complete
|
33
|
+
# control when it comes to specifying the priority of routes in your application, since
|
34
|
+
# the ordering of your routes directly affects how Rails will interpret incoming requests.
|
35
|
+
#
|
36
|
+
# To add plugin routes into your application's <tt>routes.rb</tt> file, you need to explicitly
|
37
|
+
# map them in using the Engines::RailsExtensions::Routing#from_plugin method:
|
38
|
+
#
|
39
|
+
# ApplicationController::Routing::Routes.draw do |map|
|
40
|
+
#
|
41
|
+
# map.connect "/app_stuff", :controller => "application_thing" # etc...
|
42
|
+
#
|
43
|
+
# # This line includes the routes from the given plugin at this point, giving you
|
44
|
+
# # control over the priority of your application routes
|
45
|
+
# map.from_plugin :your_plugin
|
46
|
+
#
|
47
|
+
# map.connect ":controller/:action/:id"
|
48
|
+
# end
|
49
|
+
#
|
50
|
+
# By including routes in plugins which have controllers, you can now share in a simple way
|
51
|
+
# a compact and elegant URL scheme which corresponds to those controllers.
|
52
|
+
#
|
53
|
+
# ---
|
54
|
+
#
|
55
|
+
# The Engines::RailsExtensions::Routing module defines extensions to Rails'
|
56
|
+
# routing (ActionController::Routing) mechanism such that routes can be loaded
|
57
|
+
# from a given plugin.
|
58
|
+
#
|
59
|
+
# The key method is Engines::RailsExtensions::Routing#from_plugin, which can be called
|
60
|
+
# within your application's <tt>config/routes.rb</tt> file to load plugin routes at that point.
|
61
|
+
#
|
62
|
+
module Engines::RailsExtensions::Routing
|
63
|
+
# Loads the set of routes from within a plugin and evaluates them at this
|
64
|
+
# point within an application's main <tt>routes.rb</tt> file.
|
65
|
+
#
|
66
|
+
# Plugin routes are loaded from <tt><plugin_root>/routes.rb</tt>.
|
67
|
+
def from_plugin(name)
|
68
|
+
map = self # to make 'map' available within the plugin route file
|
69
|
+
routes_path = Engines.plugins[name].routes_path
|
70
|
+
Engines.logger.debug "loading routes from #{routes_path}"
|
71
|
+
eval(IO.read(routes_path), binding, routes_path) if File.file?(routes_path)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
module ::ActionController #:nodoc:
|
77
|
+
module Routing #:nodoc:
|
78
|
+
class RouteSet #:nodoc:
|
79
|
+
class Mapper #:nodoc:
|
80
|
+
include Engines::RailsExtensions::Routing
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# Contains the enhancements to assist in testing plugins. See Engines::Testing
|
2
|
+
# for more details.
|
3
|
+
|
4
|
+
require 'test/unit'
|
5
|
+
|
6
|
+
require 'tmpdir'
|
7
|
+
require 'fileutils'
|
8
|
+
|
9
|
+
# In most cases, Rails' own plugin testing mechanisms are sufficient. However, there
|
10
|
+
# are cases where plugins can be given a helping hand in the testing arena. This module
|
11
|
+
# contains some methods to assist when testing plugins that contain fixtures.
|
12
|
+
#
|
13
|
+
# == Fixtures and plugins
|
14
|
+
#
|
15
|
+
# Since Rails' own fixtures method is fairly strict about where files can be loaded from,
|
16
|
+
# the simplest approach when running plugin tests with fixtures is to simply copy all
|
17
|
+
# fixtures into a single temporary location and inform the standard Rails mechanism to
|
18
|
+
# use this directory, rather than RAILS_ROOT/test/fixtures.
|
19
|
+
#
|
20
|
+
# The Engines::Testing#setup_plugin_fixtures method does this, copying all plugin fixtures
|
21
|
+
# into the temporary location before and tests are performed. This behaviour is invoked
|
22
|
+
# the the rake tasks provided by the Engines plugin, in the "test:plugins" namespace. If
|
23
|
+
# necessary, you can invoke the task manually.
|
24
|
+
#
|
25
|
+
# If you wish to take advantage of this, add a call to the Engines::Testing.set_fixture_path
|
26
|
+
# method somewhere before your tests (in a test_helper file, or above the TestCase itself).
|
27
|
+
#
|
28
|
+
# = Testing plugins
|
29
|
+
#
|
30
|
+
# Normally testing a plugin will require that Rails is loaded, unless you are including
|
31
|
+
# a skeleton Rails environment or set of mocks within your plugin tests. If you require
|
32
|
+
# the Rails environment to be started, you must ensure that this actually happens; while
|
33
|
+
# it's not obvious, your tests do not automatically run with Rails loaded.
|
34
|
+
#
|
35
|
+
# The simplest way to setup plugin tests is to include a test helper with the following
|
36
|
+
# contents:
|
37
|
+
#
|
38
|
+
# # Load the normal Rails helper. This ensures the environment is loaded
|
39
|
+
# require File.expand_path(File.dirname(__FILE__) + '/../../../../test/test_helper')
|
40
|
+
# # Ensure that we are using the temporary fixture path
|
41
|
+
# Engines::Testing.set_fixture_path
|
42
|
+
#
|
43
|
+
# Then run tests using the provided tasks (<tt>test:plugins</tt>, or the tasks that the engines
|
44
|
+
# plugin provides - <tt>test:plugins:units</tt>, etc.).
|
45
|
+
#
|
46
|
+
# Alternatively, you can explicitly load the environment by adpating the contents of the
|
47
|
+
# default <tt>test_helper</tt>:
|
48
|
+
#
|
49
|
+
# ENV["RAILS_ENV"] = "test"
|
50
|
+
# # Note that we are requiring config/environment from the root of the enclosing application.
|
51
|
+
# require File.expand_path(File.dirname(__FILE__) + "/../../../../config/environment")
|
52
|
+
# require 'test_help'
|
53
|
+
#
|
54
|
+
module Engines::Testing
|
55
|
+
mattr_accessor :temporary_fixtures_directory
|
56
|
+
self.temporary_fixtures_directory = FileUtils.mkdir_p(File.join(Dir.tmpdir, "rails_fixtures"))
|
57
|
+
|
58
|
+
# Copies fixtures from plugins and the application into a temporary directory
|
59
|
+
# (Engines::Testing.temporary_fixtures_directory).
|
60
|
+
#
|
61
|
+
# If a set of plugins is not given, fixtures are copied from all plugins in order
|
62
|
+
# of precedence, meaning that plugins can 'overwrite' the fixtures of others if they are
|
63
|
+
# loaded later; the application's fixtures are copied last, allowing any custom fixtures
|
64
|
+
# to override those in the plugins. If no argument is given, plugins are loaded via
|
65
|
+
# PluginList#by_precedence.
|
66
|
+
#
|
67
|
+
# This method is called by the engines-supplied plugin testing rake tasks
|
68
|
+
def self.setup_plugin_fixtures(plugins = Engines.plugins.by_precedence)
|
69
|
+
|
70
|
+
# Copy all plugin fixtures, and then the application fixtures, into this directory
|
71
|
+
plugins.each do |plugin|
|
72
|
+
plugin_fixtures_directory = File.join(plugin.directory, "test", "fixtures")
|
73
|
+
if File.directory?(plugin_fixtures_directory)
|
74
|
+
Engines.mirror_files_from(plugin_fixtures_directory, self.temporary_fixtures_directory)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
Engines.mirror_files_from(File.join(RAILS_ROOT, "test", "fixtures"),
|
78
|
+
self.temporary_fixtures_directory)
|
79
|
+
end
|
80
|
+
|
81
|
+
# Sets the fixture path used by Test::Unit::TestCase to the temporary
|
82
|
+
# directory which contains all plugin fixtures.
|
83
|
+
def self.set_fixture_path
|
84
|
+
Test::Unit::TestCase.fixture_path = self.temporary_fixtures_directory
|
85
|
+
$LOAD_PATH.unshift self.temporary_fixtures_directory
|
86
|
+
end
|
87
|
+
end
|