lib/generators/extension/templates/tasks.rake in spree-0.4.1 vs lib/generators/extension/templates/tasks.rake in spree-0.5.0

- old
+ new

@@ -1,4 +1,16 @@ +namespace :db do + desc "Bootstrap your database for Spree." + task :bootstrap => :environment do + # load initial database fixtures (in db/sample/*.yml) into the current environment's database + ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym) + Dir.glob(File.join(<%= class_name %>.root, "db", 'sample', '*.{yml,csv}')).each do |fixture_file| + Fixtures.create_fixtures("#{<%= class_name %>.root}/db/sample", File.basename(fixture_file, '.*')) + end + + end +end + namespace :spree do namespace :extensions do namespace :<%= file_name %> do desc "Copies public assets of the <%= extension_name %> to the instance public/ directory." task :update => :environment do \ No newline at end of file