Sha256: f990bdeea366aca4bfd51309a83b17e9042824efd6f987644816f7dd091e387d

Contents?: true

Size: 553 Bytes

Versions: 11

Compression:

Stored size: 553 Bytes

Contents

# frozen_string_literal: true

require 'bolt/task'

module Bolt
  class Task
    class Remote < Task
      def self.from_task(task)
        new(task.name, task.file, task.files, task.metadata)
      end

      def implementations
        metadata['implementations']&.select { |i| i['remote'] || metadata['remote'] }
      end

      def select_implementation(target, *args)
        unless implementations || metadata['remote']
          raise NoImplementationError.new(target, self)
        end

        super(target, *args)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bolt-1.14.0 lib/bolt/task/remote.rb
bolt-1.13.1 lib/bolt/task/remote.rb
bolt-1.13.0 lib/bolt/task/remote.rb
bolt-1.12.0 lib/bolt/task/remote.rb
bolt-1.11.0 lib/bolt/task/remote.rb
bolt-1.10.0 lib/bolt/task/remote.rb
bolt-1.9.0 lib/bolt/task/remote.rb
bolt-1.8.1 lib/bolt/task/remote.rb
bolt-1.8.0 lib/bolt/task/remote.rb
bolt-1.7.0 lib/bolt/task/remote.rb
bolt-1.6.0 lib/bolt/task/remote.rb