lib/s3_secure/summary/items.rb in s3-secure-0.5.1 vs lib/s3_secure/summary/items.rb in s3-secure-0.6.0

- old
+ new

@@ -1,7 +1,7 @@ -class S3Secure::Summary - class Items < S3Secure::AbstractBase +module S3Secure::Summary + class Items < S3Secure::CLI::Base extend Memoist # override initialize def initialize(options, buckets) @options, @buckets = options, buckets @@ -42,23 +42,22 @@ end memoize :load_items! private def ssl?(bucket) - list = S3Secure::Policy::List.new(@options) + show = S3Secure::Policy::Show.new(@options.merge(bucket: bucket)) - bucket_policy = list.get_policy(bucket) + bucket_policy = show.run document = S3Secure::Policy::Document.new(bucket, bucket_policy) document.has?("ForceSSLOnlyAccess") end memoize :ssl? def encrypted?(bucket) s3 = s3_regional_client(bucket) - list = S3Secure::Encryption::List.new(@options) - list.set_s3(s3) + show = S3Secure::Encryption::Show.new(@options.merge(bucket: bucket)) - rules = list.get_encryption_rules(bucket) + rules = show.run !!rules end memoize :encrypted? end end