logtail-rack 0.1.6 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +51 -9
- data/README.md +1 -0
- data/lib/logtail-rack/http_context.rb +3 -2
- data/lib/logtail-rack/user_context.rb +5 -3
- data/lib/logtail-rack/version.rb +1 -1
- data/logtail-ruby-rack.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73931379e41a5b92e72919963376a2f6b6b8ec06871b9a410bc6c8339228387d
|
4
|
+
data.tar.gz: 01b32fd44ea670b47d5d7340a8c02c1305b203332f298818dff9ec68058e79e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02f9dcd2e699b1c52d9f31265bb1f77f057c8e63bab5d2e87475e7b22823a16723ef3b69e5cd99827b1d9bdf0a27db35ba7f7c3a1b7656e099a60171a0c1476d
|
7
|
+
data.tar.gz: 4e2a9cbb7b647f1ef6574ecea49db83616e7ea9082dec902c5bba980aaebc14a5cefa325ade3ed3a4d3085aba2c07610f8469b362560f94a5ef3bea6248e77f4
|
data/.github/workflows/main.yml
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
name: build
|
2
2
|
|
3
|
-
on:
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
schedule:
|
6
|
+
- cron: '20 5 * * 1'
|
7
|
+
workflow_dispatch:
|
4
8
|
|
5
9
|
jobs:
|
6
10
|
test:
|
@@ -8,17 +12,51 @@ jobs:
|
|
8
12
|
runs-on: ubuntu-20.04
|
9
13
|
|
10
14
|
strategy:
|
15
|
+
fail-fast: false
|
11
16
|
matrix:
|
12
17
|
ruby-version:
|
13
|
-
- 3.
|
14
|
-
-
|
15
|
-
-
|
16
|
-
- 2.
|
17
|
-
- 2.
|
18
|
-
- 2.
|
19
|
-
- 2.
|
18
|
+
- 3.2
|
19
|
+
- 3.1
|
20
|
+
- 3.0
|
21
|
+
- 2.7
|
22
|
+
- 2.6
|
23
|
+
- 2.5
|
24
|
+
- 2.4
|
25
|
+
- 2.3
|
26
|
+
- 2.2
|
27
|
+
- jruby-9.4.3.0
|
20
28
|
- jruby-9.2.14.0
|
21
|
-
- truffleruby-
|
29
|
+
- truffleruby-23.0.0
|
30
|
+
- truffleruby-22.1.0
|
31
|
+
rack-version:
|
32
|
+
- # default Rack version
|
33
|
+
|
34
|
+
include:
|
35
|
+
- ruby-version: 2.7
|
36
|
+
rack-version: ~>1.2.0
|
37
|
+
- ruby-version: 2.7
|
38
|
+
rack-version: ~>1.2
|
39
|
+
- ruby-version: 2.7
|
40
|
+
rack-version: ~>2.0.0
|
41
|
+
- ruby-version: 2.7
|
42
|
+
rack-version: ~>2.0
|
43
|
+
- ruby-version: 2.7
|
44
|
+
rack-version: ~>3.0
|
45
|
+
- ruby-version: 2.7
|
46
|
+
rack-version: ~>3.0.0
|
47
|
+
|
48
|
+
- ruby-version: 3.2
|
49
|
+
rack-version: ~>1.2.0
|
50
|
+
- ruby-version: 3.2
|
51
|
+
rack-version: ~>1.2
|
52
|
+
- ruby-version: 3.2
|
53
|
+
rack-version: ~>2.0.0
|
54
|
+
- ruby-version: 3.2
|
55
|
+
rack-version: ~>2.0
|
56
|
+
- ruby-version: 3.2
|
57
|
+
rack-version: ~>3.0
|
58
|
+
- ruby-version: 3.2
|
59
|
+
rack-version: ~>3.0.0
|
22
60
|
|
23
61
|
steps:
|
24
62
|
- uses: actions/checkout@v2
|
@@ -29,5 +67,9 @@ jobs:
|
|
29
67
|
ruby-version: ${{ matrix.ruby-version }}
|
30
68
|
bundler-cache: true
|
31
69
|
|
70
|
+
- name: Specify "rack" gem version ${{ matrix.rack-version }}
|
71
|
+
if: ${{ matrix.rack-version }}
|
72
|
+
run: bundle add rack --version="${{ matrix.rack-version }}"
|
73
|
+
|
32
74
|
- name: Run tests
|
33
75
|
run: bundle exec rspec --format documentation
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# 🪵 Logtail Integration For Rack
|
2
2
|
|
3
3
|
[![ISC License](https://img.shields.io/badge/license-ISC-ff69b4.svg)](LICENSE.md)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/logtail-rack.svg)](https://badge.fury.io/rb/logtail-rack)
|
4
5
|
[![Build Status](https://github.com/logtail/logtail-ruby-rack/workflows/build/badge.svg)](https://github.com/logtail/logtail-ruby-rack/actions?query=workflow%3Abuild)
|
5
6
|
|
6
7
|
This library integrates the [`logtail` Ruby library](https://github.com/logtail/logtail-ruby) with the [rack](https://github.com/rack/rack) framework,
|
@@ -67,10 +67,12 @@ module Logtail
|
|
67
67
|
def call(env)
|
68
68
|
user_hash = get_user_hash(env)
|
69
69
|
if user_hash
|
70
|
-
CurrentContext.
|
70
|
+
CurrentContext.with({user: user_hash}) do
|
71
|
+
@app.call(env)
|
72
|
+
end
|
73
|
+
else
|
74
|
+
@app.call(env)
|
71
75
|
end
|
72
|
-
|
73
|
-
@app.call(env)
|
74
76
|
end
|
75
77
|
|
76
78
|
private
|
data/lib/logtail-rack/version.rb
CHANGED
data/logtail-ruby-rack.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.require_paths = ["lib"]
|
29
29
|
|
30
30
|
spec.add_dependency "logtail", "~> 0.1"
|
31
|
-
spec.add_runtime_dependency "rack", ">= 1.2", "<
|
31
|
+
spec.add_runtime_dependency "rack", ">= 1.2", "< 4.0"
|
32
32
|
|
33
33
|
spec.add_development_dependency "bundler", ">= 0.0"
|
34
34
|
spec.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logtail-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Logtail
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logtail
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: '1.2'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
36
|
+
version: '4.0'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '1.2'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '4.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
|
-
rubygems_version: 3.
|
139
|
+
rubygems_version: 3.3.7
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Logtail integration for Rack
|