heavylog 0.0.11 → 0.0.12

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: d50a4cf6a2a830246560d9056cb7080e589f9d44ce9d967aa3fed2b8496700cc
4
- data.tar.gz: 3dfa2b1adab89119540d01872f7fd5bf041abbc55c0f5c77582e2c2e13349fd5
3
+ metadata.gz: 21f4b1b26166476871d00ec5d76e5facacf0211ac267fbb7528f13a75161610c
4
+ data.tar.gz: 1903e371c6852afd8a9747115022eb20d9ccf4b52023e229bef95c5b5f0baab5
5
5
  SHA512:
6
- metadata.gz: e79e3f8fee96ba0e7f61895cd0f5778816272cabaff98143ba84ecdf954a4c628cc152f68d64d58cbc1ba34a0795a085bd5cf3f5e0b1777ddcc2cabcc0bc21a9
7
- data.tar.gz: e99fed2f79cd1d6545da888c53b5fa36b275e70854c5884661a1fea19d143eb7d40ed632e543b631920b2bcab1f05457c14b316c6788e634a03175bd4c8d3f35
6
+ metadata.gz: 1920fdd312b5af5d2ecdba7f1a33d8f2f3dab7cf8d9343f38a542905addcc4415376188b9bad73942c8635ea62ecde18e9510982a38add4296b47ed9fe17a9fa
7
+ data.tar.gz: f015a889219aa3aeba69985bedf3476f8e148ad318b31f3df0e43e97fc7f239eeb3d3b754b73675c4b9ac869d2b202cea920dcbe7ff8b5584a69170523f20876
@@ -6,11 +6,12 @@ module Heavylog
6
6
  class Middleware
7
7
  def initialize(app)
8
8
  @app = app
9
- @assets_regex = %r(\A/{0,2}#{::Rails.application.config.assets.prefix})
9
+ @sprockets = ::Rails.application.config.respond_to?(:assets)
10
+ @assets_regex = @sprockets ? %r(\A/{0,2}#{::Rails.application.config.assets.prefix}) : nil
10
11
  end
11
12
 
12
13
  def call(env)
13
- ignore = env["PATH_INFO"] =~ @assets_regex
14
+ ignore = @sprockets && env["PATH_INFO"] =~ @assets_regex
14
15
  unless ignore
15
16
  request = ActionDispatch::Request.new(env)
16
17
  RequestStore.store[:heavylog_request_id] = request.uuid
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Heavylog
4
- VERSION = "0.0.11"
4
+ VERSION = "0.0.12"
5
5
  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.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristjan Rang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-24 00:00:00.000000000 Z
11
+ date: 2019-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler