logstash-core 2.0.0.beta1-java → 2.0.0.beta2-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of logstash-core might be problematic. Click here for more details.

@@ -16,6 +16,18 @@ describe "Project licenses" do
16
16
  /lgpl/])
17
17
  }
18
18
 
19
+ ##
20
+ # This licenses are skipped from the license test of many reasons, check
21
+ # the exact dependency for detailed information.
22
+ ##
23
+ let(:skipped_dependencies) do
24
+ [
25
+ # Skipped because of already included and bundled within JRuby so checking here is redundant.
26
+ # Need to take action about jruby licenses to enable again or keep skeeping.
27
+ "jruby-openssl"
28
+ ]
29
+ end
30
+
19
31
  shared_examples "runtime license test" do
20
32
 
21
33
  subject(:gem_name) do |example|
@@ -33,6 +45,7 @@ describe "Project licenses" do
33
45
  it "has runtime dependencies with expected licenses" do
34
46
  spec.runtime_dependencies.map { |dep| dep.to_spec }.each do |runtime_spec|
35
47
  next unless runtime_spec
48
+ next if skipped_dependencies.include?(runtime_spec.name)
36
49
  runtime_spec.licenses.each do |license|
37
50
  expect(license.downcase).to match(expected_licenses)
38
51
  end
@@ -24,24 +24,3 @@ describe "LogStash::Outputs::Base#worker_setup" do
24
24
  output.worker_setup
25
25
  end
26
26
  end
27
-
28
- describe "LogStash::Outputs::Base#output?" do
29
- it "should filter by type" do
30
- output = LogStash::Outputs::NOOP.new("type" => "noop")
31
- expect(output.receive(LogStash::Event.new({"type" => "noop"}))).to eq(true)
32
- expect(output.receive(LogStash::Event.new({"type" => "not_noop"}))).to eq(false)
33
- end
34
-
35
- it "should filter by tags" do
36
- output = LogStash::Outputs::NOOP.new("tags" => ["value", "value2"])
37
- expect(output.receive(LogStash::Event.new({"tags" => ["value","value2"]}))).to eq(true)
38
- expect(output.receive(LogStash::Event.new({"tags" => ["notvalue"]}))).to eq(false)
39
- expect(output.receive(LogStash::Event.new({"tags" => ["value"]}))).to eq(false)
40
- end
41
-
42
- it "should exclude by tags" do
43
- output = LogStash::Outputs::NOOP.new("exclude_tags" => ["value"])
44
- expect(output.receive(LogStash::Event.new({"tags" => ["value"]}))).to eq(false)
45
- expect(output.receive(LogStash::Event.new({"tags" => ["notvalue"]}))).to eq(true)
46
- end
47
- end
@@ -0,0 +1,49 @@
1
+ # encoding: utf-8
2
+ require "spec_helper"
3
+ require "logstash/util/defaults_printer"
4
+
5
+ describe LogStash::Util::DefaultsPrinter do
6
+ shared_examples "a defaults printer" do
7
+ it 'the .print method returns a defaults description' do
8
+ expect(actual_block.call).to eq(expected)
9
+ end
10
+ end
11
+
12
+ let(:workers) { 1 }
13
+ let(:expected) { "Default settings used: Filter workers: #{workers}" }
14
+ let(:settings) { {} }
15
+
16
+ describe 'class methods API' do
17
+ let(:actual_block) do
18
+ -> {described_class.print(settings)}
19
+ end
20
+
21
+ context 'when the settings hash is empty' do
22
+ it_behaves_like "a defaults printer"
23
+ end
24
+
25
+ context 'when the settings hash has content' do
26
+ let(:workers) { 42 }
27
+ let(:settings) { {'filter-workers' => workers} }
28
+
29
+ it_behaves_like "a defaults printer"
30
+ end
31
+ end
32
+
33
+ describe 'instance method API' do
34
+ let(:actual_block) do
35
+ -> {described_class.new(settings).print}
36
+ end
37
+
38
+ context 'when the settings hash is empty' do
39
+ it_behaves_like "a defaults printer"
40
+ end
41
+
42
+ context 'when the settings hash has content' do
43
+ let(:workers) { 13 }
44
+ let(:settings) { {'filter-workers' => workers} }
45
+
46
+ it_behaves_like "a defaults printer"
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,26 @@
1
+ # encoding: utf-8
2
+ require "spec_helper"
3
+ require "logstash/util/worker_threads_default_printer"
4
+
5
+ describe LogStash::Util::WorkerThreadsDefaultPrinter do
6
+ let(:settings) { {} }
7
+ let(:collector) { [] }
8
+
9
+ subject { described_class.new(settings) }
10
+
11
+ context 'when the settings hash is empty' do
12
+ it 'the #visit method returns a string with 1 filter worker' do
13
+ subject.visit(collector)
14
+ expect(collector.first).to eq("Filter workers: 1")
15
+ end
16
+ end
17
+
18
+ context 'when the settings hash has content' do
19
+ let(:settings) { {'filter-workers' => 42} }
20
+
21
+ it 'the #visit method returns a string with 42 filter workers' do
22
+ subject.visit(collector)
23
+ expect(collector.first).to eq("Filter workers: 42")
24
+ end
25
+ end
26
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta1
4
+ version: 2.0.0.beta2
5
5
  platform: java
