logstash-input-websocket 2.0.2 → 3.0.2

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: 6e13a8bf9750bfcce42c29328e05b2d4ee0de96a
4
- data.tar.gz: ee2412e5a4e2457a4ec6db2234b7d2e9cb09e078
3
+ metadata.gz: 55c979849c73f57ac7e0fcf3daefde070b7d5fe0
4
+ data.tar.gz: d00d6e3f54a442143bbe88d9d54a126ccb55276a
5
5
  SHA512:
6
- metadata.gz: a4652dccb0fa6c75b21896ef0d1e81bc36e4c6462add346052a4ea6ac1891171264453f33f7bcc9d201b9a6217017b7f655d8353f5338bcc425fc99860322e8c
7
- data.tar.gz: 0fd8c74e24ba1d1c522ea0ac8ee4dfd1c57d7a1c8e30ca89a6275a6c9f456abed0155f51386d0412bc29ceaabbb0224930ed86c291de4fb163826c334e86b074
6
+ metadata.gz: 3451a3e6f5f57f1613787271177ca6e0b7584562b93736c9280704da79ff120db03bcb1d6632e8a1a207cca0565f44a6e3919f86146041404163634d4288c2ee
7
+ data.tar.gz: 8ec566d3cf416a541a9cd05eff763219a4ae76ccd5079a15595ac2354b7caaee726491570015deab0a5c33270b52ca1d23c6bc07c8db5a1054c07b60e69df66e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # 3.0.2
2
+ - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
3
+ # 3.0.1
4
+ - New dependency requirements for logstash-core for the 5.0 release
5
+ ## 3.0.0
6
+ - The "mode" option's "server" value has been removed since server mode
7
+ isn't supported (and never has been). This could potentially affect
8
+ existing users who have had "mode => server" set but in reality have
9
+ been using client mode all along.
10
+ - The "url" option is now mandatory.
11
+
1
12
  ## 2.0.0
2
13
  - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
3
14
  instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
data/CONTRIBUTORS CHANGED
@@ -1,6 +1,9 @@
1
1
  The following is a list of people who have contributed ideas, code, bug
2
2
  reports, or in general have helped logstash along its way.
3
3
 
4
+ Maintainers:
5
+ * Magnus Bäck (magnusbaeck)
6
+
4
7
  Contributors:
5
8
  * Aaron Mildenstein (untergeek)
6
9
  * Jordan Sissel (jordansissel)
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Logstash Plugin
2
2
 
