Sha256: 26d23e66888c945a8796d91f81ad66ad766a28e74a9cf9062aa267943658f2f5

Contents?: true

Size: 474 Bytes

Versions: 7

Compression:

Stored size: 474 Bytes

Contents

module CommandHelper
  def run_command(command)
    say "\n#{command.yellow}"
    system command
  end

  def open_path(path)
    system_command = case RbConfig::CONFIG['host_os']
                     when /mswin|mingw|cygwin/
                       'start'
                     when /darwin/
                       'open'
                     when /linux|bsd/
                       'xdg-open'
                     end
    run_command "#{system_command} #{path}"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
renuo-cli-3.1.7 lib/renuo/cli/app/command_helper.rb
renuo-cli-3.1.6 lib/renuo/cli/app/command_helper.rb
renuo-cli-3.1.5 lib/renuo/cli/app/command_helper.rb
renuo-cli-3.1.4 lib/renuo/cli/app/command_helper.rb
renuo-cli-3.1.3 lib/renuo/cli/app/command_helper.rb
renuo-cli-3.1.2 lib/renuo/cli/app/command_helper.rb
renuo-cli-3.1.1 lib/renuo/cli/app/command_helper.rb