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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87dc13bdb5cda6aa821ccc064d0d45d48386bf97be895fa6cdac2b23e2fba0d3
4
- data.tar.gz: 4710806969346a898cc7c141d01f949a8c376b112b43ac52c5f9f22feecc7c02
3
+ metadata.gz: 7b080c8d6234d16d049cf4b62837a0d2583f2d8d620f5426cc8816d3c8fa1a6b
4
+ data.tar.gz: 78d9b6d9909ac7424d920dae3591b544f4457066a34a6e5dcb49ff8d4fbb6ce5
5
5
  SHA512:
6
- metadata.gz: e5914c020f854d715f3ed3456ab0406e5df9631f1996e7bddbd512e1fc5e3e7f8b440f95868306de9164cfd242e5ff0462d646ae8645ed337b5724b969f17b6a
7
- data.tar.gz: 405cc71d37379ec59c7d3ea0f52a8c919a66f0e881b4086367b42c61f56973a3e0a704ec7de461a90d70d0589164fdd0a123425a190c01cfb759a9a7166e62c2
6
+ metadata.gz: bf021d0f6c4a08f9cde1e0e9163cde1be6b5af780ab9237042a1180d54375ffe7e3dea2d30e4f658355dcae8cff9c21dba0c1db7e284eccd3c8791e6bb54956f
7
+ data.tar.gz: 8b76d90ca73c5f9319b9e50c6abe403542ea92298c866cc2a36e2aae3a775cd4c59ddf0b9065ea3ca7d49880f005c2576aa7d4cd246648435153b44d5738bb0d
@@ -134,6 +134,7 @@ module Gem
134
134
  url = URI.parse("#{self.url}/#{path}")
135
135
 
136
136
  http = proxy_class.new(url.host, url.port)
137
+ http.set_debug_output $stdout
137
138
 
138
139
  if url.scheme == 'https'
139
140
  http.use_ssl = true
@@ -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
- response = make_request(:put, "gems/#{File.basename(path)}") do |request|
112
- request.body = Gem.read_binary(path)
113
- request.add_field('Content-Length', request.body.size)
114
- request.add_field('Content-Type', 'application/octet-stream')
115
- request.add_field('Authorization', authorization.strip) if authorization
116
- end
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
@@ -1,3 +1,3 @@
1
1
  module Nexus
2
- VERSION = '1.4.5'.freeze
2
+ VERSION = '1.4.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexus-debug
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Quaranto