Sha256: c4d88dd68f58a1f7685e2a2c3f30617eab44c788295df94bc6184825f54c4b21

Contents?: true

Size: 1.13 KB

Versions: 11

Compression:

Stored size: 1.13 KB

Contents

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(FlatRateShippingExtension.root, "db", 'sample', '*.{yml,csv}')).each do |fixture_file|
      Fixtures.create_fixtures("#{FlatRateShippingExtension.root}/db/sample", File.basename(fixture_file, '.*'))
    end

  end
end

namespace :spree do
  namespace :extensions do
    namespace :flat_rate_shipping do
      desc "Copies public assets of the Flat Rate Shipping to the instance public/ directory."
      task :update => :environment do
        is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
        Dir[FlatRateShippingExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
          path = file.sub(FlatRateShippingExtension.root, '')
          directory = File.dirname(path)
          puts "Copying #{path}..."
          mkdir_p RAILS_ROOT + directory
          cp file, RAILS_ROOT + path
        end
      end  
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
spree-0.8.4 vendor/extensions/flat_rate_shipping/lib/tasks/flat_rate_shipping_extension_tasks.rake
spree-0.8.5 vendor/extensions/flat_rate_shipping/lib/tasks/flat_rate_shipping_extension_tasks.rake
spree-0.5.0 vendor/extensions/flat_rate_shipping/lib/tasks/flat_rate_shipping_extension_tasks.rake
spree-0.5.1 vendor/extensions/flat_rate_shipping/lib/tasks/flat_rate_shipping_extension_tasks.rake
spree-0.6.0 vendor/extensions/flat_rate_shipping/lib/tasks/flat_rate_shipping_extension_tasks.rake
spree-0.7.1 vendor/extensions/flat_rate_shipping/lib/tasks/flat_rate_shipping_extension_tasks.rake
spree-0.7.0 vendor/extensions/flat_rate_shipping/lib/tasks/flat_rate_shipping_extension_tasks.rake
spree-0.8.0 vendor/extensions/flat_rate_shipping/lib/tasks/flat_rate_shipping_extension_tasks.rake
spree-0.8.1 vendor/extensions/flat_rate_shipping/lib/tasks/flat_rate_shipping_extension_tasks.rake
spree-0.8.2 vendor/extensions/flat_rate_shipping/lib/tasks/flat_rate_shipping_extension_tasks.rake
spree-0.8.3 vendor/extensions/flat_rate_shipping/lib/tasks/flat_rate_shipping_extension_tasks.rake