<commit_before>module Travis
  module Build
    class Script
      module Addons
        class SshKnownHosts
          SUPER_USER_SAFE = true

          def initialize(script, config)
            @script = script
            @config = [*config]
          end

          def before_checkout
            add_ssh_known_hosts
          end

          private

            attr_accessor :script, :config

            def add_ssh_known_hosts
              script.echo "Adding ssh known hosts (BETA)", ansi: :yellow unless config.empty?
              script.fold 'ssh_known_hosts.0' do
                config.each do |host|
                  script.cmd "ssh-keyscan #{host} | tee -a #{Travis::Build::HOME_DIR}/.ssh/known_hosts", assert: false
                  script.cmd "for _ip in $(dig +short #{host}) ; do " \
                             "ssh-keyscan $_ip | tee -a #{Travis::Build::HOME_DIR}/.ssh/known_hosts ; done", assert: false
                end
              end
            end
        end
      end
    end
  end
end<commit_msg>Giving up on doing ssh-keyscan of resolved ip addrs<commit_after>module Travis
  module Build
    class Script
      module Addons
        class SshKnownHosts
          SUPER_USER_SAFE = true

          def initialize(script, config)
            @script = script
            @config = [*config]
          end

          def before_checkout
            add_ssh_known_hosts
          end

          private

            attr_accessor :script, :config

            def add_ssh_known_hosts
              script.echo "Adding ssh known hosts (BETA)", ansi: :yellow unless config.empty?
              script.fold 'ssh_known_hosts.0' do
                config.each do |host|
                  script.cmd "ssh-keyscan -t rsa,dsa -H #{host} 2>&1 | tee -a #{Travis::Build::HOME_DIR}/.ssh/known_hosts", assert: false
                end
              end
            end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07600827300930714, 'fraction_numerical': 0.002068252326783868, 'mean_word_length': 1.4775928297055059, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7582983', 'n_tokens_mistral': 580, 'n_tokens_neox': 525, 'n_words': 151}