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 +4 -4
- data/lib/rookout/com_ws/pinger.rb +8 -3
- data/lib/rookout/com_ws/websocket_client.rb +6 -2
- data/lib/rookout/commit.rb +1 -1
- data/lib/rookout/exceptions.rb +12 -0
- data/lib/rookout/interface.rb +11 -2
- data/lib/rookout/logger.rb +2 -1
- data/lib/rookout/processor/namespaces/ruby_object_serializer.rb +2 -2
- data/lib/rookout/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c221072b65f45a39f76d5e19eef6fa16acca2195e24ccc5556e28891800bf2e
|
4
|
+
data.tar.gz: 5d4bc9847e1492098888bd80433ed5bf62375a7a3ef22a22b3edbabc51157524
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
21
|
-
|
22
|
-
|
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
|
-
|
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
|
|
data/lib/rookout/commit.rb
CHANGED
data/lib/rookout/exceptions.rb
CHANGED
@@ -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
|
data/lib/rookout/interface.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
data/lib/rookout/logger.rb
CHANGED
@@ -12,7 +12,8 @@ module Rookout
|
|
12
12
|
|
13
13
|
def initialize
|
14
14
|
# Detect unit tests
|
15
|
-
if (
|
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.
|
38
|
+
elsif obj.class == Array
|
39
39
|
dump_array obj, variant, current_depth, config, log_object_errors
|
40
|
-
elsif obj.
|
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
|
data/lib/rookout/version.rb
CHANGED
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.
|
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-
|
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.
|
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: []
|