<commit_before>require "sidekiq"
require "net/http"
require "octokit"

class SourceRepoWorker
  private

  def source_repo(cookbook_json)
    url = source_repo_url(cookbook_json)
    url.match(%r{^(https?\://)?(github\.com/)(\w+/\w+)}).try(:[], 3)
  end
<commit_msg>made source_repo return empty string instead of nil for backward compatibility with spec<commit_after>require "sidekiq"
require "net/http"
require "octokit"

class SourceRepoWorker
  private

  def source_repo(cookbook_json)
    url = source_repo_url(cookbook_json)
    url.match(%r{^(https?\://)?(github\.com/)(\w+/\w+)}).try(:[], 3).to_s
  end

{'fraction_non_alphanumeric': 0.16176470588235295, 'fraction_numerical': 0.0032679738562091504, 'mean_word_length': 4.894230769230769, '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': '1692644', 'n_tokens_mistral': 226, 'n_tokens_neox': 221, 'n_words': 44}