immunio 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/immunio/context.rb +12 -6
- data/lib/immunio/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 707599380d8fefd64b7025d8529745af7ed07df2
|
4
|
+
data.tar.gz: 294b3c9d179e6943f88f3d7b8a0db6d72c3fd1bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c8b6e5455a9806041a0049414561ee8e70161cd85f64ab7c0041cdd82cf70350a85ec83ab0a62a3d58c038dd530ebd36ca446afc09d290f64609d4d14d080f2
|
7
|
+
data.tar.gz: cff8a8c2d49cff6bdf635918fa94dca3fe4db3ed70d02fc937c914f1420050dfebe58bc12b515fe5dcd449eb8a87b098c482d914c9e2048e1d6a327aaa1d694e
|
data/lib/immunio/context.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
module Immunio
|
2
2
|
module Context
|
3
|
-
RAILS_TEMPLATE_FILTER =
|
3
|
+
RAILS_TEMPLATE_FILTER = /(.*(_erb|_haml))__+\d+_\d+(.*)/
|
4
|
+
|
5
|
+
# https://github.com/rails/rails/blob/v3.2.21/activesupport/lib/active_support/callbacks.rb#L414
|
6
|
+
ACTIVESUPPORT_FILTER = /(.+)_run__\d+__(.+)__\d+__callbacks(.*)/
|
7
|
+
|
4
8
|
# Cache for contexts (named in tribute to our buddy Adam Back who invented proof of work)
|
5
9
|
@@hash_cache = {}
|
6
10
|
FILE_CHECKSUM_CACHE = Hash.new do |cache, filepath|
|
@@ -43,10 +47,12 @@ module Immunio
|
|
43
47
|
locations.each do |frame|
|
44
48
|
|
45
49
|
# Filter frame names from template rendering to remove generated random bits
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
+
template_match = RAILS_TEMPLATE_FILTER.match(frame[:label])
|
51
|
+
frame[:label] = template_match[1] + template_match[3] if template_match
|
52
|
+
|
53
|
+
# Filter frame names from activesupport generated callback methods
|
54
|
+
callback_match = ACTIVESUPPORT_FILTER.match(frame[:label])
|
55
|
+
frame[:label] = callback_match[1] + callback_match[2] + callback_match[3] if callback_match
|
50
56
|
|
51
57
|
# Reduce paths to be relative to root if possible, to allow
|
52
58
|
# relocation. If there's no rails root, or the path doesn't start with
|
@@ -113,7 +119,7 @@ module Immunio
|
|
113
119
|
end
|
114
120
|
|
115
121
|
# Mix in additional context data
|
116
|
-
|
122
|
+
if additional_data
|
117
123
|
if Immunio.agent.config.log_context_data
|
118
124
|
Immunio.logger.info {"Additional context data:\n#{additional_data}"}
|
119
125
|
end
|
data/lib/immunio/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: immunio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Immunio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -438,7 +438,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
438
438
|
version: '0'
|
439
439
|
requirements: []
|
440
440
|
rubyforge_project:
|
441
|
-
rubygems_version: 2.
|
441
|
+
rubygems_version: 2.5.1
|
442
442
|
signing_key:
|
443
443
|
specification_version: 4
|
444
444
|
summary: Immunio Ruby agent
|