<commit_before># encoding: US-ASCII
require 'socket'
require 'spec_helper'

describe Norn::Game do

  describe '#downstream' do
    it 'accepts multithreaded downstream connections' do
      game = Norn.connect(0,
        account:   ENV.fetch("GS_ACCOUNT"),
        password:  ENV.fetch("GS_PASSWORD"),
        game:      ENV.fetch("GS_GAME"),
        character: ENV.fetch("GS_CHARACTER"),
      )

      client1 = Thread.new do
        socket = game.downstream
        line   = nil
        break while line = socket.gets
        line
      end

      client2 = Thread.new do
        socket = game.downstream
        line   = nil
        break while line = socket.gets
        line
      end

      expect(client1.value).to be_truthy
      expect(client1.value).to eq client2.value
    end
  end
end<commit_msg>try explicity port for windows instead of 0;<commit_after># encoding: US-ASCII
require 'socket'
require 'spec_helper'

describe Norn::Game do

  describe '#downstream' do
    it 'accepts multithreaded downstream connections' do
      game = Norn.connect(4040,
        account:   ENV.fetch("GS_ACCOUNT"),
        password:  <PASSWORD>("<PASSWORD>"),
        game:      ENV.fetch("GS_GAME"),
        character: ENV.fetch("GS_CHARACTER"),
      )

      client1 = Thread.new do
        socket = game.downstream
        line   = nil
        break while line = socket.gets
        line
      end

      client2 = Thread.new do
        socket = game.downstream
        line   = nil
        break while line = socket.gets
        line
      end

      expect(client1.value).to be_truthy
      expect(client1.value).to eq client2.value
    end
  end
end
{'fraction_non_alphanumeric': 0.09057971014492754, 'fraction_numerical': 0.00966183574879227, 'mean_word_length': 2.120527306967985, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1965708', 'n_tokens_mistral': 515, 'n_tokens_neox': 493, 'n_words': 132}