logstash-devutils 1.3.1-java → 1.3.2-java

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: 57d158a91b11f9927a34ec686fe46da74ee96a8e
4
- data.tar.gz: 4ab31ccffdae28e2cca029e1c14f95deab89ca10
3
+ metadata.gz: 94e7a4ae81d9897f6e2b46bebe3b043541741175
4
+ data.tar.gz: 9a41dcd17a2b7a3c59ff0b41162840e8b3f06f77
5
5
  SHA512:
6
- metadata.gz: 01879d12cc76f121e4579a3521d084f72147d64763cc55ac13ec1b8f194cc57879720ed43da31b985fef5d98664558da250bfb7ecf1d0eb4081ef7fe1f2a1cdc
7
- data.tar.gz: c56633b5f72ba3eec6137e24d124e2308c3912a6d4c91204f981c3b2099bbd326ae07cdb8e8d7ca343ac4f5eeecf0cc8a894f7289de2badf77c799cca80cfc30
6
+ metadata.gz: 997a8d17036247cad6be84b8fa4f1a40be275548fd927b37c0007926d635064ceac5d1a0f1274737af0e45d2d030953229073491e9059f3f170746fb486b277c
7
+ data.tar.gz: 4efc64e97c73211fe3c3effef9248da2be1cc83ee8bc0bc85bdf35b1bd910ae1341ac162ebcb562a867cf16562c995b81de31102d4b8d7bc06c904d9b022b24d
@@ -1,3 +1,6 @@
1
+ ## 1.3.2
2
+ - Make sample function with multiple pipelines - for compatibility with logstash-core 6.0
3
+
1
4
  ## 1.3.1
2
5
  - Close pipeline after #sample helper - for compatibility with logstash-core 5.3
3
6
 
@@ -36,7 +36,7 @@ module LogStashHelper
36
36
  name = name[0..50] + "..." if name.length > 50
37
37
 
38
38
  describe "\"#{name}\"" do
39
- let(:pipeline) { TestPipeline.new(config) }
39
+ let(:pipeline) { new_pipeline_from_string(config) }
40
40
  let(:event) do
41
41
  sample_event = [sample_event] unless sample_event.is_a?(Array)
42
42
  next sample_event.collect do |e|
@@ -112,11 +112,23 @@ module LogStashHelper
112
112
  def agent(&block)
113
113
 
114
114
  it("agent(#{caller[0].gsub(/ .*/, "")}) runs") do
115
- pipeline = LogStash::Pipeline.new(config)
115
+ pipeline = new_pipeline_from_string(config)
116
116
  pipeline.run
117
117
  block.call
118
118
  end
119
119
  end # def agent
120
120
 
121
+ def new_pipeline_from_string(string)
122
+ if TestPipeline.instance_methods.include?(:pipeline_config)
123
+ settings = ::LogStash::SETTINGS.clone
124
+
125
+ config_part = org.logstash.common.SourceWithMetadata.new("config_string", "config_string", string)
126
+
127
+ pipeline_config = LogStash::Config::PipelineConfig.new(LogStash::Config::Source::Local, :main, config_part, settings)
128
+ TestPipeline.new(pipeline_config)
129
+ else
130
+ TestPipeline.new(string)
131
+ end
132
+ end
121
133
  end # module LogStash
122
134
 
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
6
6
  files = %x{git ls-files}.split("\n")
7
7
 
8
8
  spec.name = "logstash-devutils"
9
- spec.version = "1.3.1"
9
+ spec.version = "1.3.2"
10
10
  spec.licenses = ["Apache License (2.0)"]
11
11
  spec.summary = "logstash-devutils"
12
12
  spec.description = "logstash-devutils"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-devutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-08 00:00:00.000000000 Z
11
+ date: 2017-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement