sibit 0.34.2 → 0.34.3
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/Gemfile.lock +7 -7
- data/lib/sibit/bin.rb +14 -3
- data/lib/sibit/httpproxy.rb +7 -1
- data/lib/sibit/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: 9fab8abde581e74b8a0aa55666754632639f070361cefdf3a2fb5766b6c8cf59
|
|
4
|
+
data.tar.gz: 87f523aa5a0dab63bf34e85b5de55afa9983333cf7202a4c6b062174b3e6289d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 130efd165f0f20537dca059b0ad4c88022294a020b66be1c0d598c5c0789fec9b56088c52ae680cdd4864adc33b953d81696b7929514125d2d9ed31fbd755d10
|
|
7
|
+
data.tar.gz: e5209eda4d7a20d157c0512a229d57e907879cb02b581c8f1afd1d81c335fdbbce3c9a723b77d8d3881d5c6d9881b0a986aeb48ba7e1d4d6c98d06970ffa6446
|
data/Gemfile.lock
CHANGED
|
@@ -83,7 +83,7 @@ GEM
|
|
|
83
83
|
rdoc (>= 4.0.0)
|
|
84
84
|
reline (>= 0.4.2)
|
|
85
85
|
iri (0.11.8)
|
|
86
|
-
json (2.21.
|
|
86
|
+
json (2.21.2)
|
|
87
87
|
language_server-protocol (3.17.0.6)
|
|
88
88
|
lint_roller (1.1.0)
|
|
89
89
|
logger (1.7.0)
|
|
@@ -144,8 +144,8 @@ GEM
|
|
|
144
144
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
145
145
|
rspec-support (~> 3.13.0)
|
|
146
146
|
rspec-support (3.13.7)
|
|
147
|
-
rubocop (1.
|
|
148
|
-
json (
|
|
147
|
+
rubocop (1.90.0)
|
|
148
|
+
json (>= 2.3)
|
|
149
149
|
language_server-protocol (~> 3.17.0.2)
|
|
150
150
|
lint_roller (~> 1.1.0)
|
|
151
151
|
parallel (>= 1.10)
|
|
@@ -158,16 +158,16 @@ GEM
|
|
|
158
158
|
rubocop-ast (1.50.0)
|
|
159
159
|
parser (>= 3.3.7.2)
|
|
160
160
|
prism (~> 1.7)
|
|
161
|
-
rubocop-elegant (0.
|
|
161
|
+
rubocop-elegant (0.8.0)
|
|
162
162
|
lint_roller (~> 1.1)
|
|
163
163
|
rubocop (~> 1.75)
|
|
164
164
|
rubocop-minitest (0.40.0)
|
|
165
165
|
lint_roller (~> 1.1)
|
|
166
166
|
rubocop (>= 1.75.0, < 2.0)
|
|
167
167
|
rubocop-ast (>= 1.38.0, < 2.0)
|
|
168
|
-
rubocop-performance (1.
|
|
168
|
+
rubocop-performance (1.27.0)
|
|
169
169
|
lint_roller (~> 1.1)
|
|
170
|
-
rubocop (>= 1.
|
|
170
|
+
rubocop (>= 1.89.0, < 2.0)
|
|
171
171
|
rubocop-ast (>= 1.47.1, < 2.0)
|
|
172
172
|
rubocop-rake (0.7.1)
|
|
173
173
|
lint_roller (~> 1.1)
|
|
@@ -191,7 +191,7 @@ GEM
|
|
|
191
191
|
unicode-display_width (3.2.0)
|
|
192
192
|
unicode-emoji (~> 4.1)
|
|
193
193
|
unicode-emoji (4.2.0)
|
|
194
|
-
webmock (3.26.
|
|
194
|
+
webmock (3.26.4)
|
|
195
195
|
addressable (>= 2.8.0)
|
|
196
196
|
crack (>= 0.3.2)
|
|
197
197
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/lib/sibit/bin.rb
CHANGED
|
@@ -145,10 +145,21 @@ class Sibit
|
|
|
145
145
|
end
|
|
146
146
|
end
|
|
147
147
|
|
|
148
|
+
def proxy
|
|
149
|
+
addr = options[:proxy] || ENV.fetch('SIBIT_PROXY', nil)
|
|
150
|
+
return if addr.nil?
|
|
151
|
+
if options[:proxy]
|
|
152
|
+
log.debug("Proxy found in the --proxy command line option (#{addr.length} symbols)")
|
|
153
|
+
else
|
|
154
|
+
log.debug("Proxy found in the SIBIT_PROXY env variable (#{addr.length} symbols)")
|
|
155
|
+
end
|
|
156
|
+
addr
|
|
157
|
+
end
|
|
158
|
+
|
|
148
159
|
def client(dry: false)
|
|
149
|
-
|
|
150
|
-
http =
|
|
151
|
-
log.debug("Using proxy at #{http
|
|
160
|
+
addr = proxy
|
|
161
|
+
http = addr ? Sibit::HttpProxy.new(addr) : Sibit::Http.new
|
|
162
|
+
log.debug("Using proxy at #{http}") if addr
|
|
152
163
|
api = Sibit::FirstOf.new(
|
|
153
164
|
options[:api].flat_map { |a| a.split(',') }.map(&:downcase).map do |a|
|
|
154
165
|
case a
|
data/lib/sibit/httpproxy.rb
CHANGED
|
@@ -19,7 +19,13 @@ class Sibit
|
|
|
19
19
|
@user, @password, @host, @port = parse(addr)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
def to_s
|
|
23
|
+
[
|
|
24
|
+
"#{@host}:#{@port}",
|
|
25
|
+
@user ? " as #{@user}" : '',
|
|
26
|
+
@password ? ", password #{'*' * @password.length}" : ''
|
|
27
|
+
].join
|
|
28
|
+
end
|
|
23
29
|
|
|
24
30
|
def client(uri)
|
|
25
31
|
http = Net::HTTP.new(uri.host, uri.port, @host, Integer(@port, 10), @user, @password)
|
data/lib/sibit/version.rb
CHANGED