Sha256: 160432cf4d128f38889867b803693558fdcab3ceddcb03038d88cb9a5975d37d

Contents?: true

Size: 773 Bytes

Versions: 21

Compression:

Stored size: 773 Bytes

Contents

require 'time'
class KuberKit::Shell::Commands::BashCommands
  def rm(shell, path)
    shell.exec!(%Q{rm "#{path}"}, merge_stderr: true)
  end

  def rm_rf(shell, path)
    shell.exec!(%Q{rm -rf "#{path}"}, merge_stderr: true)
  end

  def cp(shell, source_path, dest_path)
    shell.exec!(%Q{cp "#{source_path}" "#{dest_path}"}, merge_stderr: true)
  end

  def cp_r(shell, source_path, dest_path)
    shell.exec!(%Q{cp -r "#{source_path}" "#{dest_path}"}, merge_stderr: true)
  end

  def mkdir(shell, path)
    shell.exec!(%Q{mkdir "#{path}"}, merge_stderr: true)
  end

  def mkdir_p(shell, path)
    shell.exec!(%Q{mkdir -p "#{path}"}, merge_stderr: true)
  end

  def ctime(shell, path)
    result = shell.exec!(%Q{date -r "#{path}"})
    Time.parse(result)
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
kuber_kit-1.3.8 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.3.7 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.1.8 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.3.6 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.1.7 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.3.5 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.3.4 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.1.6 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.3.3 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.3.2 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.1.5 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.3.1 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.3.0 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.1.4 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.2.7 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.2.6 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.2.5 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.2.4 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.2.2 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.1.2 lib/kuber_kit/shell/commands/bash_commands.rb