Sha256: 2c51ced293cef7dfe138383b11f2269ad32f6140c04382c1c31672466960a420

Contents?: true

Size: 441 Bytes

Versions: 1

Compression:

Stored size: 441 Bytes

Contents

# frozen_string_literal: true

module Mina
  module Backend
    class Local
      include Configuration::DSL
      attr_reader :commands

      def initialize(commands)
        @commands = commands
      end

      def prepare
        if fetch(:simulate)
          ['#!/usr/bin/env bash', '# Executing the following:', '#', commands, ' '].join("\n")
        else
          Shellwords.escape(commands)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mina-1.2.5 lib/mina/backend/local.rb