Sha256: f69f7ec76c06a62cf6b6cbec72fe067c355e2ce4e15aea071df04212da8b695e

Contents?: true

Size: 653 Bytes

Versions: 10

Compression:

Stored size: 653 Bytes

Contents

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

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

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

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

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

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kuber_kit-1.2.0 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.1.1 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.0.1 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-1.0.0 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-0.9.9 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-0.9.8 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-0.9.7 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-0.9.6 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-0.9.5 lib/kuber_kit/shell/commands/bash_commands.rb
kuber_kit-0.9.4 lib/kuber_kit/shell/commands/bash_commands.rb