Class: Kitchen::Binding::PryRemote
- Defined in:
- lib/kitchen/binding/pry_remote.rb
Overview
pry-remote binding
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#connect_command ⇒ Object
Returns the command that will log into a remote interactive ruby shell.
-
#install_command ⇒ String
Returns the command that will install the remote interactive ruby shell.
Methods inherited from Base
#initialize, #name, #sudo, #test_connection
Constructor Details
This class inherits a constructor from Kitchen::Binding::Base
Instance Method Details
#connect_command ⇒ Object
Returns the command that will log into a remote interactive ruby shell.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/kitchen/binding/pry_remote.rb', line 41 def connect_command info("Connecting to remote binding") require 'pry-remote' ::Pry.config.input = STDIN ::Pry.config.output = STDOUT argv = ['--server', hostname, '--port', port.to_s] client = ::PryRemote::CLI.new argv client.run end |
#install_command ⇒ String
Returns the command that will install the remote interactive ruby shell.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/kitchen/binding/pry_remote.rb', line 29 def install_command " if [[ $(/opt/chef/embedded/bin/gem list | grep -c pry-remote) -eq 0 ]]; then\n echo \"-----> Installing Binding (pry-remote)\"\n \#{sudo(install_string)}\n else\n echo \"-----> Binding (pry-remote) installation detected\"\n fi\n INSTALL\nend\n".gsub(/^ {10}/, "") |