<commit_before>require 'rubygems'
require 'naether'
require "#{File.dirname(__FILE__)}/resolver/java"

module Buildr
  module Resolver
    class << self
      
      def resolve( dependencies, excludes=[] )
        naether = Naether.create_from_jars( Buildr::Resolver::Java.instance.jar_dependencies )
        if Buildr.repositories.remote.size > 0
          naether.clear_remote_repositories
          Buildr.repositories.remote.each do |repo|
            naether.add_remote_repository( repo )
          end
        end
        
        naether.local_repo_path = Repositories.instance.local
        
        naether.dependencies = dependencies
        naether.resolve_dependencies( false )
        
        dependences = naether.dependencies
        
        unless excludes.nil?
          unless excludes.is_a? Array
            excludes = [excludes]
          end
          
          dependences.delete_if do |dep|
            excludes.select { |exclude| dep =~ /^#{exclude}/ }.size > 0
          end
        end
      end
      
      def deploy_artifact( notation, file_path, url, opts = {} )
        naether = Naether.create_from_jars( Buildr::Resolver::Java.instance.jar_dependencies )
        naether.deploy_artifact( notation, file_path, url )
      end
    end
  end
end<commit_msg>call to_s on dependencies<commit_after>require 'rubygems'
require 'naether'
require "#{File.dirname(__FILE__)}/resolver/java"

module Buildr
  module Resolver
    class << self
      
      def resolve( dependencies, excludes=[] )
        naether = Naether.create_from_jars( Buildr::Resolver::Java.instance.jar_dependencies )
        if Buildr.repositories.remote.size > 0
          naether.clear_remote_repositories
          Buildr.repositories.remote.each do |repo|
            naether.add_remote_repository( repo )
          end
        end
        
        naether.local_repo_path = Repositories.instance.local
        
        naether.dependencies = dependencies
        naether.resolve_dependencies( false )
        
        dependences = naether.dependencies
        
        unless excludes.nil?
          unless excludes.is_a? Array
            excludes = [excludes]
          end
          
          dependences.delete_if do |dep|
            excludes.select { |exclude| dep.to_s =~ /^#{exclude}/ }.size > 0
          end
        end
      end
      
      def deploy_artifact( notation, file_path, url, opts = {} )
        naether = Naether.create_from_jars( Buildr::Resolver::Java.instance.jar_dependencies )
        naether.deploy_artifact( notation, file_path, url )
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08259700345754899, 'fraction_numerical': 0.001536688436419516, 'mean_word_length': 2.103694874851013, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3588049', 'n_tokens_mistral': 764, 'n_tokens_neox': 727, 'n_words': 152}