loggerstash 1.0.1 → 1.1.0

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: c4e961a1a3a243caad2487af5ef9d49ebe675d51cb85c54a615f40785ab8ad6c
4
- data.tar.gz: befa0f4bc820cfb8340ac034796f782c72d62205a504e4f41fb7fabdab93f2c5
3
+ metadata.gz: 2d39439e76c2953faa8dace7d2fe630d79f9e492ff206ebc1631417993fd191a
4
+ data.tar.gz: 0bf51ec28020039b3ae864a03be3403caa7c2d84c73b236f003184827c37a1c2
5
5
  SHA512:
6
- metadata.gz: f67b43b36d38f959b3ebe58fc60cee20ce077813458a8fffd720216e3af123c0df9d598c4aab222a44227272a0a2c43636b7efcd703c2286b2146b4b87e90992
7
- data.tar.gz: 5286e5307c1d7c552e08b6301e9d0ef98abd0fac340592bf1b221f7c8de73535d0b54628487bbff005ecd27cdd1501eecc15d72d5396384d3a402a8a33ff34db
6
+ metadata.gz: efe6185c0427be6761ae1661e64d288667d91e6cb00fa1fbb276d942216fdd7e14ada8d8122523b64c51d542ca8e26303b1ec94d3d978122ca452371b90d9e16
7
+ data.tar.gz: 393bfa2235d52e84fac15bab45229e80c9e5b3264e67d23078f09540a47343102d7c4e3e2cf87f7242d89d2e0bf5574e4b456f78cccde39cec7a74aae72c1da5
@@ -1,47 +1,50 @@
1
- ---
2
- name: Loggerstash Tests
1
+ name: CI
3
2
 
4
- "on":
3
+ on:
5
4
  pull_request:
6
5
  push:
7
6
  branches:
8
7
  - master
9
- tags:
10
- - v*
8
+ - main
11
9
 
12
10
  jobs:
13
11
  build:
14
12
  runs-on: ubuntu-latest
15
- name: Ruby ${{ matrix.ruby }}
13
+
16
14
  strategy:
17
15
  matrix:
18
- ruby: ["2.7", "2.6", "2.5"]
16
+ ruby:
17
+ - 2.5
18
+ - 2.6
19
+ - 2.7
20
+ - 3.0
21
+
19
22
  steps:
20
23
  - uses: actions/checkout@v2
21
- - uses: actions/setup-ruby@v1
24
+
25
+ - name: Setup ruby
26
+ uses: ruby/setup-ruby@v1
22
27
  with:
23
28
  ruby-version: ${{ matrix.ruby }}
24
- - name: Bundler cache
25
- uses: actions/cache@v2
26
- with:
27
- path: vendor/bundle
28
- key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
29
- restore-keys: |
30
- ${{ runner.os }}-${{ matrix.ruby }}-gems-
31
- - name: Setup gems
32
- run: |
33
- bundle config path vendor/bundle
34
- bundle install --jobs 4
29
+ bundler-cache: true
30
+
31
+ - name: Lint
32
+ run: bundle exec rubocop
33
+
35
34
  - name: Tests
36
- run: bundle exec rake
35
+ run: bundle exec rake test
37
36
 
38
37
  publish:
39
- if: contains(github.ref, 'refs/tags/v')
38
+ if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
40
39
  needs: build
41
40
  runs-on: ubuntu-latest
41
+
42
42
  steps:
43
43
  - uses: actions/checkout@v2
44
+
44
45
  - name: Release Gem
45
- uses: discourse/publish-rubygems-action@main
46
+ uses: discourse/publish-rubygems-action@v2-beta
46
47
  env:
47
- RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
48
+ RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
49
+ GIT_EMAIL: team@discourse.org
50
+ GIT_NAME: discoursebot
data/.gitignore CHANGED
@@ -1,11 +1,2 @@
1
1
  Gemfile.lock
2
- /pkg
3
- /doc
4
- /.yardoc
5
2
  /coverage
6
- /.bundle
7
- /tmp
8
- /.ruby-gemset
9
- /.ruby-version
10
-
11
- .rubocop-https---raw-githubusercontent-com-discourse-discourse-master--rubocop-yml
data/.rubocop.yml CHANGED
@@ -1,7 +1,2 @@
1
1
  inherit_gem:
2
2
  rubocop-discourse: default.yml
3
- inherit_mode:
4
- merge:
5
- - Exclude
6
- Layout/HashAlignment:
7
- Enabled: false
data/lib/loggerstash.rb CHANGED
@@ -165,9 +165,12 @@ class Loggerstash
165
165
  caller = caller_locations.find { |loc| ! [__FILE__, logger_filename].include? loc.absolute_path }
166
166
 
167
167
  {
168
- "@timestamp": t.utc.strftime("%FT%T.%NZ"),
169
- "@metadata": { event_type: "loggerstash" },
170
- message: m,
168
+ "@timestamp": t.utc.strftime("%FT%T.%NZ"),
169
+ "@metadata": { event_type: "loggerstash" },
170
+ ecs: {
171
+ version: "1.8"
172
+ },
173
+ message: m,
171
174
  log: {
172
175
  level: s.downcase,
173
176
  logger: "Loggerstash",
data/loggerstash.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "loggerstash"
5
5
 
6
- s.version = "1.0.1"
6
+ s.version = "1.1.0"
7
7
  s.platform = Gem::Platform::RUBY
8
8
 
9
9
  s.summary = "Monkeypatch Logger to send log entries to logstash"
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
 
20
20
  s.files = `git ls-files -z`.split("\0").reject { |f| f =~ /^(G|spec|Rakefile)/ }
21
21
 
22
- s.required_ruby_version = ">= 2.4.0"
22
+ s.required_ruby_version = ">= 2.5.0"
23
23
 
24
24
  s.add_runtime_dependency "logstash_writer", ">= 0.0.11"
25
25
 
@@ -27,10 +27,9 @@ Gem::Specification.new do |s|
27
27
  s.add_development_dependency 'guard-rspec'
28
28
  s.add_development_dependency 'guard-rubocop'
29
29
  s.add_development_dependency 'rack-test'
30
- s.add_development_dependency 'rake', "~> 12.0"
30
+ s.add_development_dependency 'rake', "~> 13.0"
31
31
  s.add_development_dependency 'redcarpet'
32
32
  s.add_development_dependency 'rspec'
33
- s.add_development_dependency 'rubocop'
34
33
  s.add_development_dependency 'rubocop-discourse'
35
34
  s.add_development_dependency 'simplecov'
36
35
  s.add_development_dependency 'yard'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loggerstash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Brown
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-25 00:00:00.000000000 Z
11
+ date: 2021-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash_writer
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '12.0'
89
+ version: '13.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '12.0'
96
+ version: '13.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: redcarpet
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -122,20 +122,6 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: rubocop
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: rubocop-discourse
141
127
  requirement: !ruby/object:Gem::Requirement
@@ -210,14 +196,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
210
196
  requirements:
211
197
  - - ">="
212
198
  - !ruby/object:Gem::Version
213
- version: 2.4.0
199
+ version: 2.5.0
214
200
  required_rubygems_version: !ruby/object:Gem::Requirement
215
201
  requirements:
216
202
  - - ">="
217
203
  - !ruby/object:Gem::Version
218
204
  version: '0'
219
205
  requirements: []
220
- rubygems_version: 3.0.3
206
+ rubygems_version: 3.1.4
221
207
  signing_key:
222
208
  specification_version: 4
223
209
  summary: Monkeypatch Logger to send log entries to logstash