rorvswild 1.5.9 → 1.5.10

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: 82e99bed32ec2670bc121da6de38cdfa320cf2d86f1e09004f08629eab6c0040
4
- data.tar.gz: d92ed6e8faa815ff9be3dd3d6ee8528a5c9b43824c803616c0106276111baf45
3
+ metadata.gz: f1e098cc5c0d18dcb26f720fc2be0927cf5cd06dad63098f7fd81a7ddd5a552c
4
+ data.tar.gz: 44eec8c8b452579850a97ce36c1365f75259cf2d29b407b5fb25a239ba46d58b
5
5
  SHA512:
6
- metadata.gz: 3b48fea4d285459afe675e47cde1a2ca2cd658f09dcc742b8f425e83dfa346714940688bbcbd83a356db24c154ea7bb15643b68e673714563a35261416cc6eec
7
- data.tar.gz: 3162a68b10887ea2733757f7bd7cf3edb8b76479e6f558ac2f096aa3e9225486350dca307c22611743448cc0801b0883c42b42b16f25cf6096e39586c6c34955
6
+ metadata.gz: b2b869f3ebee5a12e17e75d90c4ed26a1dd212b5fe414b3214895e4746e173f2bc72ac397af315bc0cc7445e0a4346db9b1f98aab5c4fa4a821b4f66e7e038e1
7
+ data.tar.gz: bde1938595d5353f9fb686fa7c6955f55ee4d4349184e4574da0f85e434ff363d52041323be8a5452064b4887ad8c600f44cc7c9e7e28e77afc5f35f4ad9c72c
data/README.md CHANGED
@@ -47,6 +47,8 @@ RorVsWild.start(api_key: API_KEY)
47
47
 
48
48
  You can create unlimited apps on *rorvswild.com*. If you want to monitor your staging environment, create a new app and edit your rorvswild.yml to add the API key.
49
49
 
50
+ In case there is no data in the dashboard, you can run in a rails console : `RorVsWild.check`.
51
+
50
52
  ## Development mode: *RoRvsWild Local*
51
53
 
52
54
  ![RoRvsWild Local](./images/rorvswild_local.jpg)
@@ -30,7 +30,7 @@ module RorVsWild
30
30
  @queue = config[:queue] || Queue.new(client)
31
31
  @locator = RorVsWild::Locator.new
32
32
 
33
- RorVsWild.logger.info("Start RorVsWild #{RorVsWild::VERSION}")
33
+ RorVsWild.logger.debug("Start RorVsWild #{RorVsWild::VERSION}")
34
34
  setup_plugins
35
35
  cleanup_data
36
36
  end
@@ -39,7 +39,7 @@ module RorVsWild
39
39
  for name in RorVsWild::Plugin.constants
40
40
  next if config[:ignore_plugins] && config[:ignore_plugins].include?(name.to_s)
41
41
  if (plugin = RorVsWild::Plugin.const_get(name)).respond_to?(:setup)
42
- RorVsWild.logger.info("Setup RorVsWild::Plugin::#{name}")
42
+ RorVsWild.logger.debug("Setup RorVsWild::Plugin::#{name}")
43
43
  plugin.setup
44
44
  end
45
45
  end
@@ -107,6 +107,7 @@ module RorVsWild
107
107
 
108
108
  def push_exception(exception, options = nil)
109
109
  return if ignored_exception?(exception)
110
+ return unless current_data
110
111
  current_data[:error] = exception_to_hash(exception)
111
112
  current_data[:error].merge!(options) if options
112
113
  current_data[:error]
@@ -12,7 +12,7 @@ module RorVsWild
12
12
  end
13
13
 
14
14
  def find_most_relevant_location(locations)
15
- locations.find { |l| relevant_path?(l.path) } || locations.find { |l| !irrelevant_path?(l.path) } || locations.first
15
+ locations.find { |l| relevant_path?(l.path) } || locations.find { |l| !l.path.start_with?(rorvswild_lib_path) } || locations.first
16
16
  end
17
17
 
18
18
  def find_most_relevant_file_and_line_from_exception(exception)
@@ -29,7 +29,7 @@ module RorVsWild
29
29
 
30
30
  def find_most_relevant_file_and_line_from_array_of_strings(stack)
31
31
  location = stack.find { |str| relevant_path?(str) }
32
- location ||= stack.find { |str| !irrelevant_path?(str) }
32
+ location ||= stack.find { |str| !str.start_with?(rorvswild_lib_path) }
33
33
  relative_path(location || stack.first).split(":".freeze)
34
34
  end
35
35
 
@@ -49,6 +49,10 @@ module RorVsWild
49
49
  @lib_paths ||= initialize_lib_paths
50
50
  end
51
51
 
52
+ def rorvswild_lib_path
53
+ @rorvswild_lib_path ||= File.dirname(File.expand_path(__FILE__))
54
+ end
55
+
52
56
  private
53
57
 
54
58
  def initialize_lib_paths
@@ -23,7 +23,7 @@ module RorVsWild
23
23
  section.file, section.line = controller.method(method_name).source_location
24
24
  section.file = RorVsWild.agent.locator.relative_path(section.file)
25
25
  section.command = "#{controller.class}##{method_name}"
26
- RorVsWild.agent.current_data[:name] = controller_action
26
+ RorVsWild.agent.current_data[:name] = controller_action if RorVsWild.agent.current_data
27
27
  end
28
28
  block.call
29
29
  ensure
@@ -63,7 +63,7 @@ module RorVsWild
63
63
  end
64
64
 
65
65
  def start_thread
66
- RorVsWild.logger.info("RorVsWild::Queue#start_thread".freeze)
66
+ RorVsWild.logger.debug("RorVsWild::Queue#start_thread".freeze)
67
67
  @thread = Thread.new { flush_indefinetely }
68
68
  end
69
69
 
@@ -1,3 +1,3 @@
1
1
  module RorVsWild
2
- VERSION = "1.5.9".freeze
2
+ VERSION = "1.5.10".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.5.9
4
+ version: 1.5.10
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: 2021-02-19 00:00:00.000000000 Z
12
+ date: 2021-03-30 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Performances and errors insights for rails developers.
15
15
  email: