Sha256: bd346ae0fb1f88e1e76fb8c8802869ad49874c018040add62762aa491b50fb77

Contents?: true

Size: 927 Bytes

Versions: 65

Compression:

Stored size: 927 Bytes

Contents

# frozen_string_literal: true

require 'avm/data/package/base_performer'
require 'avm/data/package/build_directory'
require 'eac_ruby_utils/core_ext'
require 'minitar'

module Avm
  module Data
    class Package
      class Load < ::Avm::Data::Package::BasePerformer
        enable_method_class
        enable_speaker
        include ::Avm::Data::Package::BuildDirectory

        attr_reader :source_path

        def initialize(package, source_path, options = {})
          super(package, options)
          @source_path = source_path.to_pathname
        end

        def result
          on_build_directory do
            extract_packages_to_build_directory
            package.load_units_from_directory(build_directory, selected_units)
          end
        end

        def extract_packages_to_build_directory
          ::Minitar.unpack(source_path.to_path, build_directory.to_path)
        end
      end
    end
  end
end

Version data entries

65 entries across 65 versions & 2 rubygems

Version Path
avm-0.94.1 lib/avm/data/package/load.rb
eac_tools-0.98.0 sub/avm/lib/avm/data/package/load.rb
avm-0.94.0 lib/avm/data/package/load.rb
eac_tools-0.94.0 sub/avm/lib/avm/data/package/load.rb
avm-0.93.0 lib/avm/data/package/load.rb
eac_tools-0.92.0 sub/avm/lib/avm/data/package/load.rb
avm-0.92.0 lib/avm/data/package/load.rb
eac_tools-0.91.0 sub/avm/lib/avm/data/package/load.rb
avm-0.90.1 lib/avm/data/package/load.rb
eac_tools-0.87.1 sub/avm/lib/avm/data/package/load.rb
avm-0.90.0 lib/avm/data/package/load.rb
eac_tools-0.87.0 sub/avm/lib/avm/data/package/load.rb
avm-0.89.0 lib/avm/data/package/load.rb
eac_tools-0.86.12 sub/avm/lib/avm/data/package/load.rb
avm-0.88.0 lib/avm/data/package/load.rb
eac_tools-0.86.11 sub/avm/lib/avm/data/package/load.rb
avm-0.87.0 lib/avm/data/package/load.rb
eac_tools-0.86.8 sub/avm/lib/avm/data/package/load.rb
avm-0.86.2 lib/avm/data/package/load.rb
eac_tools-0.86.7 sub/avm/lib/avm/data/package/load.rb