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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f65df3243c6174d917b13395981eac25a835eff5a9a646ccb35b598a669f1141
4
- data.tar.gz: b06dc2293064ae86a433fc29a7947dd03b403cfa248d8b8e57280c146cca51b3
3
+ metadata.gz: 8872dcaaefbb55867290568ffed959a7f4e65b172b8bc659ddebf98cb8bcd873
4
+ data.tar.gz: 447248913054f99cc01d41279451511c2e429ad184a2596c58b0c63bf9ce6a8c
5
5
  SHA512:
6
- metadata.gz: 4fa777d8823ffb829c9b447e37efeae2034dedab05f3b7104057ce183ecf5d92acac833a01565825b1c28303c7e2360c62c938e01ceabbd6a7cb3780dbd92b95
7
- data.tar.gz: 1e2da843ff2352d326b311da106644c0a765233217a2798f2b929717369556ea57fb43602b2e463b9e3f5feea9861e18e5ac675542df47c53500d42acc529ff5
6
+ metadata.gz: a9142d408f04c83e4db46c10ef74855d99441ef44ba311bc0733d8cf98dc61e5b6b14af2b5f61b3d023e20f93f09c07640ede0950d808739a0b4e6229774e0e5
7
+ data.tar.gz: '08874992fbd158abdbc0cb7cb3c2046786d3153aa09ffe246dba77c0f79d5cfda2d579136adf15a8a46362214959c48f53a1897f4317d9a299641a0d79512d4b'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- heavylog (0.0.2)
4
+ heavylog (0.0.3)
5
5
  actionpack (>= 5)
6
6
  activesupport (>= 5)
7
7
  railties (>= 5)
@@ -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
- request = ActionDispatch::Request.new(env)
12
- RequestStore.store[:heavylog_request_id] = request.uuid
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
@@ -1,3 +1,3 @@
1
1
  module Heavylog
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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-01 00:00:00.000000000 Z
11
+ date: 2018-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler