Sha256: debefba2f973e23f357f30f52af6ea3ab15d34a08e16af822df57a80dbc8821e

Contents?: true

Size: 488 Bytes

Versions: 6

Compression:

Stored size: 488 Bytes

Contents

module RemoteCommandHelpers

  def test_dir_exists(path)
    exists?('d', path)
  end

  def test_symlink_exists(path)
    exists?('L', path)
  end

  def test_file_exists(path)
    exists?('f', path)
  end

  def exists?(type, path)
    %{[ -#{type} "#{path}" ] && echo "#{path} exists." || echo "Error: #{path} does not exist."}
  end

  def safely_remove_file(path)
    run_vagrant_command("rm #{test_file}") rescue Vagrant::Errors::VagrantError
  end
end

World(RemoteCommandHelpers)

Version data entries

6 entries across 4 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/capistrano-3.2.1/features/support/remote_command_helpers.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/capistrano-3.2.1/features/support/remote_command_helpers.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/capistrano-3.2.1/features/support/remote_command_helpers.rb
capistrano-3.2.1 features/support/remote_command_helpers.rb
capistrano-3.2.0 features/support/remote_command_helpers.rb
capistrano-3.1.0 features/support/remote_command_helpers.rb