Sha256: c929678678ca94bbb82954300da1c6eadffd496ad07b686b61a0e079de97c0df

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

require 'tempfile'
require 'shellwords'
require 'pstore'
require 'aruba-doubles/double'
require 'aruba-doubles/history'

module ArubaDoubles

  # Basename of the history file
  HISTORY_FILE = 'history.pstore'

  def double_cmd(cmd, output = {})
    argv = cmd.shellsplit
    filename = argv.shift
    double = Double.find(filename) || Double.new(filename)
    double.create { on argv, output }
  end

  def history
    @history ||= History.new(File.join(Double.bindir, HISTORY_FILE))
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aruba-doubles-1.2.1 lib/aruba-doubles.rb
aruba-doubles-1.2.0 lib/aruba-doubles.rb