<commit_before># Community maintainers:
#
#   <NAME> <code dawg eu, @MartinNowak>
#
module Travis
  module Build
    class Script
      class D < Script
        DEFAULTS = {
          d: 'dmd'
        }.freeze

        def cache_slug
          super << '--d-' << config[:d]
        end

        def setup
          super

          sh.echo 'D support for Travis-CI is community maintained.', ansi: :green
          sh.echo 'Please make sure to ping @MartinNowak, @klickverbot and @ibuclaw '\
            'when filing issues under https://github.com/travis-ci/travis-ci/issues.', ansi: :green

          sh.fold 'compiler-download' do
            sh.echo 'Installing compiler and dub', ansi: :yellow

            sh.cmd 'CURL_USER_AGENT="Travis-CI $(curl --version | head -n 1)"'
            sh.cmd 'for i in {0..4}; do curl -fsS -A "$CURL_USER_AGENT" --max-time 5 https://dlang.org/install.sh -O && break || [ $i -ge 4 ] || sleep $((1 << $i)); done'
            sh.cmd "source \"$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash install.sh #{config[:d]} --activate)\""
          end
        end

        def announce
          super
          if config[:d].start_with?('dmd-') && config[:d] <= 'dmd-2.066.1'
            sh.cmd 'dmd --help | head -n 2'
          else<commit_msg>[D] Use GitHub as fallback if dlang.org is offline<commit_after># Community maintainers:
#
#   <NAME> <code dawg eu, @MartinNowak>
#
module Travis
  module Build
    class Script
      class D < Script
        DEFAULTS = {
          d: 'dmd'
        }.freeze

        def cache_slug
          super << '--d-' << config[:d]
        end

        def setup
          super

          sh.echo 'D support for Travis-CI is community maintained.', ansi: :green
          sh.echo 'Please make sure to ping @MartinNowak, @klickverbot and @ibuclaw '\
            'when filing issues under https://github.com/travis-ci/travis-ci/issues.', ansi: :green

          sh.fold 'compiler-download' do
            sh.echo 'Installing compiler and dub', ansi: :yellow

            sh.cmd 'CURL_USER_AGENT="Travis-CI $(curl --version | head -n 1)"'
            sh.cmd 'for i in {0..4}; do curl -fsS -A "$CURL_USER_AGENT" --max-time 5 https://dlang.org/install.sh -O && break || [ $i -ge 4 ] || sleep $((1 << $i)); done'
            sh.cmd '[[ ! -f install.sh ]] && for i in {0..4}; do curl -fsS -A "$CURL_USER_AGENT" --max-time 5 https://raw.githubusercontent.com/dlang/installer/master/script/install.sh -O && break || [ $i -ge 4 ] || sleep $((1 << $i)); done'
            sh.cmd "source \"$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash install.sh #{config[:d]} --activate)\""
          end
        end

        def announce
          super
          if config[:d].start_with?('dmd-') && config[:d] <= 'dmd-2.066.1'
            sh.cmd 'dmd --help | head -n 2'
          else
{'fraction_non_alphanumeric': 0.15196599362380447, 'fraction_numerical': 0.010272759475735034, 'mean_word_length': 1.929460580912863, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 7, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2461449', 'n_tokens_mistral': 968, 'n_tokens_neox': 926, 'n_words': 269}