Sha256: f642cc945ec01a0b4c26aa92253ea5e65aec37522ebc3a6432a130ec102e076f

Contents?: true

Size: 516 Bytes

Versions: 36

Compression:

Stored size: 516 Bytes

Contents

require "stud/temporary"
module LogStashTest
  class Certicate
    attr_reader :ssl_key, :ssl_cert

    def initialize
      @ssl_cert = Stud::Temporary.pathname("ssl_certificate")
      @ssl_key = Stud::Temporary.pathname("ssl_key")

      system("openssl req -x509  -batch -nodes -newkey rsa:2048 -keyout #{ssl_key} -out #{ssl_cert} -subj /CN=localhost > /dev/null 2>&1")
    end
  end

  class << self
    def certificate
      Certicate.new
    end

    def random_port
      rand(2000..10000)
    end
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
logstash-input-lumberjack-1.0.6 spec/support/logstash_test.rb
logstash-input-lumberjack-2.0.4 spec/support/logstash_test.rb
logstash-input-beats-0.9 spec/support/logstash_test.rb
logstash-input-beats-0.9.beta1 spec/support/logstash_test.rb
logstash-input-lumberjack-2.0.3 spec/support/logstash_test.rb
logstash-input-lumberjack-2.0.2 spec/support/logstash_test.rb
logstash-input-lumberjack-2.0.1 spec/support/logstash_test.rb
logstash-input-lumberjack-1.0.5 spec/support/logstash_test.rb
logstash-input-lumberjack-1.0.4 spec/support/logstash_test.rb
logstash-input-lumberjack-1.0.3 spec/support/logstash_test.rb
logstash-input-lumberjack-1.0.2 spec/support/logstash_test.rb
logstash-input-lumberjack-1.0.1 spec/support/logstash_test.rb
logstash-input-lumberjack-0.1.10 spec/support/logstash_test.rb
logstash-input-lumberjack-0.1.9 spec/support/logstash_test.rb
logstash-input-lumberjack-0.1.8 spec/support/logstash_test.rb
logstash-input-lumberjack-0.1.7 spec/support/logstash_test.rb