Sha256: 19119f4cda48e3f4587454ea3b61d8d846f27a863a8f1ead2ec50bfa8de40cee

Contents?: true

Size: 389 Bytes

Versions: 1

Compression:

Stored size: 389 Bytes

Contents

module StatusCat
  module Checkers
    class S3 < Base

      def initialize
        return if gem_missing?('aws-sdk-s3', defined?(::Aws))

        @value = Aws.config[:credentials].access_key_id
        @status = fail_on_exception { test }
      end

      def test
        s3 = Aws::S3::Resource.new
        return s3.buckets.count.zero? ? 'no buckets' : nil
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
status_cat-5.2.1 lib/status_cat/checkers/s3.rb