rookout 0.1.17 → 0.1.22

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: 412df2821122abb540f4baeed9fd11432ebdc2a50373130ba148c43863c62b9b
4
- data.tar.gz: afe3d60125a31190bc17dcf2b27a5fa18cf7da70acde921cc959438a8a285dfc
3
+ metadata.gz: 1189352fe3bb2817944ec553c3a658bcd0d677781ffee90190521e1ed55189c3
4
+ data.tar.gz: 63bf916c9f3140c4bf2be89a3469ffd3f451f37edc4741c39c6336ef1373269c
5
5
  SHA512:
6
- metadata.gz: 4a576e0968b7fdc91b80e4ef7b6b465d046cb44ad5eac73e6817898c422796dedc0a33fc4749480966814029143c83984c26edfecad18b508aaf9da03455205e
7
- data.tar.gz: 608e9960132a87e86fd1ab9fa6bc045d493b7f95dece96fa5dd8bcbceedc2ea538b4a30a28702ec4e7c8f7951005b9826755b48a4d3171f3a77345ac643b24ea
6
+ metadata.gz: cace5dbc2f61f8e1987397345061080fecc85cbcaeb065976f8a8ae071621c01b717e46dd98df55a48fd399f7b2f02b467b786b335d9dcf4088e09a3094f1961
7
+ data.tar.gz: d33370845b6bb7166c93626e74b73a743d5a799f8b69722bae627561fbd747a36542c2a38e7f3135f099e90415d5b5219775407e942a8f3e25c60939a1be9012
@@ -45,7 +45,7 @@ module Rookout
45
45
 
46
46
  def create_location configuration, aug
47
47
  name = configuration["name"]
48
- raise Exceptions.RookObjectNameMissing if name.nil?
48
+ raise Exceptions::RookObjectNameMissing if name.nil?
49
49
 
50
50
  case name
51
51
  when "file_line"
@@ -53,7 +53,7 @@ module Rookout
53
53
  when "exception_handler"
54
54
  return Locations::LocationExceptionHandler.new configuration, @output, aug
55
55
  else
56
- raise Exceptions.RookUnsupportedLocation if name != "file_line"
56
+ raise Exceptions::RookUnsupportedLocation if name != "file_line"
57
57
  end
58
58
  end
59
59
 
@@ -17,9 +17,14 @@ module Rookout
17
17
  if Time.now - @last_ping > @interval
18
18
  Logger.instance.debug "Sending Ping"
19
19
  @last_ping = Time.now
20
- @connection.ping Time.now.to_s do
21
- Logger.instance.debug "Got Ping reply"
22
- @last_pong = Time.now
20
+ begin
21
+ @connection.ping Time.now.to_s do
22
+ Logger.instance.debug "Got Ping reply"
23
+ @last_pong = Time.now
24
+ end
25
+ rescue RuntimeError, Errno::EPIPE
26
+ Logger.instance.debug "Failed to send ping"
27
+ break
23
28
  end
24
29
  end
25
30
 
@@ -14,7 +14,6 @@ module Rookout
14
14
  @connection = WebsocketConnection.new url, proxy
15
15
  @proxy = proxy
16
16
  @driver = nil
17
- @last_ping = nil
18
17
  end
19
18
 
20
19
  def connect
@@ -64,7 +63,12 @@ module Rookout
64
63
  def close
65
64
  return if @driver.nil?
66
65
 
67
- @driver.close
66
+ begin
67
+ @driver.close
68
+ rescue RuntimeError, Errno::EPIPE
69
+ # Protocol close may fail if the connection is already closed
70
+ nil
71
+ end
68
72
  @connection.close
69
73
  end
70
74
 
@@ -1,3 +1,3 @@
1
1
  module Rookout
2
- COMMIT = "c966c378ce29011cd64cc0cd52ca6f4acbed2025".freeze
2
+ COMMIT = "f6730b0a0901306d41b983fb4b7a8c7f85d46c81".freeze
3
3
  end
