<commit_before>module Capistrano
  module Itamae
    module DSL
      require "bundler"

      # Run `itamae ssh`
      # @param recipe_files [String, Array<String>]
      # @param options [Array] itamae ssh options (default is itamae_ssh_default_options)
      def itamae_ssh(recipe_files, *options)
        recipe_files = Array(recipe_files) unless recipe_files.is_a?(Array)
        recipe_paths = recipe_files.map { |file| itamae_cookbooks_path.join(file) }

        itamae_options =
          if options.empty?
            itamae_ssh_default_options
          else
            options
          end

        # NOTE: store server (`host` is changed to localhost in `run_locally`)
        server = host

        run_locally do
          Bundler.with_clean_env do
            execute *generate_itamae_ssh_command(server, recipe_paths, itamae_options)
          end
        end
      end

      private

      def generate_itamae_ssh_command(server, recipe_paths, itamae_options)
        command = [:bundle, :exec, itamae_bin_name, :ssh]

        command += recipe_paths
        command += itamae_options unless itamae_options.empty?<commit_msg>:golf:<commit_after>module Capistrano
  module Itamae
    module DSL
      require "bundler"

      # Run `itamae ssh`
      # @param recipe_files [String, Array<String>]
      # @param options [Array] itamae ssh options (default is itamae_ssh_default_options)
      def itamae_ssh(recipe_files, *options)
        recipe_paths = Array(recipe_files).map { |file| itamae_cookbooks_path.join(file) }

        itamae_options =
          if options.empty?
            itamae_ssh_default_options
          else
            options
          end

        # NOTE: store server (`host` is changed to localhost in `run_locally`)
        server = host

        run_locally do
          Bundler.with_clean_env do
            execute *generate_itamae_ssh_command(server, recipe_paths, itamae_options)
          end
        end
      end

      private

      def generate_itamae_ssh_command(server, recipe_paths, itamae_options)
        command = [:bundle, :exec, itamae_bin_name, :ssh]

        command += recipe_paths
        command += itamae_options unless itamae_options.empty?
{'fraction_non_alphanumeric': 0.06910569105691057, 'fraction_numerical': 0.0, 'mean_word_length': 2.4663536776212833, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5910326', 'n_tokens_mistral': 700, 'n_tokens_neox': 667, 'n_words': 157}