eventhub-components 0.4.2 → 0.4.4
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 +9 -0
- data/README.md +14 -7
- data/eventhub-components.gemspec +0 -1
- data/lib/eventhub/components/version.rb +1 -1
- data/spec/components/multi_logger_spec.rb +1 -1
- metadata +5 -22
- 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: e961deea5a98fa7f2d7cae041784108d1d5f08f65d83365979a4ec1be67f48b1
|
|
4
|
+
data.tar.gz: fcce7e914d4234d82b31df32bfa36ecfba5461a3b2dd907b78349790aa106674
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86e476d1df6f15d9690726d9ae8d0e2418c7f2da7b81f556bfe96f5e0c3ae919e04a308b85a45d7592a8d72a90b523a95ecd3570b14b19a7b532e7ba7ac90e43
|
|
7
|
+
data.tar.gz: 41cad23831ab492399c9d262f02472d851a9e73c27e5f22050602ae4f4b011d08f2fd6f400d5c79bc42d335c2663ac64a36d4c9ae50b892893cfaac356bca983
|
|
@@ -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@v6
|
|
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@v6
|
|
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
|
|
data/eventhub-components.gemspec
CHANGED
|
@@ -16,7 +16,6 @@ Gem::Specification.new do |spec|
|
|
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
17
17
|
spec.require_paths = ["lib"]
|
|
18
18
|
|
|
19
|
-
spec.add_development_dependency "bundler", "~> 2.1"
|
|
20
19
|
spec.add_development_dependency "rake", "~> 13.2"
|
|
21
20
|
spec.add_development_dependency "rspec", "~> 3.13"
|
|
22
21
|
spec.add_development_dependency "standard", "~> 1.39"
|
|
@@ -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,29 +1,14 @@
|
|
|
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.4
|
|
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
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: bundler
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - "~>"
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '2.1'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - "~>"
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '2.1'
|
|
27
12
|
- !ruby/object:Gem::Dependency
|
|
28
13
|
name: rake
|
|
29
14
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -116,8 +101,8 @@ extensions: []
|
|
|
116
101
|
extra_rdoc_files: []
|
|
117
102
|
files:
|
|
118
103
|
- ".github/dependabot.yml"
|
|
119
|
-
- ".github/workflows/
|
|
120
|
-
- ".github/workflows/
|
|
104
|
+
- ".github/workflows/01_test.yml"
|
|
105
|
+
- ".github/workflows/02_release.yml"
|
|
121
106
|
- ".gitignore"
|
|
122
107
|
- CHANGELOG.md
|
|
123
108
|
- Gemfile
|
|
@@ -143,7 +128,6 @@ homepage: https://github.com/thomis/eventhub-components
|
|
|
143
128
|
licenses:
|
|
144
129
|
- MIT
|
|
145
130
|
metadata: {}
|
|
146
|
-
post_install_message:
|
|
147
131
|
rdoc_options: []
|
|
148
132
|
require_paths:
|
|
149
133
|
- lib
|
|
@@ -158,8 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
158
142
|
- !ruby/object:Gem::Version
|
|
159
143
|
version: '0'
|
|
160
144
|
requirements: []
|
|
161
|
-
rubygems_version: 3.
|
|
162
|
-
signing_key:
|
|
145
|
+
rubygems_version: 3.6.9
|
|
163
146
|
specification_version: 4
|
|
164
147
|
summary: Additional eventhub components
|
|
165
148
|
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
|