rookout 0.1.16 → 0.1.21

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: e08815efb5a89029e091fe5cd252dce182407411e6025de9db8e5ae2659d77d7
4
- data.tar.gz: 60bba85497d1f9253e3447283fa1adb97096cb21213b5911ba90371323f1de26
3
+ metadata.gz: 2c221072b65f45a39f76d5e19eef6fa16acca2195e24ccc5556e28891800bf2e
4
+ data.tar.gz: 5d4bc9847e1492098888bd80433ed5bf62375a7a3ef22a22b3edbabc51157524
5
5
  SHA512:
6
- metadata.gz: 3d4744c8a0eda6615c1c9b503503d67a1ee647ac7dbf4607fe75b1d9aeff90f8ad98dd497df23eab4488f692f26266d5fd048db566a88a8713272ad072843200
7
- data.tar.gz: 7aec7fcff6e9637319f5867b19f2a5eb15d1a0c560a7e1ed212f21b730ed67253db853eff0d3aeacb89a66a6b558f06fbb9049c68d2a8d052cc6787630859247
6
+ metadata.gz: eca7de50c075553184cc1b6d5ad394d3fdd63d8869a50d0fe654f72a7d332ca0a941ca54ae030b516193df0f06ed8069e898572a7ed770fb51191e097b3e291f
7
+ data.tar.gz: 610f1de91359daa7b31f0554840fcde57f0506396a4deb9524bcfdb6dbc24eb981a6a42534e63ff65a3444d19fe64ea2148aae8c49cf81fe5abbb223a190f526
@@ -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 = "809b0c180b1861b5f90a7ed0a14ccdd356e7edcf".freeze
2
+ COMMIT = "5fd8b00c48eceb85c0e6c633ed13b7dbddf6715d".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}",
@@ -189,5 +195,11 @@ module Rookout
189
195
  super 'Bad protobuf version. Please execute "bundle config force_ruby_platform true" before "bundler install".'
190
196
  end
191
197
  end
198
+
199
+ class RookBadProtobufPlatform < ToolException
200
+ def initialize platform
201
+ super "Bad protobuf platform: #{platform}"
202
+ end
203
+ end
192
204
  end
193
205
  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
@@ -77,7 +82,11 @@ module Rookout
77
82
  return unless File.exist? "/etc/alpine-release"
78
83
 
79
84
  protobuf = Gem::Specification.find_by_path "google/protobuf"
80
- raise RookBadProtobuf if protobuf.nil? || protobuf.platform != "ruby"
85
+ STDERR.puts RookBadProtobuf.new.message if protobuf.nil?
86
+ return unless protobuf.platform != "ruby"
87
+
88
+ error = RookBadProtobufPlatform.new protobuf.platform
89
+ STDERR.puts error.message
81
90
  end
82
91
 
83
92
  def configure_globals options
@@ -12,7 +12,8 @@ module Rookout
12
12
 
13
13
  def initialize
14
14
  # Detect unit tests
15
- if ($PROGRAM_NAME.end_with?("minitest_runner.rb") ||
15
+ if (Config.debug ||
16
+ $PROGRAM_NAME.end_with?("minitest_runner.rb") ||
16
17
  $PROGRAM_NAME.end_with?("tunit_or_minitest_in_folder_runner.rb")) &&
17
18
  Dir.pwd.end_with?("ruby-sdk")
18
19
  Config.logger_log_level = :DEBUG
@@ -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.16".freeze
2
+ VERSION = "0.1.21".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.16
4
+ version: 0.1.21
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-10 00:00:00.000000000 Z
11
+ date: 2021-03-14 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.4
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: []