lib/trav3/post.rb in trav3-0.2.1 vs lib/trav3/post.rb in trav3-0.2.2
- old
+ new
@@ -1,14 +1,14 @@
# frozen_string_literal: true
+# rubocop:disable Metrics/MethodLength
require 'net/http'
require 'uri'
require 'json'
module Trav3
module POST
- # rubocop:disable Metrics/MethodLength
def self.call(travis, url, **fields)
uri = URI( url.sub(/\?.*$/, '') )
req = Net::HTTP::Post.new(uri.request_uri)
travis.headers.each_pair do |header, value|
req[header] = value
@@ -24,8 +24,8 @@
Success.new(travis, response)
else
RequestError.new(travis, response)
end
end
- # rubocop:enable Metrics/MethodLength
end
end
+# rubocop:enable Metrics/MethodLength