heavylog 0.0.2 → 0.0.3
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/heavylog/middleware.rb +7 -3
- data/lib/heavylog/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: 8872dcaaefbb55867290568ffed959a7f4e65b172b8bc659ddebf98cb8bcd873
|
4
|
+
data.tar.gz: 447248913054f99cc01d41279451511c2e429ad184a2596c58b0c63bf9ce6a8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9142d408f04c83e4db46c10ef74855d99441ef44ba311bc0733d8cf98dc61e5b6b14af2b5f61b3d023e20f93f09c07640ede0950d808739a0b4e6229774e0e5
|
7
|
+
data.tar.gz: '08874992fbd158abdbc0cb7cb3c2046786d3153aa09ffe246dba77c0f79d5cfda2d579136adf15a8a46362214959c48f53a1897f4317d9a299641a0d79512d4b'
|
data/Gemfile.lock
CHANGED
data/lib/heavylog/middleware.rb
CHANGED
@@ -5,15 +5,19 @@ module Heavylog
|
|
5
5
|
class Middleware
|
6
6
|
def initialize(app)
|
7
7
|
@app = app
|
8
|
+
@assets_regex = %r(\A/{0,2}#{::Rails.application.config.assets.prefix})
|
8
9
|
end
|
9
10
|
|
10
11
|
def call(env)
|
11
|
-
|
12
|
-
|
12
|
+
ignore = env['PATH_INFO'] =~ @assets_regex
|
13
|
+
if !ignore
|
14
|
+
request = ActionDispatch::Request.new(env)
|
15
|
+
RequestStore.store[:heavylog_request_id] = request.uuid
|
16
|
+
end
|
13
17
|
|
14
18
|
@app.call(env)
|
15
19
|
ensure
|
16
|
-
Heavylog.finish
|
20
|
+
Heavylog.finish if !ignore
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
data/lib/heavylog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heavylog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kristjan Rang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|