<commit_before>require 'spec_helper'

describe RSAAuthority::Authorizer do
  let(:test_key_name) { 'spec/support/example_key' }
  let(:public_key) { "#{test_key_name}.pub" }

  let(:request) { double 'request', env:{'REQUEST_URI'=> 'http://example.dev/?a=1&b=2'},
                                    request_method: 'GET',
                                    headers: {'X-Signature' => 'Qwnp3gqCSxiNL6yGS6KNUnS8WyxQy9cj2UpdWPEKSZ60CJ8fBe9byPq1C7bz%0AqUwfjgu4XLBPFv8i7sYAzKDVYYhnWZopvRtnpzscNJcr8ZyxjacyYicv%2Bi1w%0AkH0tlA5NPJs0Mk1b5mYId0gx%2FQ4WKOpgm%2FzL2W0t0DriiJJMBUtLJs5dstsr%0ABz5xR6UQKKFmQ0dkSWf5r%2F5B5lqcjypEIttHrinLBecdWK5F%2F0N6RI9J5KRm%0ALL9YKNFjra4zCOo8VAp1nSQHL5Wj5D07OLqC6WOGtpL%2F4NazIcP6w7Y55ImU%0Af8%2BPQzIFZhUfmYZQGlHqdi2NAIkczZz%2FOJdiakP3FA%3D%3D%0A'}  }

  # generate keys
  let(:authorizer) { RSAAuthority::Authorizer.new(request, public_key) }

  it { expect(authorizer.data).to eq("gethttp://example.dev/?a=1&b=2") }

end<commit_msg>Spec request is authentic<commit_after>require 'spec_helper'

describe RSAAuthority::Authorizer do
  let(:test_key_name) { 'spec/support/example_key' }
  let(:public_key) { "#{test_key_name}.pub" }

  let(:request) { double 'request', env:{'REQUEST_URI'=> 'http://example.dev/?a=1&b=2'},
                                    request_method: 'GET',
                                    headers: {'X-Signature' => 'Qwnp3gqCSxiNL6yGS6KNUnS8WyxQy9cj2UpdWPEKSZ60CJ8fBe9byPq1C7bz%0AqUwfjgu4XLBPFv8i7sYAzKDVYYhnWZopvRtnpzscNJcr8ZyxjacyYicv%2Bi1w%0AkH0tlA5NPJs0Mk1b5mYId0gx%2FQ4WKOpgm%2FzL2W0t0DriiJJMBUtLJs5dstsr%0ABz5xR6UQKKFmQ0dkSWf5r%2F5B5lqcjypEIttHrinLBecdWK5F%2F0N6RI9J5KRm%0ALL9YKNFjra4zCOo8VAp1nSQHL5Wj5D07OLqC6WOGtpL%2F4NazIcP6w7Y55ImU%0Af8%2BPQzIFZhUfmYZQGlHqdi2NAIkczZz%2FOJdiakP3FA%3D%3D%0A'}  }

  let(:authorizer) { RSAAuthority::Authorizer.new(request, public_key) }

  it { expect(authorizer.data).to eq("gethttp://example.dev/?a=1&b=2") }
  it { expect(authorizer).to be_authentic }
end
{'fraction_non_alphanumeric': 0.11993849308047155, 'fraction_numerical': 0.07790876473603281, 'mean_word_length': 5.639455782312925, 'pattern_counts': {'":': 0, '<': 3, '<?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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3707848', 'n_tokens_mistral': 1037, 'n_tokens_neox': 975, 'n_words': 59}