Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 17 additions and 28 deletions.
  1. +0 −28 lib/tasks/file_store_extension_tasks.rake
  2. +17 −0 lib/tasks/install.rake
View
28 lib/tasks/file_store_extension_tasks.rake
@@ -1,28 +0,0 @@
-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(FileStoreExtension.root, "db", 'sample', '*.{yml,csv}')).each do |fixture_file|
- Fixtures.create_fixtures("#{FileStoreExtension.root}/db/sample", File.basename(fixture_file, '.*'))
- end
- end
-end
-
-namespace :spree do
- namespace :extensions do
- namespace :file_store do
- desc "Copies public assets of the File Store to the instance public/ directory."
- task :update => :environment do
- is_svn_git_or_dir = proc {|path| path =~ /\.svn/ || path =~ /\.git/ || File.directory?(path) }
- Dir[FileStoreExtension.root + "/public/**/*"].reject(&is_svn_git_or_dir).each do |file|
- path = file.sub(FileStoreExtension.root, '')
- directory = File.dirname(path)
- puts "Copying #{path}..."
- mkdir_p RAILS_ROOT + directory
- cp file, RAILS_ROOT + path
- end
- end
- end
- end
-end
View
17 lib/tasks/install.rake
@@ -0,0 +1,17 @@
+namespace :spree_file_store do
+ desc "Copies all migrations and assets (NOTE: This will be obsolete with Rails 3.1)"
+ task :install do
+ Rake::Task['spree_file_store:install:migrations'].invoke
+ end
+
+ namespace :install do
+ desc "Copies all migrations (NOTE: This will be obsolete with Rails 3.1)"
+ task :migrations do
+ source = File.join(File.dirname(__FILE__), '..', '..', 'db')
+ destination = File.join(Rails.root, 'db')
+ puts "INFO: Mirroring assets from #{source} to #{destination}"
+ Spree::FileUtilz.mirror_files(source, destination)
+ end
+ end
+
+end

No commit comments for this range

Something went wrong with that request. Please try again.