logstash-output-google_cloud_storage 0.1.4 → 0.2.0
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 +3 -0
- data/NOTICE.TXT +5 -0
- data/README.md +1 -1
- data/lib/logstash/outputs/google_cloud_storage.rb +1 -1
- data/logstash-output-google_cloud_storage.gemspec +2 -1
- data/spec/outputs/google_cloud_storage_spec.rb +24 -1
- data/spec/spec_helper.rb +3 -0
- metadata +31 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32f7dc6159d5dbfadf2e3649935c8a4c41ef5389
|
4
|
+
data.tar.gz: 4b927b428f65ba804a860142438ce25aed117a27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98958cf40875a39bafbaf5bc67c182f2e2cc2c5c200a2692f795b497ed57b3cdddd88fa9426d733740442da4c0a794afd0eeea298b917783b76105b1b6fa0aff
|
7
|
+
data.tar.gz: 15f828bbc96b2cf54958b04048cbfb8e5a2bf51e9a53590ef3c3c820f031dc200f5466e41b68e7c12d0fb4d73abbfbacc8342d2621bb7d22e782d004ca764984
|
data/CHANGELOG.md
ADDED
data/NOTICE.TXT
ADDED
data/README.md
CHANGED
@@ -13,7 +13,7 @@ Logstash provides infrastructure to automatically generate documentation for thi
|
|
13
13
|
|
14
14
|
## Need Help?
|
15
15
|
|
16
|
-
Need help? Try #logstash on freenode IRC or the logstash
|
16
|
+
Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/logstash discussion forum.
|
17
17
|
|
18
18
|
## Developing
|
19
19
|
|
@@ -359,7 +359,7 @@ class LogStash::Outputs::GoogleCloudStorage < LogStash::Outputs::Base
|
|
359
359
|
@client = Google::APIClient.new(:application_name =>
|
360
360
|
'Logstash Google Cloud Storage output plugin',
|
361
361
|
:application_version => '0.1')
|
362
|
-
@storage = @client.discovered_api('storage', '
|
362
|
+
@storage = @client.discovered_api('storage', 'v1')
|
363
363
|
|
364
364
|
key = Google::APIClient::PKCS12.load_key(@key_path, @key_password)
|
365
365
|
service_account = Google::APIClient::JWTAsserter.new(@service_account,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-google_cloud_storage'
|
4
|
-
s.version = '0.
|
4
|
+
s.version = '0.2.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "plugin to upload log events to Google Cloud Storage (GCS)"
|
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/plugin install gemname. This gem is not a stand-alone program"
|
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
|
25
25
|
s.add_runtime_dependency 'stud'
|
26
26
|
s.add_runtime_dependency 'google-api-client'
|
27
|
+
s.add_runtime_dependency 'logstash-codec-plain'
|
27
28
|
|
28
29
|
s.add_development_dependency 'logstash-devutils'
|
29
30
|
end
|
@@ -1 +1,24 @@
|
|
1
|
-
|
1
|
+
# encoding: utf-8
|
2
|
+
require_relative "../spec_helper"
|
3
|
+
require "google/api_client"
|
4
|
+
|
5
|
+
describe LogStash::Outputs::GoogleCloudStorage do
|
6
|
+
|
7
|
+
let(:client) { double("google-client") }
|
8
|
+
let(:service_account) { double("service-account") }
|
9
|
+
let(:key) { "key" }
|
10
|
+
|
11
|
+
before(:each) do
|
12
|
+
allow(Google::APIClient).to receive(:new).and_return(client)
|
13
|
+
allow(client).to receive(:discovered_api).with("storage", "v1")
|
14
|
+
allow(Google::APIClient::PKCS12).to receive(:load_key).with("", "notasecret").and_return(key)
|
15
|
+
allow(Google::APIClient::JWTAsserter).to receive(:new).and_return(service_account)
|
16
|
+
allow(client).to receive(:authorization=)
|
17
|
+
allow(service_account).to receive(:authorize)
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should register without errors" do
|
21
|
+
plugin = LogStash::Plugin.lookup("output", "google_cloud_storage").new({"bucket" => "", "key_path" => "", "service_account" => ""})
|
22
|
+
expect { plugin.register }.to_not raise_error
|
23
|
+
end
|
24
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-google_cloud_storage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
|
14
|
+
name: logstash-core
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - '>='
|
17
18
|
- !ruby/object:Gem::Version
|
@@ -19,10 +20,7 @@ dependencies:
|
|
19
20
|
- - <
|
20
21
|
- !ruby/object:Gem::Version
|
21
22
|
version: 2.0.0
|
22
|
-
|
23
|
-
prerelease: false
|
24
|
-
type: :runtime
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirement: !ruby/object:Gem::Requirement
|
26
24
|
requirements:
|
27
25
|
- - '>='
|
28
26
|
- !ruby/object:Gem::Version
|
@@ -30,48 +28,64 @@ dependencies:
|
|
30
28
|
- - <
|
31
29
|
- !ruby/object:Gem::Version
|
32
30
|
version: 2.0.0
|
31
|
+
prerelease: false
|
32
|
+
type: :runtime
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
+
name: stud
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
34
40
|
requirement: !ruby/object:Gem::Requirement
|
35
41
|
requirements:
|
36
42
|
- - '>='
|
37
43
|
- !ruby/object:Gem::Version
|
38
44
|
version: '0'
|
39
|
-
name: stud
|
40
45
|
prerelease: false
|
41
46
|
type: :runtime
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: google-api-client
|
42
49
|
version_requirements: !ruby/object:Gem::Requirement
|
43
50
|
requirements:
|
44
51
|
- - '>='
|
45
52
|
- !ruby/object:Gem::Version
|
46
53
|
version: '0'
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
54
|
requirement: !ruby/object:Gem::Requirement
|
49
55
|
requirements:
|
50
56
|
- - '>='
|
51
57
|
- !ruby/object:Gem::Version
|
52
58
|
version: '0'
|
53
|
-
name: google-api-client
|
54
59
|
prerelease: false
|
55
60
|
type: :runtime
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: logstash-codec-plain
|
56
63
|
version_requirements: !ruby/object:Gem::Requirement
|
57
64
|
requirements:
|
58
65
|
- - '>='
|
59
66
|
- !ruby/object:Gem::Version
|
60
67
|
version: '0'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
68
|
requirement: !ruby/object:Gem::Requirement
|
63
69
|
requirements:
|
64
70
|
- - '>='
|
65
71
|
- !ruby/object:Gem::Version
|
66
72
|
version: '0'
|
67
|
-
name: logstash-devutils
|
68
73
|
prerelease: false
|
69
|
-
type: :
|
74
|
+
type: :runtime
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: logstash-devutils
|
70
77
|
version_requirements: !ruby/object:Gem::Requirement
|
71
78
|
requirements:
|
72
79
|
- - '>='
|
73
80
|
- !ruby/object:Gem::Version
|
74
81
|
version: '0'
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
prerelease: false
|
88
|
+
type: :development
|
75
89
|
description: This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program
|
76
90
|
email: info@elastic.co
|
77
91
|
executables: []
|
@@ -79,14 +93,17 @@ extensions: []
|
|
79
93
|
extra_rdoc_files: []
|
80
94
|
files:
|
81
95
|
- .gitignore
|
96
|
+
- CHANGELOG.md
|
82
97
|
- CONTRIBUTORS
|
83
98
|
- Gemfile
|
84
99
|
- LICENSE
|
100
|
+
- NOTICE.TXT
|
85
101
|
- README.md
|
86
102
|
- Rakefile
|
87
103
|
- lib/logstash/outputs/google_cloud_storage.rb
|
88
104
|
- logstash-output-google_cloud_storage.gemspec
|
89
105
|
- spec/outputs/google_cloud_storage_spec.rb
|
106
|
+
- spec/spec_helper.rb
|
90
107
|
homepage: http://www.elastic.co/guide/en/logstash/current/index.html
|
91
108
|
licenses:
|
92
109
|
- Apache License (2.0)
|
@@ -115,3 +132,4 @@ specification_version: 4
|
|
115
132
|
summary: plugin to upload log events to Google Cloud Storage (GCS)
|
116
133
|
test_files:
|
117
134
|
- spec/outputs/google_cloud_storage_spec.rb
|
135
|
+
- spec/spec_helper.rb
|