eventhub-components 0.4.2 → 0.4.3
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/.github/workflows/{ci.yml → 01_test.yml} +3 -15
- data/.github/workflows/02_release.yml +30 -0
- data/CHANGELOG.md +4 -0
- data/README.md +14 -7
- data/lib/eventhub/components/version.rb +1 -1
- data/spec/components/multi_logger_spec.rb +1 -1
- metadata +5 -8
- data/.github/workflows/cd.yml +0 -32
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb5b00303fcea1201868d26ebfceb0a152a61cb4427c1b29aeacc9046e93a26e
|
|
4
|
+
data.tar.gz: 6f84eba8c8bcb106a1b3eb8d224d1f8b8ba8350fed7159a32918489362ea4e83
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0b4918c974a11b1bdeb759461b05b99c74536982afb2022c4a2eae63ec5de20348ed600c1148f9d3e743a1382682b19e858b593911a36370fd97304459f3519
|
|
7
|
+
data.tar.gz: 7dc6a32571c37b1690dca3a26843f6148f8d8a756acb68004028571ea6557d133a2e990b6056410e51413b8f127bce8b68581b86bb00f04d8fb290bb99899557
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: 01 - Test
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
@@ -18,16 +18,14 @@ on:
|
|
|
18
18
|
jobs:
|
|
19
19
|
build:
|
|
20
20
|
runs-on: ubuntu-latest
|
|
21
|
-
env:
|
|
22
|
-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
|
23
21
|
strategy:
|
|
24
22
|
fail-fast: false
|
|
25
23
|
matrix:
|
|
26
|
-
ruby: [ '3.
|
|
24
|
+
ruby: [ '3.4', '3.3', '3.2']
|
|
27
25
|
|
|
28
26
|
name: Ruby ${{ matrix.ruby }}
|
|
29
27
|
steps:
|
|
30
|
-
- uses: actions/checkout@
|
|
28
|
+
- uses: actions/checkout@v5
|
|
31
29
|
|
|
32
30
|
- name: Set up Ruby
|
|
33
31
|
uses: ruby/setup-ruby@v1
|
|
@@ -37,16 +35,6 @@ jobs:
|
|
|
37
35
|
bundler-cache: true
|
|
38
36
|
cache-version: 1
|
|
39
37
|
|
|
40
|
-
- name: Code Climate setup test reporter
|
|
41
|
-
run: |
|
|
42
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
|
43
|
-
chmod +x ./cc-test-reporter
|
|
44
|
-
./cc-test-reporter before-build
|
|
45
|
-
|
|
46
38
|
- name: Run default task
|
|
47
39
|
run: |
|
|
48
40
|
bundle exec rake
|
|
49
|
-
|
|
50
|
-
- name: Code Climate publish test coverage
|
|
51
|
-
run: |
|
|
52
|
-
./cc-test-reporter after-build
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: 02 - Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
id-token: write
|
|
13
|
+
contents: write
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout current code
|
|
17
|
+
uses: actions/checkout@v5
|
|
18
|
+
|
|
19
|
+
- name: Set up Ruby
|
|
20
|
+
uses: ruby/setup-ruby@v1
|
|
21
|
+
with:
|
|
22
|
+
ruby-version: '3.4'
|
|
23
|
+
bundler-cache: true
|
|
24
|
+
cache-version: 1
|
|
25
|
+
|
|
26
|
+
- name: Build gem
|
|
27
|
+
run: gem build *.gemspec
|
|
28
|
+
|
|
29
|
+
- name: Push to Rubygems
|
|
30
|
+
uses: rubygems/release-gem@v1
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
[](https://badge.fury.io/rb/eventhub-components)
|
|
2
|
-
[](https://github.com/thomis/eventhub-components/actions/workflows/ci.yml)
|
|
2
|
+
[](https://github.com/thomis/eventhub-components/actions/workflows/01_test.yml)
|
|
3
|
+
[](https://github.com/thomis/eventhub-components/actions/workflows/02_release.yml)
|
|
5
4
|
|
|
6
5
|
# EventHub::Components
|
|
7
6
|
|
|
@@ -11,10 +10,13 @@ Incldues logging, exception writing and pid file facilities for event hub proces
|
|
|
11
10
|
|
|
12
11
|
Currently supported and tested ruby versions are:
|
|
13
12
|
|
|
14
|
-
- 3.
|
|
15
|
-
- 3.
|
|
16
|
-
- 3.
|
|
17
|
-
|
|
13
|
+
- 3.4 (EOL 2028-03-31)
|
|
14
|
+
- 3.3 (EOL 2027-03-31)
|
|
15
|
+
- 3.2 (EOL 2026-03-31)
|
|
16
|
+
|
|
17
|
+
Ruby versions not tested anymore:
|
|
18
|
+
- 3.1 (EOL 2025-03-31)
|
|
19
|
+
- 3.0 (EOL 2024-04-23)
|
|
18
20
|
|
|
19
21
|
## Installation
|
|
20
22
|
|
|
@@ -77,6 +79,11 @@ Helps writing exceptions and log messages to files. It creates
|
|
|
77
79
|
|
|
78
80
|
writer.write(e)
|
|
79
81
|
|
|
82
|
+
## Publishing
|
|
83
|
+
|
|
84
|
+
This project uses [Trusted Publishing](https://guides.rubygems.org/trusted-publishing/) to securely publish gems to RubyGems.org. Trusted Publishing eliminates the need for long-lived API tokens by using OpenID Connect (OIDC) to establish a trusted relationship between GitHub Actions and RubyGems.org.
|
|
85
|
+
|
|
86
|
+
With Trusted Publishing configured, gem releases are automatically published to RubyGems when the release workflow runs, providing a more secure and streamlined publishing process.
|
|
80
87
|
|
|
81
88
|
## Contributing
|
|
82
89
|
|
|
@@ -62,7 +62,7 @@ RSpec.describe EventHub::Components::StructuredDataLogger do
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
it "logs json to standard output" do
|
|
65
|
-
pattern = /\{"time":"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}\+\d{2}:\d{2}","msg":"hello","level":"(INFO|WARN|ERROR|DEBUG|FATAL)","host":"[
|
|
65
|
+
pattern = /\{"time":"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}\+\d{2}:\d{2}","msg":"hello","level":"(INFO|WARN|ERROR|DEBUG|FATAL)","host":"[^"]+","app":"processor","env":"development"\}/
|
|
66
66
|
|
|
67
67
|
logger.add_device(EventHub::Components::Logger.logstash_cloud("processor", "development"))
|
|
68
68
|
expect { logger.info("hello") }.to output(pattern).to_stdout_from_any_process
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eventhub-components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Steiner, Thomas
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bundler
|
|
@@ -116,8 +115,8 @@ extensions: []
|
|
|
116
115
|
extra_rdoc_files: []
|
|
117
116
|
files:
|
|
118
117
|
- ".github/dependabot.yml"
|
|
119
|
-
- ".github/workflows/
|
|
120
|
-
- ".github/workflows/
|
|
118
|
+
- ".github/workflows/01_test.yml"
|
|
119
|
+
- ".github/workflows/02_release.yml"
|
|
121
120
|
- ".gitignore"
|
|
122
121
|
- CHANGELOG.md
|
|
123
122
|
- Gemfile
|
|
@@ -143,7 +142,6 @@ homepage: https://github.com/thomis/eventhub-components
|
|
|
143
142
|
licenses:
|
|
144
143
|
- MIT
|
|
145
144
|
metadata: {}
|
|
146
|
-
post_install_message:
|
|
147
145
|
rdoc_options: []
|
|
148
146
|
require_paths:
|
|
149
147
|
- lib
|
|
@@ -158,8 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
158
156
|
- !ruby/object:Gem::Version
|
|
159
157
|
version: '0'
|
|
160
158
|
requirements: []
|
|
161
|
-
rubygems_version: 3.
|
|
162
|
-
signing_key:
|
|
159
|
+
rubygems_version: 3.6.9
|
|
163
160
|
specification_version: 4
|
|
164
161
|
summary: Additional eventhub components
|
|
165
162
|
test_files: []
|
data/.github/workflows/cd.yml
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
name: cd
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
|
|
8
|
-
build:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout current code
|
|
13
|
-
uses: actions/checkout@v4
|
|
14
|
-
|
|
15
|
-
- name: Set up Ruby
|
|
16
|
-
uses: ruby/setup-ruby@v1
|
|
17
|
-
with:
|
|
18
|
-
ruby-version: '3.3'
|
|
19
|
-
bundler-cache: true
|
|
20
|
-
cache-version: 1
|
|
21
|
-
|
|
22
|
-
- name: Push to Rubygems
|
|
23
|
-
env:
|
|
24
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
25
|
-
run: |
|
|
26
|
-
git config --global user.email "thomas.steiner@ikey.ch"
|
|
27
|
-
git config --global user.name "thomis"
|
|
28
|
-
mkdir ~/.gem
|
|
29
|
-
echo -e "---\n:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" > ~/.gem/credentials
|
|
30
|
-
chmod 600 ~/.gem/credentials
|
|
31
|
-
bundle exec rake release
|
|
32
|
-
rm ~/.gem/credentials
|