logstash-input-google_cloud_storage 0.10.0-java → 0.11.1-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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/CONTRIBUTORS +1 -0
- data/lib/logstash/inputs/cloud_storage/file_reader.rb +3 -1
- data/logstash-input-google_cloud_storage.gemspec +3 -2
- data/spec/fixtures/gzip/simple.gz +0 -0
- data/spec/fixtures/gzip/simple.gz.log +2 -0
- data/spec/fixtures/gzip/simple.gzip +0 -0
- data/spec/fixtures/gzip/simple.log +2 -0
- data/spec/fixtures/gzip/simple.log.gz +0 -0
- data/spec/fixtures/gzip/simple.tgz +0 -0
- data/spec/fixtures/gzip/simpledir.gz/log +2 -0
- data/spec/fixtures/gzip/simplegz +0 -0
- data/spec/inputs/cloud_storage/file_reader_spec.rb +12 -11
- metadata +34 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c20c2d9f755771cdb30a741b03fcb29d11deeff6b075a568d97ccfe0e7881752
|
4
|
+
data.tar.gz: 6be0b906561133eb665431e33c2671c8406c77a77a898f9dbf3a6a908261982b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0082d0401dc705db1cd4d66d185e20ad97afb7371029100225d154f537441b0b6d8acc3fc2bdde14f498f0c843b016ae2777b95f528a89b91f243e84dfaa2df3'
|
7
|
+
data.tar.gz: f5f6161ad1dc40c5be341153118c2c1b52c91e8af3c3c221c9dc77fdddd911d14681aedcd30662a2f60030c78e5422e2a415dfb24a5df8d740221c774ecf6fd3
|
data/CHANGELOG.md
CHANGED
data/CONTRIBUTORS
CHANGED
@@ -4,6 +4,7 @@ reports, or in general have helped logstash along its way.
|
|
4
4
|
Contributors:
|
5
5
|
* Google LLC.
|
6
6
|
* Joseph Lewis III - jlewisiii@google.com
|
7
|
+
* Claus Strommer - Green Brick Labs
|
7
8
|
|
8
9
|
Note: If you've sent us patches, bug reports, or otherwise contributed to
|
9
10
|
Logstash, and you aren't on the list above and want to be, please let us know
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
require 'zlib'
|
4
|
+
require 'mimemagic'
|
4
5
|
|
5
6
|
module LogStash
|
6
7
|
module Inputs
|
@@ -22,7 +23,8 @@ module LogStash
|
|
22
23
|
|
23
24
|
# gzip? returns true if the given filename has a gzip file extension.
|
24
25
|
def self.gzip?(filename)
|
25
|
-
|
26
|
+
magic = MimeMagic.by_magic(::File.open(filename))
|
27
|
+
magic ? magic.subtype == "gzip" : false
|
26
28
|
end
|
27
29
|
|
28
30
|
def self.read_plain_lines(filename, &block)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-google_cloud_storage'
|
3
|
-
s.version = '0.
|
3
|
+
s.version = '0.11.1'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = 'Plugin to import log data from Google Cloud Storage (GCS).'
|
6
6
|
s.description = 'This gem is a Logstash plugin required to be installed on top of the '\
|
@@ -40,10 +40,11 @@ Gem::Specification.new do |s|
|
|
40
40
|
s.add_runtime_dependency 'logstash-codec-plain'
|
41
41
|
s.add_runtime_dependency 'logstash-core-plugin-api', '~> 2.0'
|
42
42
|
s.add_runtime_dependency 'stud', '>= 0.0.22'
|
43
|
+
s.add_runtime_dependency 'mimemagic', '>= 0.3.3'
|
43
44
|
|
44
45
|
s.add_development_dependency 'logstash-devutils', '>= 0.0.16'
|
45
46
|
|
46
47
|
# Java
|
47
|
-
s.add_development_dependency 'jar-dependencies', '~> 0.
|
48
|
+
s.add_development_dependency 'jar-dependencies', '~> 0.4.0'
|
48
49
|
s.platform = 'java'
|
49
50
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -8,18 +8,19 @@ describe LogStash::Inputs::CloudStorage::FileReader do
|
|
8
8
|
describe '#gzip?' do
|
9
9
|
GzipTest = Struct.new('GzipTest', :path, :expected)
|
10
10
|
|
11
|
-
it 'is true when the file
|
11
|
+
it 'is true when the file has .gz mimetype' do
|
12
12
|
cases = [
|
13
|
-
GzipTest.new('simple.gz', true),
|
14
|
-
GzipTest.new('
|
15
|
-
GzipTest.new('
|
16
|
-
GzipTest.new('
|
17
|
-
|
18
|
-
GzipTest.new('
|
19
|
-
|
20
|
-
GzipTest.new('simple.
|
21
|
-
GzipTest.new('
|
22
|
-
GzipTest.new('
|
13
|
+
GzipTest.new(::File.join('.', 'spec', 'fixtures', 'gzip', 'simple.gz'), true),
|
14
|
+
GzipTest.new(::File.join(::Dir.pwd, 'spec', 'fixtures', 'gzip', 'simple.gz'), true),
|
15
|
+
GzipTest.new(::File.join('.', 'spec', 'fixtures', 'gzip', 'simple.log.gz'), true),
|
16
|
+
GzipTest.new(::File.join('.', 'spec', 'fixtures', 'gzip', 'simple.gzip'), true),
|
17
|
+
GzipTest.new(::File.join('.', 'spec', 'fixtures', 'gzip', 'simplegz'), true),
|
18
|
+
GzipTest.new(::File.join('.', 'spec', 'fixtures', 'gzip', 'simple.tgz'), true),
|
19
|
+
|
20
|
+
GzipTest.new(::File.join('.', 'spec', 'fixtures', 'gzip', 'simple.log'), false),
|
21
|
+
GzipTest.new(::File.join('.', 'spec', 'fixtures', 'gzip', 'simpledir.gz/log'), false),
|
22
|
+
GzipTest.new(::File.join('.', 'spec', 'fixtures', 'gzip', 'simple.gz.log'), false),
|
23
|
+
GzipTest.new(::File.join('.', 'spec', 'fixtures', 'gzip', 'simple.log'), false),
|
23
24
|
]
|
24
25
|
|
25
26
|
cases.each do |test|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-google_cloud_storage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,6 +53,20 @@ dependencies:
|
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 0.0.22
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.3.3
|
62
|
+
name: mimemagic
|
63
|
+
prerelease: false
|
64
|
+
type: :runtime
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 0.3.3
|
56
70
|
- !ruby/object:Gem::Dependency
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
@@ -72,7 +86,7 @@ dependencies:
|
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
89
|
+
version: 0.4.0
|
76
90
|
name: jar-dependencies
|
77
91
|
prerelease: false
|
78
92
|
type: :development
|
@@ -80,7 +94,7 @@ dependencies:
|
|
80
94
|
requirements:
|
81
95
|
- - "~>"
|
82
96
|
- !ruby/object:Gem::Version
|
83
|
-
version: 0.
|
97
|
+
version: 0.4.0
|
84
98
|
description: This gem is a Logstash plugin required to be installed on top of the
|
85
99
|
Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
|
86
100
|
gem is not a stand-alone program
|
@@ -105,6 +119,14 @@ files:
|
|
105
119
|
- lib/logstash/inputs/google_cloud_storage.rb
|
106
120
|
- logstash-input-google_cloud_storage.gemspec
|
107
121
|
- spec/fixtures/credentials.json
|
122
|
+
- spec/fixtures/gzip/simple.gz
|
123
|
+
- spec/fixtures/gzip/simple.gz.log
|
124
|
+
- spec/fixtures/gzip/simple.gzip
|
125
|
+
- spec/fixtures/gzip/simple.log
|
126
|
+
- spec/fixtures/gzip/simple.log.gz
|
127
|
+
- spec/fixtures/gzip/simple.tgz
|
128
|
+
- spec/fixtures/gzip/simpledir.gz/log
|
129
|
+
- spec/fixtures/gzip/simplegz
|
108
130
|
- spec/fixtures/helloworld.log
|
109
131
|
- spec/fixtures/helloworld.log.gz
|
110
132
|
- spec/inputs/cloud_storage/blob_adapter_spec.rb
|
@@ -181,6 +203,14 @@ specification_version: 4
|
|
181
203
|
summary: Plugin to import log data from Google Cloud Storage (GCS).
|
182
204
|
test_files:
|
183
205
|
- spec/fixtures/credentials.json
|
206
|
+
- spec/fixtures/gzip/simple.gz
|
207
|
+
- spec/fixtures/gzip/simple.gz.log
|
208
|
+
- spec/fixtures/gzip/simple.gzip
|
209
|
+
- spec/fixtures/gzip/simple.log
|
210
|
+
- spec/fixtures/gzip/simple.log.gz
|
211
|
+
- spec/fixtures/gzip/simple.tgz
|
212
|
+
- spec/fixtures/gzip/simpledir.gz/log
|
213
|
+
- spec/fixtures/gzip/simplegz
|
184
214
|
- spec/fixtures/helloworld.log
|
185
215
|
- spec/fixtures/helloworld.log.gz
|
186
216
|
- spec/inputs/cloud_storage/blob_adapter_spec.rb
|