xhummingbird 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/xhummingbird/rack/capture_exception.rb +20 -3
- data/lib/xhummingbird/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc55dc479a1ea3b8fba17b4f2f38a493fe1c190160a004585bcbd785fb0c9d21
|
4
|
+
data.tar.gz: a45754510d4490b253aeb9daec6360c37d52b662504a953a8bbb946fe134e191
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50f009f45946de188c80ba59e682a3d17496d3921192bc28432cc8f911a53f752ea1aaa1bae4864f4f2605f55a4628fab6bc39b87b0a447e21843bbd0f5f5bc7
|
7
|
+
data.tar.gz: 153ac10ec24214bc7edbcb70fa369cf905a6aaa2c29c547cd34a83014033798998d3401d11359344d543666297b49ab656e09dbb00a00b61eb4b81eea59758dc
|
data/Gemfile.lock
CHANGED
@@ -1,13 +1,28 @@
|
|
1
1
|
module Xhummingbird
|
2
2
|
module Rack
|
3
3
|
class CaptureException
|
4
|
+
CONVERT_KEYS = Set.new(%w(
|
5
|
+
REQUEST_METHOD
|
6
|
+
SCRIPT_NAME
|
7
|
+
PATH_INFO
|
8
|
+
QUERY_STRING
|
9
|
+
SERVER_NAME
|
10
|
+
SERVER_PORT
|
11
|
+
rack.version
|
12
|
+
rack.url_scheme
|
13
|
+
rack.multithread
|
14
|
+
rack.multiprocess
|
15
|
+
rack.run_once
|
16
|
+
rack.hijack?
|
17
|
+
))
|
18
|
+
|
19
|
+
HTTP_HEADER_PREFIX = 'HTTP_'
|
20
|
+
|
4
21
|
def initialize(app)
|
5
22
|
@app = app
|
6
23
|
end
|
7
24
|
|
8
25
|
def call(env)
|
9
|
-
p env
|
10
|
-
|
11
26
|
begin
|
12
27
|
response = @app.call(env)
|
13
28
|
rescue => e
|
@@ -27,7 +42,9 @@ module Xhummingbird
|
|
27
42
|
tags = {}
|
28
43
|
|
29
44
|
env.each do |k, v|
|
30
|
-
|
45
|
+
if CONVERT_KEYS.include?(k) || k.start_with?(HTTP_HEADER_PREFIX)
|
46
|
+
tags["rack_env/" + k.to_s] = v.to_s rescue nil
|
47
|
+
end
|
31
48
|
end
|
32
49
|
|
33
50
|
tags
|
data/lib/xhummingbird/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xhummingbird
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xmisao
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi-rzmq
|