Sha256: 78e20e22484f003e6776cb1cc231ab4f89268759c48c8b65f1b3cd8db198ac29

Contents?: true

Size: 597 Bytes

Versions: 13

Compression:

Stored size: 597 Bytes

Contents

# == ShellManager::WhichWindows
#
# A ShellManager driver providing access to +which+ command by faking it on
# Windows systems.
class ::AutomateIt::ShellManager::WhichWindows < ::AutomateIt::ShellManager::WhichBase
  WHICH_HELPER = File.join(::AutomateIt::Constants::HELPERS_DIR, "which.cmd")

  # FIXME how to detect windows through Java?
  depends_on :callbacks => lambda { RUBY_PLATFORM =~ /mswin/i }

  # Inherits WhichBase#suitability

  # See ShellManager#which
  def which(command)
    _which_helper do
      data = `#{WHICH_HELPER} #{command} 2>&1`
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
automate-it-0.9.2 lib/automateit/shell_manager/which_windows.rb
automate-it-0.9.1 lib/automateit/shell_manager/which_windows.rb
automate-it-0.9.0 lib/automateit/shell_manager/which_windows.rb
automateit-0.71221 lib/automateit/shell_manager/which_windows.rb
automateit-0.71112 lib/automateit/shell_manager/which_windows.rb
automateit-0.71219 lib/automateit/shell_manager/which_windows.rb
automateit-0.71220 lib/automateit/shell_manager/which_windows.rb
automateit-0.71111 lib/automateit/shell_manager/which_windows.rb
automateit-0.71226.1 lib/automateit/shell_manager/which_windows.rb
automateit-0.71226 lib/automateit/shell_manager/which_windows.rb
automateit-0.80116 lib/automateit/shell_manager/which_windows.rb
automateit-0.71230 lib/automateit/shell_manager/which_windows.rb
automateit-0.80624 lib/automateit/shell_manager/which_windows.rb