Sha256: ad6ae36fbbfe2e6b577296743b5311198732aa4ed119cd2908f0954333b4c95d

Contents?: true

Size: 521 Bytes

Versions: 7

Compression:

Stored size: 521 Bytes

Contents

# coding: UTF-8

module Cocaine
  class CommandLine
    class FakeRunner
      def self.supported?
        false
      end

      def supported?
        self.class.supported?
      end

      attr_reader :commands

      def initialize
        @commands = []
      end

      def call(command, env = {}, options = {})
        commands << [command, env]
        ""
      end

      def ran?(predicate_command)
        @commands.any?{|(command, env)| command =~ Regexp.new(predicate_command) }
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/cocaine-0.5.7/lib/cocaine/command_line/runners/fake_runner.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/cocaine-0.5.7/lib/cocaine/command_line/runners/fake_runner.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/cocaine-0.5.7/lib/cocaine/command_line/runners/fake_runner.rb
cocaine-0.5.7 lib/cocaine/command_line/runners/fake_runner.rb
cocaine-0.5.6 lib/cocaine/command_line/runners/fake_runner.rb
cocaine-0.5.5 lib/cocaine/command_line/runners/fake_runner.rb
cocaine-0.5.4 lib/cocaine/command_line/runners/fake_runner.rb