6
6
  authors:
7
7
  - Jordan Sissel
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-09-15 00:00:00.000000000 Z
13
+ date: 2015-10-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cabin
@@ -96,6 +96,34 @@ dependencies:
96
96
  version: 0.8.3
97
97
  prerelease: false
98
98
  type: :runtime
99
+ - !ruby/object:Gem::Dependency
100
+ name: concurrent-ruby
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ~>
104
+ - !ruby/object:Gem::Version
105
+ version: 0.9.1
106
+ requirement: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: 0.9.1
111
+ prerelease: false
112
+ type: :runtime
113
+ - !ruby/object:Gem::Dependency
114
+ name: jruby-openssl
115
+ version_requirements: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - '>='
118
+ - !ruby/object:Gem::Version
119
+ version: 0.9.11
120
+ requirement: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '>='
123
+ - !ruby/object:Gem::Version
124
+ version: 0.9.11
125
+ prerelease: false
126
+ type: :runtime
99
127
  - !ruby/object:Gem::Dependency
100
128
  name: treetop
101
129
  version_requirements: !ruby/object:Gem::Requirement
@@ -158,12 +186,12 @@ dependencies:
158
186
  requirements:
159
187
  - - ~>
160
188
  - !ruby/object:Gem::Version
161
- version: 0.2.9
189
+ version: 0.3.5
162
190
  requirement: !ruby/object:Gem::Requirement
163
191
  requirements:
164
192
  - - ~>
165
193
  - !ruby/object:Gem::Version
166
- version: 0.2.9
194
+ version: 0.3.5
167
195
  prerelease: false
168
196
  type: :runtime
169
197
  description: The core components of logstash, the scalable log and event management tool
@@ -179,6 +207,8 @@ files:
179
207
  - lib/logstash/agent.rb
180
208
  - lib/logstash/codecs/base.rb
181
209
  - lib/logstash/config/config_ast.rb
210
+ - lib/logstash/config/cpu_core_strategy.rb
211
+ - lib/logstash/config/defaults.rb
182
212
  - lib/logstash/config/file.rb
183
213
  - lib/logstash/config/grammar.rb
184
214
  - lib/logstash/config/mixin.rb
@@ -192,7 +222,6 @@ files:
192
222
  - lib/logstash/java_integration.rb
193
223
  - lib/logstash/json.rb
194
224
  - lib/logstash/logging.rb
195
- - lib/logstash/multiqueue.rb
196
225
  - lib/logstash/namespace.rb
197
226
  - lib/logstash/outputs/base.rb
198
227
  - lib/logstash/patches.rb
@@ -201,6 +230,7 @@ files:
201
230
  - lib/logstash/patches/cabin.rb
202
231
  - lib/logstash/patches/profile_require_calls.rb
203
232
  - lib/logstash/patches/rubygems.rb
233
+ - lib/logstash/patches/silence_concurrent_ruby_warning.rb
204
234
  - lib/logstash/patches/stronger_openssl_defaults.rb
205
235
  - lib/logstash/pipeline.rb
206
236
  - lib/logstash/plugin.rb
@@ -214,20 +244,23 @@ files:
214
244
  - lib/logstash/util/buftok.rb
215
245
  - lib/logstash/util/charset.rb
216
246
  - lib/logstash/util/decorators.rb
247
+ - lib/logstash/util/defaults_printer.rb
217
248
  - lib/logstash/util/filetools.rb
218
249
  - lib/logstash/util/java_version.rb
219
250
  - lib/logstash/util/password.rb
220
251
  - lib/logstash/util/plugin_version.rb
221
252
  - lib/logstash/util/prctl.rb
222
253
  - lib/logstash/util/reporter.rb
223
- - lib/logstash/util/require-helper.rb
224
254
  - lib/logstash/util/retryable.rb
225
255
  - lib/logstash/util/socket_peer.rb
