rookout 0.1.53 → 0.1.54
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rookout/com_ws/agent_com_ws.rb +5 -0
- data/lib/rookout/com_ws/information.rb +31 -1
- data/lib/rookout/commit.rb +1 -1
- data/lib/rookout/config.rb +2 -0
- data/lib/rookout/exceptions.rb +7 -0
- data/lib/rookout/interface.rb +9 -3
- data/lib/rookout/sanitizer.rb +1 -1
- data/lib/rookout/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e96a2d7b2fdc74a8731a9c547940f6c03a1bf2ee103ed433a65fdac6bff90e40
|
4
|
+
data.tar.gz: 21bdac9616f7b5f7bcbcf781fdb2df81ff8ad7bfb0413ed96dea91565df61652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9886ef4e56f478fa227a5a50281179df07b2dc3aa28573d815969b2a57e0935b8b783ebe2738dee480de5eb559b28f5ab8f51357af3d21a50b3e3a2a95fcb7f6
|
7
|
+
data.tar.gz: 65e7aa8a863b61994278f58540b95c27166543141145545f463cf2f0bd9a2cc989de3cdd6449353110659cca7558dd892214901008f862fcf3716d2da1c0af3f
|
@@ -130,6 +130,11 @@ module Rookout
|
|
130
130
|
@ready_event.set
|
131
131
|
end
|
132
132
|
|
133
|
+
if e.message.include? "400"
|
134
|
+
@connection_error = Exceptions::RookWebSocketError.new 400
|
135
|
+
@ready_event.set
|
136
|
+
end
|
137
|
+
|
133
138
|
Logger.instance.warning "Connection failed; reason = #{e.message}"
|
134
139
|
end
|
135
140
|
|
@@ -85,10 +85,40 @@ module Rookout
|
|
85
85
|
return_value
|
86
86
|
end
|
87
87
|
|
88
|
+
def parse_raw_git_sources
|
89
|
+
git_sources_raw = ENV["ROOKOUT_SOURCES"]
|
90
|
+
if git_sources_raw.nil?
|
91
|
+
return nil
|
92
|
+
end
|
93
|
+
|
94
|
+
git_sources = git_sources_raw.split ";"
|
95
|
+
user_git_sources = {}
|
96
|
+
git_sources.each do |url|
|
97
|
+
url_parts = url.split "#"
|
98
|
+
if url_parts.length != 2
|
99
|
+
next
|
100
|
+
end
|
101
|
+
|
102
|
+
remote_url = url_parts[0]
|
103
|
+
commit = url_parts[1]
|
104
|
+
user_git_sources[remote_url] = commit
|
105
|
+
end
|
106
|
+
|
107
|
+
user_git_sources
|
108
|
+
end
|
109
|
+
|
88
110
|
def create_scm_information
|
89
111
|
user_git_origin = Config.user_git_origin || ENV["ROOKOUT_REMOTE_ORIGIN"]
|
90
112
|
user_git_commit = Config.user_git_commit || ENV["ROOKOUT_COMMIT"]
|
91
113
|
|
114
|
+
user_git_sources = Config.user_git_sources || parse_raw_git_sources
|
115
|
+
|
116
|
+
if !user_git_sources.nil? && !user_git_sources.empty?
|
117
|
+
user_git_sources = user_git_sources.map do |remote_url, commit|
|
118
|
+
Com::Rookout::SCMInformation::SourceInfo.new remoteOriginUrl: remote_url, commit: commit
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
92
122
|
if user_git_origin.nil? && user_git_commit.nil?
|
93
123
|
search_path = File.dirname File.absolute_path($PROGRAM_NAME)
|
94
124
|
git_root = find_root search_path
|
@@ -98,7 +128,7 @@ module Rookout
|
|
98
128
|
end
|
99
129
|
end
|
100
130
|
|
101
|
-
Com::Rookout::SCMInformation.new origin: user_git_origin, commit: user_git_commit
|
131
|
+
Com::Rookout::SCMInformation.new origin: user_git_origin, commit: user_git_commit, sources: user_git_sources
|
102
132
|
end
|
103
133
|
|
104
134
|
def aws_lambda?
|
data/lib/rookout/commit.rb
CHANGED
data/lib/rookout/config.rb
CHANGED
@@ -60,9 +60,11 @@ module Rookout
|
|
60
60
|
|
61
61
|
attr_accessor :user_git_commit
|
62
62
|
attr_accessor :user_git_origin
|
63
|
+
attr_accessor :user_git_sources
|
63
64
|
|
64
65
|
Rookout::Config.user_git_commit = nil
|
65
66
|
Rookout::Config.user_git_origin = nil
|
67
|
+
Rookout::Config.user_git_sources = nil
|
66
68
|
|
67
69
|
attr_accessor :rookout_version
|
68
70
|
attr_accessor :rookout_commit
|
data/lib/rookout/exceptions.rb
CHANGED
@@ -132,6 +132,13 @@ module Rookout
|
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
135
|
+
class RookWebSocketError < ToolException
|
136
|
+
def initialize http_status
|
137
|
+
super "Received HTTP status #{http_status} from the controller," \
|
138
|
+
"Please make sure WebSocket is enabled on the load balancer."
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
135
142
|
class RookSourceFilePathSuggestion < ToolException
|
136
143
|
def initialize wanted_path, matching_path
|
137
144
|
super "Rookout found alternative file path: #{matching_path}",
|
data/lib/rookout/interface.rb
CHANGED
@@ -39,7 +39,8 @@ module Rookout
|
|
39
39
|
raise if throw_errors
|
40
40
|
$stderr.puts "[Rookout] Failed to load Rookout. Please make sure to force build native extensions by setting" \
|
41
41
|
"'bundle config force_ruby_platform true'"
|
42
|
-
rescue RookMissingToken, RookInvalidToken, RookInvalidOptions,
|
42
|
+
rescue RookMissingToken, RookInvalidToken, RookInvalidOptions,
|
43
|
+
RookVersionNotSupported, RookBadProtobuf, RookWebSocketError => e
|
43
44
|
raise if throw_errors
|
44
45
|
$stderr.puts "[Rookout] Failed to start Rookout: #{e.message}"
|
45
46
|
rescue RookCommunicationException => e
|
@@ -92,6 +93,12 @@ module Rookout
|
|
92
93
|
$stderr.puts error.message
|
93
94
|
end
|
94
95
|
|
96
|
+
def configure_scm options
|
97
|
+
Config.user_git_origin = options[:git_origin] if options[:git_origin]
|
98
|
+
Config.user_git_commit = options[:git_commit] if options[:git_commit]
|
99
|
+
Config.user_git_sources = options[:git_sources] if options[:git_sources] && options[:git_sources].is_a?(Hash)
|
100
|
+
end
|
101
|
+
|
95
102
|
def configure_globals options
|
96
103
|
if Config.debug
|
97
104
|
log_to_stderr = true
|
@@ -107,8 +114,7 @@ module Rookout
|
|
107
114
|
Config.logger_filename = log_file unless log_file.nil?
|
108
115
|
Config.logger_log_level = log_level unless log_level.nil?
|
109
116
|
|
110
|
-
|
111
|
-
Config.user_git_commit = options[:git_commit] if options[:git_commit]
|
117
|
+
configure_scm options
|
112
118
|
end
|
113
119
|
|
114
120
|
def configure_start_options options
|
data/lib/rookout/sanitizer.rb
CHANGED
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.54
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liran Haimovitch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|