<commit_before>#!/usr/bin/env jruby

# encoding: utf-8

require_relative "../helper"

describe Doubleshot::Resolver::JarResolver do
  before do
    @resolver = Doubleshot::Resolver::JarResolver.new(*Doubleshot::current.config.mvn_repositories)
  end

  describe "fetch" do
    before do
      @dependencies = Doubleshot::Dependencies::JarDependencyList.new
      @dependencies.fetch("com.pyx4j:maven-plugin-log4j:jar:1.0.1")
      @dependencies.fetch("org.springframework:spring-core:jar:3.1.2.RELEASE")
      @dependencies.fetch("org.hibernate:hibernate-core:jar:4.1.7.Final")
    end

    it "must return the same JarDependencyList" do
      @resolver.resolve!(@dependencies).must_be_same_as @dependencies
    end

    it "must take a JarDependencyList and populate the path of each JarDependency" do
      @resolver.resolve!(@dependencies).each do |dependency|
        dependency.path.wont_be_nil
      end
    end

    it "must populate transitive dependencies" do
      @resolver.resolve!(@dependencies).size.must_equal 16
    end
  end
end<commit_msg>Used a crazy amount of dependencies in this spec that were frequently timing out. No need. Let's cut down on the runtime and increase the reliability of the spec by trimming up the list to examples we already use elsewhere.<commit_after>#!/usr/bin/env jruby

# encoding: utf-8

require_relative "../helper"

describe Doubleshot::Resolver::JarResolver do
  before do
    @resolver = Doubleshot::Resolver::JarResolver.new(*Doubleshot::current.config.mvn_repositories)
  end

  describe "fetch" do
    before do
      @dependencies = Doubleshot::Dependencies::JarDependencyList.new
      @dependencies.fetch("ch.qos.logback:logback-core:jar:1.0.6")
    end

    it "must return the same JarDependencyList" do
      @resolver.resolve!(@dependencies).must_be_same_as @dependencies
    end

    it "must take a JarDependencyList and populate the path of each JarDependency" do
      @resolver.resolve!(@dependencies).each do |dependency|
        dependency.path.wont_be_nil
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.09844054580896686, 'fraction_numerical': 0.008771929824561403, 'mean_word_length': 3.9589371980676327, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6065776', 'n_tokens_mistral': 651, 'n_tokens_neox': 606, 'n_words': 157}