<commit_before>require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'net/https'

describe "Kanbanery time" do

  it "should not be set ahead" do
    FakeWeb.allow_net_connect = "https://kanbanery.com/api/v1/test.json"
    http = Net::HTTP.new('kanbanery.com', 443)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    path = '/api/v1/test.json'
    resp = http.start {|h| h.request(Net::HTTP::Get.new(path))}

    Time.parse(resp.header['date']).utc.should_not > Time.now.utc
  end
end<commit_msg>Using HEAD request in spec for enforcing clock sync.<commit_after>require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'net/https'

describe "Kanbanery time" do

  it "should not be set ahead" do
    FakeWeb.allow_net_connect = "https://kanbanery.com/api/v1/test.json"
    http = Net::HTTP.new('kanbanery.com', 443)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    path = '/api/v1/test.json'
    resp = http.start {|h| h.request(Net::HTTP::Head.new(path))}

    Time.parse(resp.header['date']).utc.should_not > Time.now.utc
  end
end
{'fraction_non_alphanumeric': 0.1584070796460177, 'fraction_numerical': 0.008849557522123894, 'mean_word_length': 3.960526315789474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '5306873', 'n_tokens_mistral': 428, 'n_tokens_neox': 408, 'n_words': 77}