Sha256: 7bd1390aaeb15826b53e2d77cf6916eb24f88f771b68f1b39d7d9e8f7c49c2fa

Contents?: true

Size: 778 Bytes

Versions: 6

Compression:

Stored size: 778 Bytes

Contents

module IronWorkerNG
  module Feature
    class Base
      def initialize(code)
        @code = code
      end

      def rebase(path)
        File.expand_path(path, @code.base_dir)
      end

      def zip_add(zip, dest, src)
        src = File.expand_path(src)

        unless File.exists?(src)
          IronCore::Logger.error 'IronWorkerNG', "Can't find src with path='#{src}'"
          raise IronCore::IronError.new("Can't find src with path='#{src}'")
        end

        if File.directory?(src)
          Dir.glob(src + '/**/**') do |path|
            zip.add(dest + path[src.length .. -1], path)
          end
        else
          zip.add(dest, src)
        end
      end

      def hash_string
        ''
      end

      def bundle(zip)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
iron_worker_ng-0.6.8 lib/iron_worker_ng/feature/base.rb
iron_worker_ng-0.6.7 lib/iron_worker_ng/feature/base.rb
iron_worker_ng-0.6.6 lib/iron_worker_ng/feature/base.rb
iron_worker_ng-0.6.5 lib/iron_worker_ng/feature/base.rb
iron_worker_ng-0.6.4 lib/iron_worker_ng/feature/base.rb
iron_worker_ng-0.6.3 lib/iron_worker_ng/feature/base.rb