meta_request 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/meta_request/app_notifications.rb +20 -9
- data/lib/meta_request/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: 184437fd6ea42cfd3276c87c21442aa47263b87f
|
4
|
+
data.tar.gz: 599aece8423f131b32b7da83c0e2ec7253abfe9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb35b8df716f3f84501d05e3dc51e831ac0bf915a07521236a9938baeb0be9d99499da9ff9d2e8382e6f60c2ecf7aca872d43d1f3f4e580188330ceb717daaff
|
7
|
+
data.tar.gz: 2ffdf7da526cfa5a1be4a68c52affbaea939961be31afbcf4725840dac7b645fb84b59ace8b0e6ad0829b95036ad3a89135ee60c4e1b873d829f76e737880310
|
@@ -32,20 +32,31 @@ module MetaRequest
|
|
32
32
|
|
33
33
|
Event.new(name, start, ending, transaction_id, payload)
|
34
34
|
}
|
35
|
+
|
36
|
+
# sql processing block - used for sql.active_record and sql.sequel
|
37
|
+
|
38
|
+
# HACK: we hardcode the event name to 'sql.active_record' so that the ui will
|
39
|
+
# display sequel events without modification. otherwise the ui would need to
|
40
|
+
# be modified to support a sequel tab (or to change the display name on the
|
41
|
+
# active_record tab when necessary - which maybe makes more sense?)
|
42
|
+
SQL_EVENT_NAME = "sql.active_record"
|
43
|
+
|
44
|
+
SQL_BLOCK = Proc.new {|*args|
|
45
|
+
name, start, ending, transaction_id, payload = args
|
46
|
+
dev_caller = caller.detect { |c| c.include? MetaRequest.rails_root }
|
47
|
+
if dev_caller
|
48
|
+
c = Callsite.parse(dev_caller)
|
49
|
+
payload.merge!(:line => c.line, :filename => c.filename, :method => c.method)
|
50
|
+
end
|
51
|
+
Event.new(SQL_EVENT_NAME, start, ending, transaction_id, payload)
|
52
|
+
}
|
35
53
|
# Subscribe to all events relevant to RailsPanel
|
36
54
|
#
|
37
55
|
def self.subscribe
|
38
56
|
new.
|
39
57
|
subscribe("meta_request.log").
|
40
|
-
subscribe("sql.active_record")
|
41
|
-
|
42
|
-
dev_caller = caller.detect { |c| c.include? MetaRequest.rails_root }
|
43
|
-
if dev_caller
|
44
|
-
c = Callsite.parse(dev_caller)
|
45
|
-
payload.merge!(:line => c.line, :filename => c.filename, :method => c.method)
|
46
|
-
end
|
47
|
-
Event.new(name, start, ending, transaction_id, payload)
|
48
|
-
end.
|
58
|
+
subscribe("sql.active_record", &SQL_BLOCK).
|
59
|
+
subscribe("sql.sequel", &SQL_BLOCK).
|
49
60
|
subscribe("render_partial.action_view").
|
50
61
|
subscribe("render_template.action_view").
|
51
62
|
subscribe("process_action.action_controller.exception").
|
data/lib/meta_request/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta_request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dejan Simic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.6.
|
112
|
+
rubygems_version: 2.6.14
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: Request your Rails request
|