lib/logstash/outputs/s3/temporary_file_factory.rb in logstash-output-s3-4.3.7 vs lib/logstash/outputs/s3/temporary_file_factory.rb in logstash-output-s3-4.4.0
- old
+ new
@@ -17,13 +17,10 @@
#
# Since the UUID should be fairly unique I can destroy the whole path when an upload is complete.
# I do not have to mess around to check if the other directory have file in it before destroying them.
class TemporaryFileFactory
FILE_MODE = "a"
- GZIP_ENCODING = "gzip"
- GZIP_EXTENSION = "txt.gz"
- TXT_EXTENSION = "txt"
STRFTIME = "%Y-%m-%dT%H.%M"
attr_accessor :counter, :tags, :prefix, :encoding, :temporary_directory, :current
def initialize(prefix, tags, encoding, temporary_directory)
@@ -46,10 +43,10 @@
}
end
private
def extension
- gzip? ? GZIP_EXTENSION : TXT_EXTENSION
+ gzip? ? TemporaryFile.gzip_extension : TemporaryFile.text_extension
end
def gzip?
encoding == GZIP_ENCODING
end