Class: StatusCat::Checkers::S3
- Defined in:
- lib/status_cat/checkers/s3.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ S3
constructor
A new instance of S3.
- #test ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ S3
Returns a new instance of S3.
5 6 7 8 9 10 |
# File 'lib/status_cat/checkers/s3.rb', line 5 def initialize return if gem_missing?('aws-sdk-s3', defined?(::Aws)) @value = Aws.config[:credentials].access_key_id @status = fail_on_exception { test } end |
Instance Method Details
#test ⇒ Object
12 13 14 15 |
# File 'lib/status_cat/checkers/s3.rb', line 12 def test s3 = Aws::S3::Resource.new return s3.buckets.count.zero? ? 'no buckets' : nil end |