rorvswild 1.6.4 → 1.6.5

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: cd38e8268715a48ce8f49f648317660e41a512d80bb445d3f1ae7800ff13c7a8
4
- data.tar.gz: 310aac7f6ac148f387e03f690eb7b54bfe8d1a25a0f450ccfdb2ec21245b7d28
3
+ metadata.gz: 43d62b43885f0c12279773dc060954a30cfa80d0f19ca838398ba77c6b5b459b
4
+ data.tar.gz: fd61331e3b88e2b1b682b0ff227349a99a806eaacbc4b64ec7ea0e22b509ae65
5
5
  SHA512:
6
- metadata.gz: 4975dcbaaf1df79282ca4e46277c201bbb21443ab3f59a1c44f3bd96573ca8ed56a25c748f5bd29e38dbe154c11cdae475768229603c9da6e16c2b505bf972c0
7
- data.tar.gz: ff0593aa35f2e9352e66f87e9c0a8a6e2d99803b8740325755790b84eb5fc681646fa50f19935595d4534f513dc5113424326f4b180707d288467ff7d3be8293
6
+ metadata.gz: 8022d6596eab0d903c5f59b6632e2b15b3c4ad7720af47f0f490ba6bb1d70867f3bd1c9e6d022bce9472002482338c0432b8f85f248bba0a8d7168f3f385d30a
7
+ data.tar.gz: db65a5140351071e2ef1b668374372181d518848411fc379e46e4b1eb86ef01286dc643053728a317b3c6261e9ff07e8e5031f32f4a88d8077f62519febef46f
@@ -198,7 +198,7 @@ module RorVsWild
198
198
  {
199
199
  line: line.to_i,
200
200
  file: locator.relative_path(file),
201
- message: exception.message,
201
+ message: exception.message[0,1_000_000],
202
202
  backtrace: exception.backtrace || ["No backtrace"],
203
203
  exception: exception.class.to_s,
204
204
  context: context,
@@ -19,10 +19,11 @@ module RorVsWild
19
19
  return block.call if RorVsWild.agent.ignored_request?(controller_action)
20
20
  begin
21
21
  RorVsWild::Section.start do |section|
22
- method_name = controller.send(:method_for_action, controller.action_name)
23
- section.file, section.line = controller.method(method_name).source_location
24
- section.file = RorVsWild.agent.locator.relative_path(section.file)
25
- section.command = "#{controller.class}##{method_name}"
22
+ if method_name = controller.send(:method_for_action, controller.action_name)
23
+ section.file, section.line = controller.method(method_name).source_location
24
+ section.file = RorVsWild.agent.locator.relative_path(section.file)
25
+ section.command = "#{controller.class}##{method_name}"
26
+ end
26
27
  RorVsWild.agent.current_data[:name] = controller_action if RorVsWild.agent.current_data
27
28
  end
28
29
  block.call
@@ -3,14 +3,16 @@ module RorVsWild
3
3
  module DelayedJob
4
4
  def self.setup
5
5
  return if @installed
6
- return unless defined?(Delayed::Worker)
7
- Delayed::Worker.lifecycle.around(:invoke_job, &method(:around_perform))
6
+ return unless defined?(Delayed::Plugin)
7
+ Delayed::Worker.plugins << Class.new(Delayed::Plugin) do
8
+ callbacks do |lifecycle|
9
+ lifecycle.around(:invoke_job) do |job, *args, &block|
10
+ RorVsWild.agent.measure_job(job.name, parameters: job.payload_object) { block.call(job) }
11
+ end
12
+ end
13
+ end
8
14
  @installed = true
9
15
  end
10
-
11
- def self.around_perform(job, &block)
12
- RorVsWild.agent.measure_job(job.name, parameters: job.payload_object) { block.call(job) }
13
- end
14
16
  end
15
17
  end
16
18
  end
@@ -37,6 +37,7 @@ module RorVsWild
37
37
  location = RorVsWild.agent.locator.find_most_relevant_location(caller_locations)
38
38
  @file = RorVsWild.agent.locator.relative_path(location.path)
39
39
  @line = location.lineno
40
+ @command = nil
40
41
  @appendable_command = false
41
42
  end
42
43
 
@@ -1,3 +1,3 @@
1
1
  module RorVsWild
2
- VERSION = "1.6.4".freeze
2
+ VERSION = "1.6.5".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rorvswild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.4
4
+ version: 1.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexis Bernard
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-01-12 00:00:00.000000000 Z
12
+ date: 2024-04-18 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Performances and errors insights for rails developers.
15
15
  email: