Skip to content

Commit c9fe9af

Browse files
committed
Fix the description with the documentation generator
Make sure we ignore the patched classes and fix an issue with the rspec suite. Fixes logstash-plugins#154
1 parent 564ca3d commit c9fe9af

File tree

5 files changed

+23
-18
lines changed

5 files changed

+23
-18
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.0.1
2+
- Docs: Fix the description with the logstash documentation generator
3+
- Fix an issue with the rspec suite not finding log4j
4+
15
## 4.0.0
26
- Breaking: `ignore_older` settings is disabled by default. Previously if the file was older than
37
24 hours (the default for ignore_older), it would be ignored. This confused new users a lot, specially

lib/logstash/inputs/file.rb

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
require "pathname"
77
require "socket" # for Socket.gethostname
88
require "fileutils"
9+
require_relative "file/patch"
910

1011
# Stream events from files, normally by tailing them in a manner
1112
# similar to `tail -0F` but optionally reading them from the
@@ -77,21 +78,6 @@
7778
# determined by the `stat_interval` and `discover_interval` options)
7879
# will not get picked up.
7980

80-
class LogStash::Codecs::Base
81-
# TODO - move this to core
82-
if !method_defined?(:accept)
83-
def accept(listener)
84-
decode(listener.data) do |event|
85-
listener.process_event(event)
86-
end
87-
end
88-
end
89-
if !method_defined?(:auto_flush)
90-
def auto_flush(*)
91-
end
92-
end
93-
end
94-
9581
class LogStash::Inputs::File < LogStash::Inputs::Base
9682
config_name "file"
9783

lib/logstash/inputs/file/patch.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# encoding: utf-8
2+
class LogStash::Codecs::Base
3+
# TODO - move this to core
4+
if !method_defined?(:accept)
5+
def accept(listener)
6+
decode(listener.data) do |event|
7+
listener.process_event(event)
8+
end
9+
end
10+
end
11+
if !method_defined?(:auto_flush)
12+
def auto_flush(*)
13+
end
14+
end
15+
end
16+

logstash-input-file.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Gem::Specification.new do |s|
22

33
s.name = 'logstash-input-file'
4-
s.version = '4.0.0'
4+
s.version = '4.0.1'
55
s.licenses = ['Apache License (2.0)']
66
s.summary = "Stream events from files."
77
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"

spec/inputs/file_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# encoding: utf-8
2-
3-
require "logstash/inputs/file"
42
require_relative "../spec_helper"
3+
require "logstash/inputs/file"
54
require "tempfile"
65
require "stud/temporary"
76
require "logstash/codecs/multiline"

0 commit comments

Comments
 (0)