<commit_before>require 'itamae/plugin/resource/mail_alias/version'
require 'itamae'

module Itamae
  module Plugin
    module Resource
      class MailAlias < Itamae::Resource::Base
        define_attribute :action, default: :create
        define_attribute :mail_alias, type: String, default_name: true
        define_attribute :recipient, type: String, required: true

        def action_create(options)
          if !run_specinfra(:check_mail_alias_is_aliased_to, mail_alias, recipient)
            run_specinfra(:add_mail_alias, mail_alias, recipient)
          end
        end
      end
    end
  end
end<commit_msg>Fix according to recent change of itamae<commit_after>require 'itamae/plugin/resource/mail_alias/version'
require 'itamae'

module Itamae
  module Plugin
    module Resource
      class MailAlias < Itamae::Resource::Base
        define_attribute :action, default: :create
        define_attribute :mail_alias, type: String, default_name: true
        define_attribute :recipient, type: String, required: true

        def action_create(options)
          if !run_specinfra(:check_mail_alias_is_aliased_to, attributes.mail_alias, attributes.recipient)
            run_specinfra(:add_mail_alias, mail_alias, attributes.recipient)
          end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.06835637480798772, 'fraction_numerical': 0.0, 'mean_word_length': 3.314569536423841, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4215825', 'n_tokens_mistral': 385, 'n_tokens_neox': 372, 'n_words': 93}