Sha256: 879415779d73bba6ce28af5ead12cde078d02926338988ddbcba5f3559b9d43c

Contents?: true

Size: 625 Bytes

Versions: 4

Compression:

Stored size: 625 Bytes

Contents

namespace :spree do
  namespace :extensions do
    namespace :api do
      desc "Copies public assets of the Api to the instance public/ directory."
      task :update => :environment do
        is_svn_git_or_dir = proc {|path| path =~ /\.svn/ || path =~ /\.git/ || File.directory?(path) }
        Dir[ApiExtension.root + "/public/**/*"].reject(&is_svn_git_or_dir).each do |file|
          path = file.sub(ApiExtension.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

4 entries across 4 versions & 1 rubygems

Version Path
spree-0.11.4 vendor/extensions/api/lib/tasks/api_extension_tasks.rake
spree-0.11.3 vendor/extensions/api/lib/tasks/api_extension_tasks.rake
spree-0.11.2 vendor/extensions/api/lib/tasks/api_extension_tasks.rake
spree-0.11.1 vendor/extensions/api/lib/tasks/api_extension_tasks.rake