@@ -144,6 +144,12 @@ module Rookout
144
144
  end
145
145
  end
146
146
 
147
+ class RookInvalidLabel < ToolException
148
+ def initialize label_name
149
+ super "Invalid label: must not start with the '$' character (#{label_name})"
150
+ end
151
+ end
152
+
147
153
  class RookCrcMismatchException < ToolException
148
154
  def initialize filepath, expected, calculated
149
155
  super "Line CRC32s do not match! path: #{filepath}, expected: #{expected}, calculated:#{calculated}",
@@ -195,5 +201,23 @@ module Rookout
195
201
  super "Bad protobuf platform: #{platform}"
196
202
  end
197
203
  end
204
+
205
+ class RookObjectNameMissing < ToolException
206
+ def initialize configuration
207
+ super "Failed to find object name",
208
+ {
209
+ "configuration" => configuration
210
+ }
211
+ end
212
+ end
213
+
214
+ class RookUnsupportedLocation < ToolException
215
+ def initialize location
216
+ super "Unsupported aug location was specified: #{location}",
217
+ {
218
+ "location" => location
219
+ }
220
+ end
221
+ end
198
222
  end
199
223
  end
@@ -12,12 +12,17 @@ module Rookout
12
12
  @start_options = nil
13
13
  end
14
14
 
15
+ def print_debug_messages
16
+ puts "[Rookout] Running in debug mode"
17
+ puts "[Rookout] Rookout SDK for ruby: " + Config.rookout_version
18
+ end
19
+
15
20
  def start options = {}
16
21
  return unless @rook.nil?
17
22
  throw_errors = options[:throw_errors] == true
18
23
  Config.debug = evaluate_flag options[:debug], "ROOKOUT_DEBUG"
19
24
 
20
- puts "[Rookout] Running in debug mode" if Config.debug
25
+ print_debug_messages if Config.debug
21
26
 
22
27
  begin
23
28
  verify_env
@@ -35,9 +35,9 @@ module Rookout
35
35
  dump_string obj, variant, config
36
36
  elsif obj.is_a? Time
37
37
  dump_time obj, variant
38
- elsif obj.is_a? Array
38
+ elsif obj.class == Array
39
39
  dump_array obj, variant, current_depth, config, log_object_errors
40
- elsif obj.is_a? Hash
40
+ elsif obj.class == Hash
41
41
  dump_hash obj, variant, current_depth, config, log_object_errors
42
42
  elsif obj.is_a? Exception
43
43
  dump_exception obj, variant, current_depth, config, log_object_errors
@@ -1,3 +1,3 @@
1
1
  module Rookout
2
- VERSION = "0.1.17".freeze
2
+ VERSION = "0.1.22".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rookout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liran Haimovitch
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-13 00:00:00.000000000 Z
11
+ date: 2021-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: binding_of_caller
@@ -84,14 +84,14 @@ dependencies:
84
84
  name: google-style
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '='
88
88
  - !ruby/object:Gem::Version
89
89
  version: 1.24.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '='
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.24.0
97
97
  - !ruby/object:Gem::Dependency
@@ -253,7 +253,7 @@ licenses:
253
253
  - Proprietary
254
254
  metadata:
255
255
  homepage_uri: https://rookout.com
256
- post_install_message:
256
+ post_install_message:
257
257
  rdoc_options: []
258
258
  require_paths:
259
259
  - lib
@@ -268,8 +268,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
268
  - !ruby/object:Gem::Version
269
269
  version: '0'
270
270
  requirements: []
271
- rubygems_version: 3.1.2
272
- signing_key:
271
+ rubygems_version: 3.1.6
272
+ signing_key:
273
273
  specification_version: 4
274
274
  summary: rookout is the Ruby SDK for the Rookout Debugging Platform
275
275
  test_files: []