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-3.1.6 spec/support/logstash_test.rb
logstash-input-lumberjack-3.1.5 spec/support/logstash_test.rb
logstash-input-lumberjack-3.1.4 spec/support/logstash_test.rb
logstash-input-lumberjack-3.1.3 spec/support/logstash_test.rb
logstash-input-lumberjack-3.1.2 spec/support/logstash_test.rb
logstash-input-lumberjack-3.1.1 spec/support/logstash_test.rb
logstash-input-lumberjack-3.0.1 spec/support/logstash_test.rb
logstash-input-lumberjack-3.0.0 spec/support/logstash_test.rb
logstash-input-lumberjack-2.0.7 spec/support/logstash_test.rb
logstash-input-lumberjack-2.0.5 spec/support/logstash_test.rb
logstash-input-beats-2.0.3 spec/support/logstash_test.rb
logstash-input-beats-2.0.2 spec/support/logstash_test.rb
logstash-input-beats-2.0.1 spec/support/logstash_test.rb
logstash-input-beats-2.0.0 spec/support/logstash_test.rb
logstash-input-beats-0.9.6 spec/support/logstash_test.rb
logstash-input-beats-0.9.5 spec/support/logstash_test.rb
logstash-input-beats-0.9.4 spec/support/logstash_test.rb
logstash-input-beats-0.9.3 spec/support/logstash_test.rb
logstash-input-beats-0.9.2 spec/support/logstash_test.rb
logstash-input-beats-0.9.1 spec/support/logstash_test.rb