Sha256: ab4b0ed071267ed31f117351b87d41818aca2e74ff8bce6f2f80e7aa58349d00

Contents?: true

Size: 386 Bytes

Versions: 4

Compression:

Stored size: 386 Bytes

Contents

module StatusCat
  module Checkers
    class S3 < Base

      def initialize
        return if gem_missing?('aws-sdk', 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

4 entries across 4 versions & 1 rubygems

Version Path
status_cat-5.2.0 lib/status_cat/checkers/s3.rb
status_cat-5.0.2 lib/status_cat/checkers/s3.rb
status_cat-5.0.1 lib/status_cat/checkers/s3.rb
status_cat-5.0.0 lib/status_cat/checkers/s3.rb