<commit_before>module Travis
  module Build
    class Script
      class Scala < Jvm

        DEFAULTS = {
          scala: '2.10.3',
          jdk:   'default'
        }

        def cache_slug
          super << "--scala-" << config[:scala].to_s
        end

        def export
          super
          set 'TRAVIS_SCALA_VERSION', config[:scala], echo: false
          self.if ('-d project || -f build.sbt') {
            set 'JVM_OPTS', '@/etc/sbt/jvmopts', echo: false
            set 'SBT_OPTS', '@/etc/sbt/sbtopts', echo: false
          }
        end

        def announce
          super
          echo "Using Scala #{config[:scala]}"
        end

        def install
          self.if  ('! -d project && ! -f build.sbt') { super }
        end

        def script
          self.if   '-d project || -f build.sbt', "sbt#{sbt_args} ++#{config[:scala]} test"
          self.else { super }
        end

        private

        def sbt_args
          config[:sbt_args] && " #{config[:sbt_args]}"
        end
      end
    end
  end
end<commit_msg>Cleanup: use 'do...end' blocks instead of '{...}'<commit_after>module Travis
  module Build
    class Script
      class Scala < Jvm

        DEFAULTS = {
          scala: '2.10.3',
          jdk:   'default'
        }

        def cache_slug
          super << "--scala-" << config[:scala].to_s
        end

        def export
          super
          set 'TRAVIS_SCALA_VERSION', config[:scala], echo: false
          self.if '-d project || -f build.sbt' do
            set 'JVM_OPTS', '@/etc/sbt/jvmopts', echo: false
            set 'SBT_OPTS', '@/etc/sbt/sbtopts', echo: false
          end
        end

        def announce
          super
          echo "Using Scala #{config[:scala]}"
        end

        def install
          self.if '! -d project && ! -f build.sbt' do
            super
          end
        end

        def script
          self.if '-d project || -f build.sbt', "sbt#{sbt_args} ++#{config[:scala]} test"
          self.else do
            super
          end
        end

        private

        def sbt_args
          config[:sbt_args] && " #{config[:sbt_args]}"
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.1212259835315645, 'fraction_numerical': 0.0036596523330283625, 'mean_word_length': 1.3516129032258064, 'pattern_counts': {'":': 0, '<': 13, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5694584', 'n_tokens_mistral': 704, 'n_tokens_neox': 679, 'n_words': 179}