<commit_before>require "jarvis/error"

module Jarvis module GitHub class Project
  class InvalidURL < ::Jarvis::Error; end
  def self.parse(url)
    uri = URI.parse(url)
    _, organization, name, *_ = uri.path.split("/")
    if organization.nil?
      raise InvalidURL, "Could not find the organization in the url"
    end
    if name.nil?
      raise InvalidURL, "Could not find the name in the url"
    end
    return self.new(organization, name)
  end

  attr_reader :organization, :name

  def initialize(organization, name)
    @organization = organization
    @name = name
  end

  def git_url
    return "https://github.com/#{@organization}/#{@name}"
  end
end end end<commit_msg>Use ssh for git clones<commit_after>require "jarvis/error"

module Jarvis module GitHub class Project
  class InvalidURL < ::Jarvis::Error; end
  def self.parse(url)
    uri = URI.parse(url)
    _, organization, name, *_ = uri.path.split("/")
    if organization.nil?
      raise InvalidURL, "Could not find the organization in the url"
    end
    if name.nil?
      raise InvalidURL, "Could not find the name in the url"
    end
    return self.new(organization, name)
  end

  attr_reader :organization, :name

  def initialize(organization, name)
    @organization = organization
    @name = name
  end

  def git_url
    #return "https://github.com/#{@organization}/#{@name}"
    return "git@github.com:/#{@organization}/#{@name}.git"
  end
end end end
{'fraction_non_alphanumeric': 0.11003460207612457, 'fraction_numerical': 0.0, 'mean_word_length': 3.316417910447761, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '4094241', 'n_tokens_mistral': 458, 'n_tokens_neox': 437, 'n_words': 141}