logstash-output-my-first-plugin 0.1.1.1 → 0.1.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
  SHA256:
3
- metadata.gz: 00f06ec0ce244b6c5727d3c37ad659ab4a0681c9ad24a2b11652ccab50317a04
4
- data.tar.gz: 93e5202b4dc03e988e7679a0966bd26eb4a1a66e46f6b56b0d2a15bde1749e55
3
+ metadata.gz: 9f4a87bb22a6bd812638ab7684a16432b3a6fdeac5ee16347ff320eb14e59908
4
+ data.tar.gz: a04b480cbce01746d8d1da60eb908043993abef5c66acec7caaaf2129268bff6
5
5
  SHA512:
6
- metadata.gz: 2a77f3e50e93c8199b6868c5d3d9f7685491aa5e10ec50ed3ff3e75354c306d8cc243709c648890b872a1ee9fb239f7b31dbd203309edfa5dc6b02c558ce87a7
7
- data.tar.gz: 9e97ea9a96a2e067ae29d1353879d34b4754077841657c948448ee88d23b6b6e1073f40ef37da14390b6bf502e45ca081001f8dc48cbdf3c84d7444ee1f9d0da
6
+ metadata.gz: a5428bb24a1ff625d67e6d04bce677d50a01b1299d5e84c0350304c24db84bb8ea753eaf9df13aae668db296d2c882903777af92ddbc3747f5e2422ffc1e1f81
7
+ data.tar.gz: 5fc23920bc10615654b068d286348f1390234baa9531c74ce445d650cd4e025e7318746591cc9e4f1170cdcf682cc6fdd2a9e461f37371393c59f229c8306104
data/README.md CHANGED
@@ -84,3 +84,13 @@ Programming is not a required skill. Whatever you've seen about open source and
84
84
  It is more important to the community that you are able to contribute.
85
85
 
86
86
  For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file.
87
+
88
+ ## memo
89
+
90
+ 現状(2021/10)は jruby:9.3系でrspec起動するとjopenssl/load のload errorがでるよう
91
+ 9.2系だといけそう
92
+ ```
93
+ docker run --rm -it -v $(pwd):$(pwd) -w $(pwd) jruby:9.2.13.0 bash
94
+ jruby -S bundle install
95
+ bundle exec rspec
96
+ ```
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-my-first-plugin'
3
- s.version = '0.1.1.1'
3
+ s.version = '0.1.1.2'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = 'Write a short summary, because Rubygems requires one.'
6
6
  s.description = 'Write a longer description or delete this line.'
@@ -6,13 +6,58 @@ require "logstash/event"
6
6
 
7
7
  describe LogStash::Outputs::MyFirstPlugin do
8
8
  let(:sample_event) { LogStash::Event.new }
9
- let(:output) { LogStash::Outputs::MyFirstPlugin.new }
9
+ let(:output) { LogStash::Outputs::MyFirstPlugin.new(options) }
10
10
 
11
- before do
12
- output.register
11
+ describe "required param" do
12
+ context 'param1 is missing' do
13
+ let(:options) {
14
+ {
15
+ 'param2' => 'param2_value',
16
+ }
17
+ }
18
+
19
+ it "error raised if param1 is missing" do
20
+ expect { output.register }.to raise_error(LogStash::ConfigurationError)
21
+ end
22
+ end
23
+
24
+ context 'param2 is missing' do
25
+ let(:options) {
26
+ {
27
+ 'param1' => 'param1_value',
28
+ }
29
+ }
30
+
31
+ it "error raised if param1 is missing" do
32
+ expect { output.register }.to raise_error(LogStash::ConfigurationError)
33
+ end
34
+ end
35
+
36
+ context 'all parameters exists' do
37
+ let(:options) {
38
+ {
39
+ 'param1' => 'param1_value',
40
+ 'param2' => 'param2_value',
41
+ }
42
+ }
43
+
44
+ it "error raised if param1 is missing" do
45
+ expect { output.register }.not_to raise_error(LogStash::ConfigurationError)
46
+ end
47
+ end
13
48
  end
14
49
 
15
50
  describe "receive message" do
51
+ let(:options) {
52
+ {
53
+ 'param1' => 'param1_value',
54
+ 'param2' => 'param2_value'
55
+ }
56
+ }
57
+ before do
58
+ output.register
59
+ end
60
+
16
61
  subject { output.receive(sample_event) }
17
62
 
18
63
  it "returns a string" do
metadata CHANGED
@@ -1,22 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-my-first-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.1
4
+ version: 0.1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2021-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: logstash-core-plugin-api
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
18
  version: '2.0'
19
+ name: logstash-core-plugin-api
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -25,12 +25,12 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: logstash-codec-plain
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
32
  version: '0'
33
+ name: logstash-codec-plain
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -39,12 +39,12 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: logstash-devutils
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - ">="
46
45
  - !ruby/object:Gem::Version
47
46
  version: '0'
47
+ name: logstash-devutils
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
@@ -73,7 +73,7 @@ licenses:
73
73
  metadata:
74
74
  logstash_plugin: 'true'
75
75
  logstash_group: output
76
- post_install_message:
76
+ post_install_message:
77
77
  rdoc_options: []
78
78
  require_paths:
79
79
  - lib
@@ -88,8 +88,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  requirements: []
91
- rubygems_version: 3.1.2
92
- signing_key:
91
+ rubygems_version: 3.0.6
92
+ signing_key:
93
93
  specification_version: 4
94
94
  summary: Write a short summary, because Rubygems requires one.
95
95
  test_files: