<commit_before>require 'test_helper'

describe EnvCompat do
  it "encodes urls into environment friendly variables" do
    v = EnvCompat.encode "https://github.com/company/private-repo.git"
    _(v).must_equal "HTTPS_CFF_GITHUB_D_COM_F_COMPANY_F_PRIVATE_M_REPO_D_GIT" 
  end

  it "decodes urls from environment friendly variables" do
    v = EnvCompat.decode "HTTPS_CFF_GITHUB_D_COM_F_COMPANY_F_PRIVATE_M_REPO_D_GIT" 
    _(v).must_equal "https://github.com/company/private-repo.git".upcase
  end
end<commit_msg>FYI: Must have underscore mapping<commit_after>require 'test_helper'

describe EnvCompat do
  it "encodes urls into environment friendly variables" do
    v = EnvCompat.encode "https://github.com/company/private-repo.git"
    _(v).must_equal "HTTPS_CFF_GITHUB_D_COM_F_COMPANY_F_PRIVATE_M_REPO_D_GIT" 
  end

  it "decodes urls from environment friendly variables" do
    v = EnvCompat.decode "HTTPS_CFF_GITHUB_D_COM_F_COMPANY_F_PRIVATE_M_REPO_D_GIT" 
    _(v).must_equal "https://github.com/company/private-repo.git".upcase
  end

  it "must have an underscore character mapping" do
    _(EnvCompat.instance_eval {mapping.values}).must_include '_'
  end
end
{'fraction_non_alphanumeric': 0.08547008547008547, 'fraction_numerical': 0.0, 'mean_word_length': 5.067357512953368, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '4591081', 'n_tokens_mistral': 433, 'n_tokens_neox': 422, 'n_words': 82}