226
256
  - lib/logstash/util/unicode_trimmer.rb
257
+ - lib/logstash/util/worker_threads_default_printer.rb
227
258
  - lib/logstash/version.rb
228
259
  - locales/en.yml
229
260
  - logstash-core.gemspec
230
261
  - spec/core/conditionals_spec.rb
262
+ - spec/core/config_cpu_core_strategy_spec.rb
263
+ - spec/core/config_defaults_spec.rb
231
264
  - spec/core/config_mixin_spec.rb
232
265
  - spec/core/config_spec.rb
233
266
  - spec/core/environment_spec.rb
@@ -249,11 +282,13 @@ files:
249
282
  - spec/spec_helper.rb
250
283
  - spec/util/accessors_spec.rb
251
284
  - spec/util/charset_spec.rb
285
+ - spec/util/defaults_printer_spec.rb
252
286
  - spec/util/gemfile_spec.rb
253
287
  - spec/util/java_version_spec.rb
254
288
  - spec/util/json_spec.rb
255
289
  - spec/util/plugin_version_spec.rb
256
290
  - spec/util/unicode_trimmer_spec.rb
291
+ - spec/util/worker_threads_default_printer_spec.rb
257
292
  - spec/util_spec.rb
258
293
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
259
294
  licenses:
@@ -275,12 +310,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
275
310
  version: 1.3.1
276
311
  requirements: []
277
312
  rubyforge_project:
278
- rubygems_version: 2.2.2
313
+ rubygems_version: 2.4.5
279
314
  signing_key:
280
315
  specification_version: 4
281
316
  summary: logstash-core - The core components of logstash
282
317
  test_files:
283
318
  - spec/core/conditionals_spec.rb
319
+ - spec/core/config_cpu_core_strategy_spec.rb
320
+ - spec/core/config_defaults_spec.rb
284
321
  - spec/core/config_mixin_spec.rb
285
322
  - spec/core/config_spec.rb
286
323
  - spec/core/environment_spec.rb
@@ -302,9 +339,11 @@ test_files:
302
339
  - spec/spec_helper.rb
303
340
  - spec/util/accessors_spec.rb
304
341
  - spec/util/charset_spec.rb
342
+ - spec/util/defaults_printer_spec.rb
305
343
  - spec/util/gemfile_spec.rb
306
344
  - spec/util/java_version_spec.rb
307
345
  - spec/util/json_spec.rb
308
346
  - spec/util/plugin_version_spec.rb
309
347
  - spec/util/unicode_trimmer_spec.rb
348
+ - spec/util/worker_threads_default_printer_spec.rb
310
349
  - spec/util_spec.rb
@@ -1,53 +0,0 @@
1
- # encoding: utf-8
2
- require "logstash/namespace"
3
- require "cabin"
4
-
5
- class LogStash::MultiQueue
6
- attr_accessor :logger
7
-
8
- public
9
- def initialize(*queues)
10
- @logger = Cabin::Channel.get(LogStash)
11
- @mutex = Mutex.new
12
- @queues = queues
13
- end # def initialize
14
-
15
- public
16
- def logger=(_logger)
17
- @logger = _logger
18
-
19
- # Set the logger for all known queues, too.
20
- @queues.each do |q|
21
- q.logger = _logger
22
- end
23
- end # def logger=
24
-
25
- # Push an object to all queues.
26
- public
27
- def push(object)
28
- @queues.each { |q| q.push(object) }
29
- end # def push
30
- alias :<< :push
31
-
32
- alias_method :<<, :push
33
-
34
- # Add a new Queue to this queue.
35
- public
36
- def add_queue(queue)
37
- @mutex.synchronize do
38
- @queues << queue
39
- end
40
- end # def add_queue
41
-
42
- public
43
- def remove_queue(queue)
44
- @mutex.synchronize do
45
- @queues.delete(queue)
46
- end
47
- end # def remove_queue
48
-
49
- public
50
- def size
51
- return @queues.collect { |q| q.size }
52
- end # def size
53
- end # class LogStash::MultiQueue
@@ -1,18 +0,0 @@
1
- # encoding: utf-8
2
- require "logstash/namespace"
3
- require "logstash/logging"
4
-
5
- module LogStash::Util::Require
6
- class << self
7
- attr_accessor :logger
8
-
9
- def require(lib, gemdep, message=nil)
10
- @logger ||= LogStash::Logger.new(STDERR)
11
- begin
12
- require lib
13
- rescue LoadError => e
14
- @logger.error("Failed loading '#{lib}'")
15
- end
16
- end # def require
17
- end # class << self
18
- end # def LogStash::Util::Require