Sha256: 0b818d63140f737df5e9f7828fc94a88d76851de8158940732c86a96c7a5d162

Contents?: true

Size: 684 Bytes

Versions: 260

Compression:

Stored size: 684 Bytes

Contents

class Specinfra::Command::Aix::Base::File < Specinfra::Command::Base::File
  class << self
    def check_is_accessible_by_user(file, user, access)
      "su -s sh -c \"test -#{access} #{file}\" #{user}"
    end

    def check_has_mode(file, mode)
      raise NotImplementedError.new('check_has_mode is not implemented in Specinfra::Command::AIX::Base::File')
    end

    def check_is_owned_by(file, owner)
      regexp = "^#{owner}$"
      "ls -al #{escape(file)} | awk '{print $3}' | grep -- #{escape(regexp)}"
    end

    def check_is_grouped(file, group)
      regexp = "^#{group}$"
      "ls -al #{escape(file)} | awk '{print $4}' | grep -- #{escape(regexp)}"
    end
  end
end

Version data entries

260 entries across 260 versions & 3 rubygems

Version Path
specinfra-rb19-2.44.7 lib/specinfra/command/aix/base/file.rb
specinfra-2.60.1 lib/specinfra/command/aix/base/file.rb
specinfra-2.60.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.59.6 lib/specinfra/command/aix/base/file.rb
specinfra-2.59.5 lib/specinfra/command/aix/base/file.rb
specinfra-2.59.4 lib/specinfra/command/aix/base/file.rb
specinfra-2.59.3 lib/specinfra/command/aix/base/file.rb
specinfra-2.59.2 lib/specinfra/command/aix/base/file.rb
specinfra-2.59.1 lib/specinfra/command/aix/base/file.rb
specinfra-2.59.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.58.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.57.5 lib/specinfra/command/aix/base/file.rb
specinfra-2.57.4 lib/specinfra/command/aix/base/file.rb
specinfra-2.57.3 lib/specinfra/command/aix/base/file.rb
specinfra-2.57.2 lib/specinfra/command/aix/base/file.rb
specinfra-2.57.1 lib/specinfra/command/aix/base/file.rb
specinfra-cisco-2.41.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.57.0 lib/specinfra/command/aix/base/file.rb
specinfra-2.56.1 lib/specinfra/command/aix/base/file.rb
specinfra-2.56.0 lib/specinfra/command/aix/base/file.rb