buildkit 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/buildkit/error.rb +17 -9
- data/lib/buildkit/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: e0d8ad5ef2805dc0580084a0bb934c5e013740b7b02dfd6747941014293958b6
|
4
|
+
data.tar.gz: edf69422089f0ddca1c75969a575e546617be02db8989703b9804624d91553b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d7efe3865fbbbeffa1280491a0babafd410aeabd4552824f68ed86ff3bd841c274612f71133a5ba512b2473f2680472458638b1517a0eb05a2262522b83570a
|
7
|
+
data.tar.gz: 3967182cd91e643ac31237bc27496bb67b8f125a3b5f18ad457f900b5a63a2b3622376f17c3b5196ac9cd5507f4c0e76c4f44269ccafbe48e21b207dbe616f71
|
data/lib/buildkit/error.rb
CHANGED
@@ -89,26 +89,34 @@ module Buildkit
|
|
89
89
|
def response_error_summary
|
90
90
|
return nil unless data.is_a?(Hash) && !Array(data[:errors]).empty?
|
91
91
|
|
92
|
-
|
93
|
-
summary << data[:errors].map do |hash|
|
92
|
+
errors = data[:errors].map do |hash|
|
94
93
|
hash.map { |k, v| " #{k}: #{v}" }
|
95
|
-
end
|
94
|
+
end
|
96
95
|
|
97
|
-
|
96
|
+
<<~MSG.chomp
|
97
|
+
Error summary:
|
98
|
+
#{errors.join("\n")}
|
99
|
+
MSG
|
98
100
|
end
|
99
101
|
|
100
102
|
def build_error_message
|
101
103
|
return nil if @response.nil?
|
102
104
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
105
|
+
documentation_text = if documentation_url
|
106
|
+
"// See: #{documentation_url}"
|
107
|
+
else
|
108
|
+
""
|
109
|
+
end
|
110
|
+
|
111
|
+
<<~MSG.strip
|
112
|
+
#{@response[:method].to_s.upcase} #{redact_url(@response[:url].to_s)}: #{@response[:status]} - #{response_message}#{response_error}#{response_error_summary}
|
113
|
+
#{documentation_text}
|
114
|
+
MSG
|
107
115
|
end
|
108
116
|
|
109
117
|
def redact_url(url_string)
|
110
118
|
%w[client_secret access_token].each do |token|
|
111
|
-
url_string.gsub
|
119
|
+
url_string = url_string.gsub(/#{token}=\S+/, "#{token}=(redacted)") if url_string.include? token
|
112
120
|
end
|
113
121
|
url_string
|
114
122
|
end
|
data/lib/buildkit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buildkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sawyer
|