analytics-psw 0.3.5 → 0.3.6
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 +8 -8
- data/lib/analytics-psw/rails/request_logging.rb +28 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NGM5OTI5NGUxZjBiNWFmY2FkNWQ5OWMyMDIzNzE4MDIyZDcwOGQzOQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
NGE5ZWM5MWE2YmEzODdiOGJlMDAzYzU2NzNkNjk3MGQ3MjNjMDQ5Yg==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
ZTYyN2ZkM2ZiNjhjNDZjMGFiNmU3ZGU5YTVjZjdiZjg0Y2QxMjI1NDgxMTIy
|
|
10
|
+
MjA0MWY2NWRjN2VkMmJkNjJkODRhZjkwMjRiMjNjNDUwNzgyMTdlNTY3YzMz
|
|
11
|
+
MjI2MjJlY2JmODZmMmIwNzViY2ViOWM0NDIyMWZiYjE1ZTg0Y2Q=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
OTk1ZTlhYjJmYjkwMTQxNjQzZTFmY2MzNTY1MWU5OGY2ZmRiYjQwOTk0Y2Y2
|
|
14
|
+
ZWUyMWU2OTgwZmVhMmMxZDc0ZjUzMzM5NjhjMDIxNzlhZTU2OWRjZTA0YWI5
|
|
15
|
+
OGIwZDIwMDViMzgxNGE3MzdhNzJjZTFiNjA1ZDgyMmYyMmRmZTE=
|
|
@@ -39,8 +39,35 @@ module AnalyticsPSW::Rails
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
def log_request_route_params
|
|
43
|
+
{ canonical_request_path: canonical_request_path }
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def canonical_request_path
|
|
47
|
+
return nil unless defined?(Rails)
|
|
48
|
+
|
|
49
|
+
Rails.application.routes.router.recognize(request) do |route, _|
|
|
50
|
+
return route.path.spec.to_s
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def log_request_response_code
|
|
55
|
+
response.code
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def log_request_response_params
|
|
59
|
+
{ 'response_code' => log_request_response_code }
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def log_request_available_params
|
|
63
|
+
params
|
|
64
|
+
.merge(log_request_header_params)
|
|
65
|
+
.merge(log_request_route_params)
|
|
66
|
+
.merge(log_request_response_params)
|
|
67
|
+
end
|
|
68
|
+
|
|
42
69
|
def log_request_params
|
|
43
|
-
|
|
70
|
+
log_request_available_params.select do |k|
|
|
44
71
|
analytics_dimensions.include?(k.to_s)
|
|
45
72
|
end
|
|
46
73
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: analytics-psw
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lexmark International Technology S.A
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-05-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|