Sha256: 05c6236f0fab18b457dfb7f448293b76fb5ac8acc1e4dd1c3ffe5dec855576f0

Contents?: true

Size: 594 Bytes

Versions: 11

Compression:

Stored size: 594 Bytes

Contents

# copy the assets from extensions public dir into #{RAILS_ROOT}/public
destination = "#{RAILS_ROOT}/public"
paths_to_mirror = Spree::ExtensionLoader.instance.load_extension_roots

paths_to_mirror.each do |extension_path|
  source = "#{extension_path}/public"
  if File.directory?(source)
    begin
      RAILS_DEFAULT_LOGGER.info "INFO: Mirroring assets from #{source} to #{destination}"
      Spree::FileUtilz.mirror_files(source, destination)
    rescue LoadError, NameError => e
      $stderr.puts "Could not copy extension assets from : #{source}.\n#{e.inspect}"
      nil
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
spree-0.11.0 lib/plugins/extension_patches/lib/asset_copy.rb
spree-0.10.2 lib/plugins/extension_patches/lib/asset_copy.rb
spree-0.10.1 lib/plugins/extension_patches/lib/asset_copy.rb
spree-0.10.0 lib/plugins/extension_patches/lib/asset_copy.rb
spree-0.10.0.beta lib/plugins/extension_patches/lib/asset_copy.rb
spree-enriquez-0.9.4 lib/plugins/extension_patches/lib/asset_copy.rb
spree-0.9.4 lib/plugins/extension_patches/lib/asset_copy.rb
spree-0.9.3 lib/plugins/extension_patches/lib/asset_copy.rb
spree-0.9.2 lib/plugins/extension_patches/lib/asset_copy.rb
spree-0.9.1 lib/plugins/extension_patches/lib/asset_copy.rb
spree-0.9.0 lib/plugins/extension_patches/lib/asset_copy.rb