Sha256: db585e4905985b14b1a880f43096b721af40b58e674b9ebb0b1e795875243a89

Contents?: true

Size: 343 Bytes

Versions: 20

Compression:

Stored size: 343 Bytes

Contents

module Mocks
  class Server

    def initialize
      @queue = Array.new
    end

    def size
      @queue.length
    end

    def pop
      @queue.pop
    end

    def stop
    end

    def empty?
      @queue.empty?
    end

    def puts(data)
      data.split("\n").each do |line|
        @queue << "#{line}\n"
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
logstash-output-graphite-3.1.6 spec/support/server.rb
logstash-output-graphite-3.1.5 spec/support/server.rb
logstash-output-graphite-3.1.4 spec/support/server.rb
logstash-output-graphite-3.1.3 spec/support/server.rb
logstash-output-graphite-3.1.2 spec/support/server.rb
logstash-output-graphite-mavlyutov-3.2.1 spec/support/server.rb
logstash-output-graphite-mavlyutov-3.2.0 spec/support/server.rb
logstash-output-graphite-3.1.1 spec/support/server.rb
logstash-output-graphite-3.0.1 spec/support/server.rb
logstash-output-graphite-3.0.0 spec/support/server.rb
logstash-output-graphite-2.0.5 spec/support/server.rb
logstash-output-graphite-2.0.3 spec/support/server.rb
logstash-output-graphite-2.0.2 spec/support/server.rb
logstash-output-graphite-2.0.1 spec/support/server.rb
logstash-output-graphite-2.0.0 spec/support/server.rb
logstash-output-kairosdb-1.0.0 spec/support/server.rb
logstash-output-graphite-1.0.2 spec/support/server.rb
logstash-output-graphite-1.0.1 spec/support/server.rb
logstash-output-graphite-1.0.0 spec/support/server.rb
logstash-output-graphite-0.1.8 spec/support/server.rb