<commit_before>require "pathname"

require "vagrant/action/builder"

module VagrantPlugins
  module AWS
    module Action
      # Include the built-in modules so we can use them as top-level things.
      include Vagrant::Action::Builtin

      # This action is called to terminate the remote machine.
      def self.action_destroy
        Vagrant::Action::Builder.new.tap do |b|
          b.use ConfigValidate
          b.use ConnectAWS
          b.use TerminateInstance
        end
      end

      # This action is called when `vagrant provision` is called.
      def self.action_provision
        Vagrant::Action::Builder.new.tap do |b|
          b.use ConfigValidate
          b.use Call, IsCreated do |env, b2|<commit_msg>Prompt user for confirmation when terminating an instance.<commit_after>require "pathname"

require "vagrant/action/builder"

module VagrantPlugins
  module AWS
    module Action
      # Include the built-in modules so we can use them as top-level things.
      include Vagrant::Action::Builtin

      # This action is called to terminate the remote machine.
      def self.action_destroy
        Vagrant::Action::Builder.new.tap do |b|
          b.use Call, DestroyConfirm do |env, b2|
            if env2[:result]
              b2.use ConfigValidate
              b2.use ConnectAWS
              b2.use TerminateInstance
            else
              b2.use MessageWillNotDestro
            end
          end
        end
      end

      # This action is called when `vagrant provision` is called.
      def self.action_provision
        Vagrant::Action::Builder.new.tap do |b|
          b.use ConfigValidate
          b.use Call, IsCreated do |env, b2|
{'fraction_non_alphanumeric': 0.06532066508313539, 'fraction_numerical': 0.004750593824228029, 'mean_word_length': 2.155430711610487, 'pattern_counts': {'":': 0, '<': 3, '<?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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '631066', 'n_tokens_mistral': 480, 'n_tokens_neox': 469, 'n_words': 155}