<commit_before>module Travis
  module Build
    class Script
      class Dart < Script
        DEFAULTS = {
          :dart => 'stable'
        }

        def export
          super

          sh.export 'TRAVIS_DART_VERSION', config[:dart], echo: false
        end

        def setup
          super

          sh.echo 'Dart for Travis-CI is not officially supported, ' \
            'but is community maintained.', ansi: :green
          sh.echo 'Please file any issues using the following link',
            ansi: :green
          sh.echo '  https://github.com/travis-ci/travis-ci/issues' \
            '/new?labels=community:dart', ansi: :green
          sh.echo 'and mention \`@a14n\`, \`@devoncarew\` and \`@sethladd\`' \
            ' in the issue', ansi: :green

          sh.fold 'Dart install' do
            sh.echo 'Installing Dart', ansi: :yellow
            sh.cmd "curl #{archive_url}/sdk/dartsdk-linux-x64-release.zip > dartsdk.zip"
            sh.cmd "unzip dartsdk.zip > /dev/null"
            sh.cmd "rm dartsdk.zip"
            sh.cmd 'export DART_SDK="${PWD%/}/dart-sdk"'
            sh.cmd 'export PATH="$DART_SDK/bin:$PATH"'
          end

          sh.fold 'Test Runner install' do
            sh.echo 'Installing Test Runner', ansi: :yellow
            sh.cmd "pub global activate test_runner"
          end
        end

        def announce
          super

          sh.cmd 'dart --version'
          sh.echo ''
        end

        def install
          sh.if '-f pubspec.yaml' do
            sh.cmd "pub get"
          end
        end<commit_msg>Add pub cache bin dir to PATH<commit_after>module Travis
  module Build
    class Script
      class Dart < Script
        DEFAULTS = {
          :dart => 'stable'
        }

        def export
          super

          sh.export 'TRAVIS_DART_VERSION', config[:dart], echo: false
        end

        def setup
          super

          sh.echo 'Dart for Travis-CI is not officially supported, ' \
            'but is community maintained.', ansi: :green
          sh.echo 'Please file any issues using the following link',
            ansi: :green
          sh.echo '  https://github.com/travis-ci/travis-ci/issues' \
            '/new?labels=community:dart', ansi: :green
          sh.echo 'and mention \`@a14n\`, \`@devoncarew\` and \`@sethladd\`' \
            ' in the issue', ansi: :green

          sh.fold 'Dart install' do
            sh.echo 'Installing Dart', ansi: :yellow
            sh.cmd "curl #{archive_url}/sdk/dartsdk-linux-x64-release.zip > dartsdk.zip"
            sh.cmd "unzip dartsdk.zip > /dev/null"
            sh.cmd "rm dartsdk.zip"
            sh.cmd 'export DART_SDK="${PWD%/}/dart-sdk"'
            sh.cmd 'export PATH="$DART_SDK/bin:$PATH"'
            sh.cmd 'export PATH="~/.pub-cache/bin:$PATH"'
          end

          sh.fold 'Test Runner install' do
            sh.echo 'Installing Test Runner', ansi: :yellow
            sh.cmd "pub global activate test_runner"
          end
        end

        def announce
          super

          sh.cmd 'dart --version'
          sh.echo ''
        end

        def install
          sh.if '-f pubspec.yaml' do
            sh.cmd "pub get"
          end
        end
{'fraction_non_alphanumeric': 0.11018001241464928, 'fraction_numerical': 0.002482929857231533, 'mean_word_length': 1.508171206225681, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '6251513', 'n_tokens_mistral': 1016, 'n_tokens_neox': 963, 'n_words': 268}