lib/ssh_scan/update.rb in ssh_scan-0.0.16 vs lib/ssh_scan/update.rb in ssh_scan-0.0.17.pre

- old
+ new

@@ -16,19 +16,19 @@ return [major, minor, patch_num.to_s].join(".") end def next_minor_version(version = SSHScan::VERSION) - major, minor, patch = version.split(".") + major, minor = version.split(".")[0, 2] minor_num = minor.to_i minor_num += 1 return [major, minor_num.to_s, "0"].join(".") end def next_major_version(version = SSHScan::VERSION) - major, minor, patch = version.split(".") + major = version.split(".")[0] major_num = major.to_i major_num += 1 return [major_num.to_s, "0", "0"].join(".") end @@ -36,10 +36,10 @@ def gem_exists?(version = SSHScan::VERSION) uri = URI("https://rubygems.org/gems/ssh_scan/versions/#{version}") begin res = Net::HTTP.get_response(uri) - rescue Exception => e + rescue SocketError => e @errors << e.message return false end if res.code != "200"