logstash-output-websocket_topics 2.1.4 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b68f5c46a6f123d6663a8539a5e5a0f7ab599b3
4
- data.tar.gz: 6d251431647f37e5c3ec332ec4d2ab65005ce30d
3
+ metadata.gz: ede515b6cf46318db0cecd6218fb6f12b36fc130
4
+ data.tar.gz: c986d2ca27dbc177220de090c0cabb453061590a
5
5
  SHA512:
6
- metadata.gz: 6f5434cdd2e86559001ac0113edbf56886b2ce45cde3963cdadfb2c1abbc17147bbbdb11d40e30f7314d9d9b041fbc8d3797af0d707cccc1bcd4747bb90a7c96
7
- data.tar.gz: ac5db53cf1612c374fe6508f13aef251e2c6dddf529826af1a6ef9aa31d6011018edc61759f795703ee5f64fc7779a254bebe9e3c1fdc556f0b385a26e658221
6
+ metadata.gz: 5bde5bb942d484ad1f87d2b12f516349e7e4132e9d6574ef42255207824e346acfe9b7f7d7d6fc3a2456cc738ccd1489a75bd44116f137726ca48ae0c9315ba1
7
+ data.tar.gz: 3a787d35fdad25c3344c1d250b92d748307097b2e2416ea25f8e7849cdae02b6eb3485c641c1d2090e1cdf36befc7d30d809c12be16a38d823ac24ad1a79a543
@@ -10,7 +10,7 @@ require "logstash/outputs/base"
10
10
  #
11
11
  # If no clients are connected, any messages received are ignored.
12
12
  class LogStash::Outputs::WebSocket < LogStash::Outputs::Base
13
- config_name "websocket"
13
+ config_name "websocket_topics"
14
14
 
15
15
  # The address to serve websocket data from
16
16
  config :host, :validate => :string, :default => "0.0.0.0"
@@ -26,8 +26,8 @@ class LogStash::Outputs::WebSocket < LogStash::Outputs::Base
26
26
  public
27
27
  def register
28
28
  require "ftw"
29
- require "logstash/outputs/websocket/app"
30
- require "logstash/outputs/websocket/pubsub"
29
+ require "logstash/outputs/websocket_topics/app"
30
+ require "logstash/outputs/websocket_topics/pubsub"
31
31
  @channels = {}
32
32
  @server = Thread.new(@channels) do |channels|
33
33
  begin
@@ -43,14 +43,13 @@ class LogStash::Outputs::WebSocket < LogStash::Outputs::Base
43
43
 
44
44
  public
45
45
  def receive(event)
46
- json = event.to_json
47
- topic = json.topic
46
+ topic = event.topic
48
47
  if @channels.has_key?(topic)
49
- @channels[topic].publish(json)
48
+ @channels[topic].publish(event.to_json)
50
49
  else
51
50
  pubsub = make_pubsub(topic)
52
51
  @channels[topic] = pubsub
53
- pubsub.publish(json)
52
+ pubsub.publish(event.to_json)
54
53
  end # if
55
54
  end # def receive
56
55
 
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  require "logstash/namespace"
3
- require "logstash/outputs/websocket"
3
+ require "logstash/outputs/websocket_topics"
4
4
  require "sinatra/base"
5
5
  require "rack/handler/ftw" # from ftw
6
6
  require "ftw/websocket/rack" # from ftw
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  require "logstash/namespace"
3
- require "logstash/outputs/websocket"
3
+ require "logstash/outputs/websocket_topics"
4
4
 
5
5
  class LogStash::Outputs::WebSocket::Pubsub
6
6
  attr_accessor :logger
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-websocket_topics'
4
- s.version = '2.1.4'
4
+ s.version = '2.1.5'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This output runs a websocket server and publishes any messages to those conencted clients that have subscribed to the topic being published."
7
7
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
@@ -1,8 +1,8 @@
1
1
  # encoding: utf-8
2
2
  require "logstash/devutils/rspec/spec_helper"
3
- require "logstash/outputs/websocket"
3
+ require "logstash/outputs/websocket_topics"
4
4
 
5
- describe "output/websocket" do
5
+ describe "output/websocket_topics" do
6
6
 
7
7
  subject(:output) { LogStash::Outputs::WebSocket.new }
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-websocket_topics
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ version: 2.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Osheroff
@@ -98,9 +98,9 @@ files:
98
98
  - LICENSE
99
99
  - NOTICE.TXT
100
100
  - README.md
101
- - lib/logstash/outputs/websocket.rb
102
- - lib/logstash/outputs/websocket/app.rb
103
- - lib/logstash/outputs/websocket/pubsub.rb
101
+ - lib/logstash/outputs/websocket_topics.rb
102
+ - lib/logstash/outputs/websocket_topics/app.rb
103
+ - lib/logstash/outputs/websocket_topics/pubsub.rb
104
104
  - logstash-output-websocket_topics.gemspec
105
105
  - spec/outputs/websocket_spec.rb
106
106
  homepage: ''