plain_apm 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2950f7d2e02a813b67a5bfb4c2ff7cc522acb8770404e3ef3dcef4e13aa4c4c
4
- data.tar.gz: 4af16bf90b9904db8f5adf9efc6438aec2a6f31954a481f1a3384fbdadddf1d4
3
+ metadata.gz: bbc80ac73a8d6b499ba00f4ec728d83359225be1563dc81f61599b7c9dbdab9d
4
+ data.tar.gz: a885c23479749c60b4aa62df8e199bedfafd22190ab4578d5ee42cf2664b3cce
5
5
  SHA512:
6
- metadata.gz: 6ceba3781efda4b4b60dc66f85ed07a065b47c624d7c6da2fbd42d52bc525cf2b95204d9030aa6e5540e7f6e5e6112b387a40008b29c69236cedcbeb9ae62e69
7
- data.tar.gz: '08dcda87123a5e006442cfe574da4ee41c011a28880b559a19bb65871785eb06154ba19f86c00d159c7d0c3e40b22c9758b6a373150de1344a001062fab0cd96'
6
+ metadata.gz: f02c96c5f98ca5a2d8d36ba0c4c5e8454799572e0dcc455d940f5b73151346de21c767cdf6b20b1bc0f25140d404f535c71e40f7bdc296963b23020bc7b7f1c5
7
+ data.tar.gz: 2ed255c00a300a1b6f8de0a64947e354462fab28a254847bd86eed49f89632cf49a8e0d1935b71196b061dc8bef009b0153a1aa5a09cd634dd078e8fd2bdd343
@@ -125,8 +125,16 @@ module PlainApm
125
125
 
126
126
  def source_location(backtrace = nil)
127
127
  return if self.class.rails_root.nil?
128
- call = (backtrace || caller).find { |frame| frame.start_with?(self.class.rails_root) } || return
129
- call[(self.class.rails_root.size + 1)..-1]
128
+ root_length = self.class.rails_root.length
129
+
130
+ (backtrace || caller).each do |frame|
131
+ if frame.start_with?(self.class.rails_root)
132
+ path = frame[(root_length + 1)..-1]
133
+ return path if path.start_with?("app") || path.start_with?("lib")
134
+ end
135
+ end
136
+
137
+ nil
130
138
  end
131
139
 
132
140
  def self.included(other)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PlainApm
4
- VERSION = "0.9.3"
4
+ VERSION = "0.9.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plain_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - PlainAPM Team