logstash-input-redis 3.1.1 → 3.1.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: ad182690a7770eae7aea96b3f317cebce6c2e6c7
4
- data.tar.gz: 228711379e887a580c9a999e0bb305fbc30d31ad
3
+ metadata.gz: b777765f982735709cf2e67c4ce6b642b92045d7
4
+ data.tar.gz: e042d3bacd003fb5ae8b8390bda58323a5d1a299
5
5
  SHA512:
6
- metadata.gz: b5d962d59198462557c536881b0b977dad979ba0a666cf1d2d5ee1a499e3812800c0be33bf94eaf35035f6f6fbc8abf253a41068459018cb20e743a09d020c07
7
- data.tar.gz: 6cbfbc1cbefd104c7574ef9a15e481f81a34539312f069c57d643f9b70a453a44fc2ae8221c53e9b43c522f05202a1a55536f89dcf8860a4b9bce5c662b7ae18
6
+ metadata.gz: 03ce249dd39dd6d5511fee10405ff570b2f8ed366fde799d7f46f4764beb9cb49f643dd8fb113adcdadd8c4c1071e091271e33ddb2c49cb4631406316a425fca
7
+ data.tar.gz: ef362960660c9ea2f8cba4db88186887db2372ee91b1ef8d6beba94c83190caad8548bd0e264f6525990d0b92b479b6809c58a23f346bd2f85bdb2d245bf1be6
@@ -1,3 +1,6 @@
1
+ ## 3.1.2
2
+ - use correct unsubscribe method for channel_listener data type
3
+
1
4
  ## 3.1.1
2
5
  - Relax constraint on logstash-core-plugin-api to >= 1.60 <= 2.99
3
6
 
@@ -237,7 +237,11 @@ EOF
237
237
  # if its a SubscribedClient then:
238
238
  # it does not have a disconnect method (yet)
239
239
  if @redis.client.is_a?(::Redis::SubscribedClient)
240
- @redis.client.unsubscribe
240
+ if @data_type == 'pattern_channel'
241
+ @redis.client.punsubscribe
242
+ else
243
+ @redis.client.unsubscribe
244
+ end
241
245
  else
242
246
  @redis.client.disconnect
243
247
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-redis'
4
- s.version = '3.1.1'
4
+ s.version = '3.1.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This input will read events from a Redis instance"
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/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -240,7 +240,8 @@ describe LogStash::Inputs::Redis do
240
240
  allow(connection).to receive(:is_a?).and_return(true)
241
241
  allow(redis).to receive(:client).and_return(connection)
242
242
  expect(redis).to receive(:connected?).and_return(connected.last)
243
- expect(connection).to receive(:unsubscribe)
243
+ allow(connection).to receive(:unsubscribe)
244
+ allow(connection).to receive(:punsubscribe)
244
245
 
245
246
  quit_calls.each do |call|
246
247
  expect(redis).to receive(call).at_most(:once)
@@ -303,8 +304,14 @@ describe LogStash::Inputs::Redis do
303
304
  end
304
305
 
305
306
  describe LogStash::Inputs::Redis do
306
- it_behaves_like "an interruptible input plugin" do
307
- let(:config) { {'key' => 'foo', 'data_type' => 'list'} }
307
+ context "when using data type" do
308
+ ["list", "channel", "pattern_channel"].each do |data_type|
309
+ context data_type do
310
+ it_behaves_like "an interruptible input plugin" do
311
+ let(:config) { {'key' => 'foo', 'data_type' => data_type } }
312
+ end
313
+ end
314
+ end
308
315
  end
309
316
  end
310
317
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-14 00:00:00.000000000 Z
11
+ date: 2017-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.6.3
112
+ rubygems_version: 2.4.8
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: This input will read events from a Redis instance