nexus-debug 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/commands/abstract_command.rb +1 -0
- data/lib/commands/nexus.rb +26 -22
- data/lib/nexus/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: 7b080c8d6234d16d049cf4b62837a0d2583f2d8d620f5426cc8816d3c8fa1a6b
|
4
|
+
data.tar.gz: 78d9b6d9909ac7424d920dae3591b544f4457066a34a6e5dcb49ff8d4fbb6ce5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf021d0f6c4a08f9cde1e0e9163cde1be6b5af780ab9237042a1180d54375ffe7e3dea2d30e4f658355dcae8cff9c21dba0c1db7e284eccd3c8791e6bb54956f
|
7
|
+
data.tar.gz: 8b76d90ca73c5f9319b9e50c6abe403542ea92298c866cc2a36e2aae3a775cd4c59ddf0b9065ea3ca7d49880f005c2576aa7d4cd246648435153b44d5738bb0d
|
data/lib/commands/nexus.rb
CHANGED
@@ -108,35 +108,39 @@ module Gem
|
|
108
108
|
say "..Uploading #{gems.size} gem#{'s' if gems.size != 1} to Nexus..."
|
109
109
|
|
110
110
|
gems.each do |path|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
111
|
+
begin
|
112
|
+
response = make_request(:put, "gems/#{File.basename(path)}") do |request|
|
113
|
+
request.body = Gem.read_binary(path)
|
114
|
+
request.add_field('Content-Length', request.body.size)
|
115
|
+
request.add_field('Content-Type', 'application/octet-stream')
|
116
|
+
request.add_field('Authorization', authorization.strip) if authorization
|
117
|
+
end
|
118
|
+
rescue Net::HTTPServerException
|
117
119
|
|
118
|
-
say "headers incoming"
|
119
|
-
say "headers:\n"
|
120
|
-
say "headers: #{response.each_header.to_h}"
|
121
|
-
warn "headers: #{response.each_header.to_h}"
|
122
|
-
IO.puts response.each_header.to_h
|
123
|
-
|
124
|
-
case response.code
|
125
|
-
when '400'
|
126
|
-
say 'something went wrong - maybe (re)deployment is not allowed'
|
127
|
-
when '401'
|
128
|
-
say 'Unauthorized'
|
129
|
-
when '500'
|
130
|
-
say 'something went wrong'
|
131
|
-
else
|
132
120
|
say "headers incoming"
|
121
|
+
say "#{response}"
|
133
122
|
say "headers:\n"
|
134
123
|
say "headers: #{response.each_header.to_h}"
|
135
124
|
warn "headers: #{response.each_header.to_h}"
|
136
125
|
IO.puts response.each_header.to_h
|
137
|
-
say "sjdf: #{response.message} #{path.split(%r{/}).last}"
|
138
|
-
end
|
139
126
|
|
127
|
+
case response.code
|
128
|
+
when '400'
|
129
|
+
say 'something went wrong - maybe (re)deployment is not allowed'
|
130
|
+
when '401'
|
131
|
+
say 'Unauthorized'
|
132
|
+
when '500'
|
133
|
+
say 'something went wrong'
|
134
|
+
else
|
135
|
+
say "headers incoming"
|
136
|
+
say "headers:\n"
|
137
|
+
say "headers: #{response.each_header.to_h}"
|
138
|
+
warn "headers: #{response.each_header.to_h}"
|
139
|
+
IO.puts response.each_header.to_h
|
140
|
+
say "sjdf: #{response.message} #{path.split(%r{/}).last}"
|
141
|
+
end
|
142
|
+
|
143
|
+
end
|
140
144
|
exit 1 unless response.is_a? Net::HTTPSuccess
|
141
145
|
end
|
142
146
|
end
|
data/lib/nexus/version.rb
CHANGED