rookout 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rookout/commit.rb +1 -1
- data/lib/rookout/exceptions.rb +6 -0
- data/lib/rookout/interface.rb +13 -6
- data/lib/rookout/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ac3806c0aa70b513faec4681c8c66c6a15fa73d95b0d8c049e6370b4da4594f
|
4
|
+
data.tar.gz: a06b067ece4a6b18344c78681912cb98790b4551014eb1598e0f2259884ade4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb2bf01a3ea09427695506cb91630de1a7a26a768e189b575f18ee2456f2ea4782a4a16819e3bb34e901d4c887fac72a886108b3cccd2b9afdb32045c773d27d
|
7
|
+
data.tar.gz: e2de34569161a2d96c7ffe5a7090637b082107b1c9bd41095c65eab23764c39a20d863132c9685cd6b43d5e3e7474cd8c9dc2b011f0488bc21417680f5ab6068
|
data/lib/rookout/commit.rb
CHANGED
data/lib/rookout/exceptions.rb
CHANGED
@@ -177,5 +177,11 @@ module Rookout
|
|
177
177
|
super "Error from Websocket #{error}", { "error" => error }
|
178
178
|
end
|
179
179
|
end
|
180
|
+
|
181
|
+
class RookBadProtobuf < ToolException
|
182
|
+
def initialize
|
183
|
+
super 'Bad protobuf version. Please execute "bundle config force_ruby_platform true" before "bundler install".'
|
184
|
+
end
|
185
|
+
end
|
180
186
|
end
|
181
187
|
end
|
data/lib/rookout/interface.rb
CHANGED
@@ -18,6 +18,8 @@ module Rookout
|
|
18
18
|
Config.debug = evaluate_flag options[:debug], "ROOKOUT_DEBUG"
|
19
19
|
|
20
20
|
begin
|
21
|
+
verify_env
|
22
|
+
|
21
23
|
require_relative "rookout_singleton"
|
22
24
|
|
23
25
|
# If we are running post fork, use previous start_options
|
@@ -25,8 +27,7 @@ module Rookout
|
|
25
27
|
# Don't re-enable the fork handler
|
26
28
|
@start_options[:fork] = false
|
27
29
|
else
|
28
|
-
|
29
|
-
configure_git options
|
30
|
+
configure_globals options
|
30
31
|
|
31
32
|
@start_options = configure_start_options options
|
32
33
|
print_config @start_options
|
@@ -34,7 +35,7 @@ module Rookout
|
|
34
35
|
|
35
36
|
rook = RookoutSingleton.instance
|
36
37
|
rook.connect(**@start_options)
|
37
|
-
rescue RookMissingToken, RookInvalidToken, RookInvalidOptions, RookVersionNotSupported => e
|
38
|
+
rescue RookMissingToken, RookInvalidToken, RookInvalidOptions, RookVersionNotSupported, RookBadProtobuf => e
|
38
39
|
raise if throw_errors
|
39
40
|
STDERR.puts "[Rookout] Failed to start Rookout: #{e.message}"
|
40
41
|
rescue RookCommunicationException => e
|
@@ -61,7 +62,15 @@ module Rookout
|
|
61
62
|
|
62
63
|
TRUE_VALUE = [true, "y", "Y", "yes", "Yes", "YES", "true", "True", "TRUE", "1"].freeze
|
63
64
|
|
64
|
-
def
|
65
|
+
def verify_env
|
66
|
+
# Only test alpine
|
67
|
+
return unless File.exist? "/etc/alpine-release"
|
68
|
+
|
69
|
+
protobuf = Gem::Specification.find_by_path "google/protobuf"
|
70
|
+
raise RookBadProtobuf if protobuf.nil? || protobuf.platform != "ruby"
|
71
|
+
end
|
72
|
+
|
73
|
+
def configure_globals options
|
65
74
|
if Config.debug
|
66
75
|
log_to_stderr = true
|
67
76
|
log_level = :DEBUG
|
@@ -75,9 +84,7 @@ module Rookout
|
|
75
84
|
Config.logger_log_to_stderr = log_to_stderr unless log_to_stderr.nil?
|
76
85
|
Config.logger_filename = log_file unless log_file.nil?
|
77
86
|
Config.logger_log_level = log_level unless log_level.nil?
|
78
|
-
end
|
79
87
|
|
80
|
-
def configure_git options
|
81
88
|
Config.user_git_origin = options[:git_origin] if options[:git_origin]
|
82
89
|
Config.user_git_commit = options[:git_commit] if options[:git_commit]
|
83
90
|
end
|
data/lib/rookout/version.rb
CHANGED