3
+ [![Build
4
+ Status](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Inputs/job/logstash-plugin-input-websocket-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Inputs/job/logstash-plugin-input-websocket-unit/)
5
+
3
6
  This is a plugin for [Logstash](https://github.com/elastic/logstash).
4
7
 
5
8
  It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
@@ -10,18 +10,13 @@ class LogStash::Inputs::Websocket < LogStash::Inputs::Base
10
10
 
11
11
  default :codec, "json"
12
12
 
13
- # The url to connect to or serve from
14
- config :url, :validate => :string, :default => "0.0.0.0"
15
-
16
- # Operate as a client or a server.
17
- #
18
- # Client mode causes this plugin to connect as a websocket client
19
- # to the URL given. It expects to receive events as websocket messages.
20
- #
21
- # (NOT IMPLEMENTED YET) Server mode causes this plugin to listen on
22
- # the given URL for websocket clients. It expects to receive events
23
- # as websocket messages from these clients.
24
- config :mode, :validate => [ "server", "client" ], :default => "client"
13
+ # The URL to connect to.
14
+ config :url, :validate => :string, :required => true
15
+
16
+ # Select the plugin's mode of operation. Right now only client mode
17
+ # is supported, i.e. this plugin connects to a websocket server and
18
+ # receives events from the server as websocket messages.
19
+ config :mode, :validate => ["client"], :default => "client"
25
20
 
26
21
  def register
27
22
  require "ftw"
@@ -29,7 +24,6 @@ class LogStash::Inputs::Websocket < LogStash::Inputs::Base
29
24
 
30
25
  public
31
26
  def run(output_queue)
32
- # TODO(sissel): Implement server mode.
33
27
  agent = FTW::Agent.new
34
28
  begin
35
29
  websocket = agent.websocket!(@url)
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-websocket'
4
- s.version = '2.0.2'
4
+ s.version = '3.0.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Read events over the websocket protocol."
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"
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }
21
21
 
22
22
  # Gem dependencies
23
- s.add_runtime_dependency "logstash-core", ">= 2.0.0.beta2", "< 3.0.0"
23
+ s.add_runtime_dependency "logstash-core-plugin-api", "~> 1.0"
24
24
 
25
25
  s.add_runtime_dependency 'logstash-codec-json'
26
26
  s.add_runtime_dependency 'ftw', ['~> 0.0.40']
@@ -1 +1,25 @@
1
1
  require "logstash/devutils/rspec/spec_helper"
2
+ require "logstash/inputs/websocket"
3
+
4
+ describe LogStash::Inputs::Websocket do
5
+
6
+ context "when url option isn't set" do
7
+ subject { LogStash::Inputs::Websocket.new() }
8
+
9
+ it "should raise exception" do
10
+ expect { subject.register }.to raise_error(LogStash::ConfigurationError)
11
+ end
12
+ end
13
+
14
+ context "when attempting to enable server mode" do
15
+ subject {
16
+ LogStash::Inputs::Websocket.new("url" => "http://example.com",
17
+ "mode" => "server")
18
+ }
19
+
20
+ it "should raise exception" do
21
+ expect { subject.register }.to raise_error(LogStash::ConfigurationError)
22
+ end
23
+ end
24
+
25
+ end
metadata CHANGED
@@ -1,39 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-websocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-14 00:00:00.000000000 Z
11
+ date: 2016-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - '>='
16
+ - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 2.0.0.beta2
19
- - - <
20
- - !ruby/object:Gem::Version
21
- version: 3.0.0
22
- name: logstash-core
18
+ version: '1.0'
19
+ name: logstash-core-plugin-api
23
20
  prerelease: false
24
21
  type: :runtime
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - '>='
28
- - !ruby/object:Gem::Version
29
- version: 2.0.0.beta2
30
- - - <
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: 3.0.0
26
+ version: '1.0'
33
27
  - !ruby/object:Gem::Dependency
34
28
  requirement: !ruby/object:Gem::Requirement
35
29
  requirements:
36
- - - '>='
30
+ - - ">="
37
31
  - !ruby/object:Gem::Version
38
32
  version: '0'
39
33
  name: logstash-codec-json
@@ -41,13 +35,13 @@ dependencies:
41
35
  type: :runtime
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
- - - '>='
38
+ - - ">="
45
39
  - !ruby/object:Gem::Version
46
40
  version: '0'
47
41
  - !ruby/object:Gem::Dependency
48
42
  requirement: !ruby/object:Gem::Requirement
49
43
  requirements:
50
- - - ~>
44
+ - - "~>"
51
45
  - !ruby/object:Gem::Version
52
46
  version: 0.0.40
53
47
  name: ftw
@@ -55,13 +49,13 @@ dependencies:
55
49
  type: :runtime
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
- - - ~>
52
+ - - "~>"
59
53
  - !ruby/object:Gem::Version
60
54
  version: 0.0.40
61
55
  - !ruby/object:Gem::Dependency
62
56
  requirement: !ruby/object:Gem::Requirement
63
57
  requirements:
64
- - - '>='
58
+ - - ">="
65
59
  - !ruby/object:Gem::Version
66
60
  version: '0'
67
61
  name: logstash-devutils
@@ -69,7 +63,7 @@ dependencies:
69
63
  type: :development
70
64
  version_requirements: !ruby/object:Gem::Requirement
71
65
  requirements:
72
- - - '>='
66
+ - - ">="
73
67
  - !ruby/object:Gem::Version
74
68
  version: '0'
75
69
  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
@@ -99,12 +93,12 @@ require_paths:
99
93
  - lib
100
94
  required_ruby_version: !ruby/object:Gem::Requirement
101
95
  requirements:
102
- - - '>='
96
+ - - ">="
103
97
  - !ruby/object:Gem::Version
104
98
  version: '0'
105
99
  required_rubygems_version: !ruby/object:Gem::Requirement
106
100
  requirements:
107
- - - '>='
101
+ - - ">="
108
102
  - !ruby/object:Gem::Version
109
103
  version: '0'
110
104
  requirements: []