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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c698c16bfbf7520a5f3fef8f0cda0f3140ba6be1f875e04223053b63ca421dc
4
- data.tar.gz: 27a0f9fa6cd4f47749b48c552a8dd6a42c1eff4e359458417df725c618fd7864
3
+ metadata.gz: 1ac3806c0aa70b513faec4681c8c66c6a15fa73d95b0d8c049e6370b4da4594f
4
+ data.tar.gz: a06b067ece4a6b18344c78681912cb98790b4551014eb1598e0f2259884ade4b
5
5
  SHA512:
6
- metadata.gz: 0756d328dbdd0249b3cb24f109283f28687d7f414b8c81d219a974973df1e768fa7481940c0246dd044ebb11e0af44e314d199b48530f8928f6a718518cc165b
7
- data.tar.gz: e9e2b8468f70300e029391fdbd19e3da9b75a25f2fcad02f6f41f1327ca781c37bd7e0d76bf26b9137f0cfb702c841c6bc29ee167e6824499b08a0736b4cddfe
6
+ metadata.gz: eb2bf01a3ea09427695506cb91630de1a7a26a768e189b575f18ee2456f2ea4782a4a16819e3bb34e901d4c887fac72a886108b3cccd2b9afdb32045c773d27d
7
+ data.tar.gz: e2de34569161a2d96c7ffe5a7090637b082107b1c9bd41095c65eab23764c39a20d863132c9685cd6b43d5e3e7474cd8c9dc2b011f0488bc21417680f5ab6068
@@ -1,3 +1,3 @@
1
1
  module Rookout
2
- COMMIT = "0f0cf1533a7338ef3e5ca1416415ff3b54dffe98".freeze
2
+ COMMIT = "ce81f2f19f47dfc13e4321d1c64ae2107ace3fa3".freeze
3
3
  end
@@ -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
@@ -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
- configure_logging options
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 configure_logging options
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
@@ -1,3 +1,3 @@
1
1
  module Rookout
2
- VERSION = "0.1.12".freeze
2
+ VERSION = "0.1.13".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rookout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liran Haimovitch