lib/heirloom/acl/s3.rb in heirloom-0.2.0 vs lib/heirloom/acl/s3.rb in heirloom-0.3.0.rc1

- old
+ new

@@ -6,17 +6,17 @@ def initialize(args) self.config = args[:config] self.region = args[:region] self.logger = config.logger - self.accounts = config.authorized_aws_accounts end def allow_read_access_from_accounts(args) bucket = args[:bucket] key_name = args[:key_name] key_folder = args[:key_folder] + accounts = args[:accounts] key = "#{key_folder}/#{key_name}.tar.gz" current_acls = s3.get_bucket_acl bucket @@ -36,14 +36,15 @@ private def build_bucket_grants(args) id = args[:id] name = args[:name] + accounts = args[:accounts] a = Array.new # Add each account email as read access - @accounts.each do |g| + accounts.each do |g| a << { 'Grantee' => { 'EmailAddress' => g } , 'Permission' => 'READ' } end