httparty 0.24.3 → 0.24.4
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/CONTRIBUTING.md +2 -4
- data/Rakefile +3 -1
- data/bin/httparty +32 -11
- data/docs/README.md +38 -4
- data/examples/README.md +12 -23
- data/examples/basic.rb +2 -2
- data/examples/basic_auth.rb +19 -0
- data/examples/cookies.rb +20 -0
- data/examples/crack.rb +2 -2
- data/examples/custom_parsers.rb +2 -2
- data/examples/debug_output.rb +17 -0
- data/examples/google.rb +2 -2
- data/examples/headers_and_user_agents.rb +2 -2
- data/examples/idn.rb +4 -3
- data/examples/logging.rb +2 -2
- data/examples/nokogiri_html_parser.rb +2 -2
- data/examples/party_foul_mode.rb +1 -0
- data/examples/peer_cert.rb +2 -2
- data/examples/rescue_json.rb +5 -3
- data/examples/stackexchange.rb +2 -2
- data/examples/stream_download.rb +2 -2
- data/examples/whoismyrep.rb +2 -2
- data/httparty.gemspec +2 -1
- data/lib/httparty/connection_adapter.rb +3 -3
- data/lib/httparty/cookie_hash.rb +1 -1
- data/lib/httparty/headers_processor.rb +4 -2
- data/lib/httparty/logger/curl_formatter.rb +16 -3
- data/lib/httparty/logger/logger.rb +2 -1
- data/lib/httparty/module_inheritable_attributes.rb +13 -13
- data/lib/httparty/net_digest_auth.rb +9 -11
- data/lib/httparty/parser.rb +2 -1
- data/lib/httparty/request/body.rb +2 -2
- data/lib/httparty/request/streaming_multipart_body.rb +9 -2
- data/lib/httparty/request.rb +29 -6
- data/lib/httparty/response.rb +2 -1
- data/lib/httparty/text_encoder.rb +1 -5
- data/lib/httparty/utils.rb +1 -5
- data/lib/httparty/version.rb +1 -1
- data/lib/httparty.rb +14 -15
- metadata +8 -18
- data/.github/dependabot.yml +0 -6
- data/.github/workflows/ci.yml +0 -24
- data/.rubocop.yml +0 -92
- data/.rubocop_todo.yml +0 -124
- data/Gemfile +0 -27
- data/Guardfile +0 -17
- data/cucumber.yml +0 -1
- data/examples/aaws.rb +0 -36
- data/examples/delicious.rb +0 -37
- data/examples/rubyurl.rb +0 -14
- data/examples/tripit_sign_in.rb +0 -44
- data/examples/twitter.rb +0 -31
- data/script/release +0 -42
- data/website/css/common.css +0 -47
- data/website/index.html +0 -73
|
@@ -18,8 +18,9 @@ module Net
|
|
|
18
18
|
add_field('Authorization', v)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
+
# Net::HTTP joins repeated fields with ", ", but cookies are split by "; ".
|
|
21
22
|
authenticator.cookie_header.each do |v|
|
|
22
|
-
|
|
23
|
+
self['Cookie'] = [self['Cookie'], v].compact.join('; ')
|
|
23
24
|
end
|
|
24
25
|
end
|
|
25
26
|
|
|
@@ -72,20 +73,17 @@ module Net
|
|
|
72
73
|
non_quoted = $1.gsub(/(\w+)="(.*?)"/) { params[$1] = $2 }
|
|
73
74
|
non_quoted.gsub(/(\w+)=([^,]*)/) { params[$1] = $2 }
|
|
74
75
|
end
|
|
76
|
+
# The server can offer a list, but the client has to answer with one.
|
|
77
|
+
params['qop'] = 'auth' if params['qop'].to_s.split(',').map(&:strip).include?('auth')
|
|
75
78
|
params
|
|
76
79
|
end
|
|
77
80
|
|
|
81
|
+
# Send back each cookie's name=value only. Attributes like Path and
|
|
82
|
+
# HttpOnly are for the client, and cookies share one header, split by "; ".
|
|
78
83
|
def parse_cookies(response_header)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
cookies
|
|
82
|
-
|
|
83
|
-
cookies.reduce([]) do |ret, cookie|
|
|
84
|
-
ret << cookie
|
|
85
|
-
ret
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
cookies
|
|
84
|
+
set_cookies = response_header.respond_to?(:get_fields) ? response_header.get_fields('Set-Cookie') : response_header['Set-Cookie']
|
|
85
|
+
cookies = Array(set_cookies).map { |cookie| cookie.split(';', 2).first.to_s.strip }.reject(&:empty?)
|
|
86
|
+
cookies.empty? ? [] : [cookies.join('; ')]
|
|
89
87
|
end
|
|
90
88
|
|
|
91
89
|
def opaque_present?
|
data/lib/httparty/parser.rb
CHANGED
|
@@ -80,7 +80,8 @@ module HTTParty
|
|
|
80
80
|
# @return [Symbol]
|
|
81
81
|
# @return [nil] mime type not supported
|
|
82
82
|
def self.format_from_mimetype(mimetype)
|
|
83
|
-
|
|
83
|
+
mimetype = mimetype.downcase
|
|
84
|
+
formats[formats.keys.detect {|k| mimetype.include?(k.downcase)}]
|
|
84
85
|
end
|
|
85
86
|
|
|
86
87
|
# @return [Array<Symbol>] list of supported formats
|
|
@@ -41,7 +41,7 @@ module HTTParty
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def prepared_parts
|
|
44
|
-
normalized_params = params.flat_map { |key, value| HashConversions.normalize_keys(key, value) }
|
|
44
|
+
normalized_params = params.to_hash.flat_map { |key, value| HashConversions.normalize_keys(key, value) }
|
|
45
45
|
normalized_params.map do |key, value|
|
|
46
46
|
[key, value, file?(value)]
|
|
47
47
|
end
|
|
@@ -57,7 +57,7 @@ module HTTParty
|
|
|
57
57
|
}.freeze
|
|
58
58
|
|
|
59
59
|
def generate_multipart
|
|
60
|
-
normalized_params = params.flat_map { |key, value| HashConversions.normalize_keys(key, value) }
|
|
60
|
+
normalized_params = params.to_hash.flat_map { |key, value| HashConversions.normalize_keys(key, value) }
|
|
61
61
|
|
|
62
62
|
multipart = normalized_params.inject(''.b) do |memo, (key, value)|
|
|
63
63
|
memo << "--#{boundary}#{NEWLINE}".b
|
|
@@ -15,6 +15,7 @@ module HTTParty
|
|
|
15
15
|
@header_buffer = nil
|
|
16
16
|
@header_offset = 0
|
|
17
17
|
@footer_sent = false
|
|
18
|
+
@read_buffer = ''.b
|
|
18
19
|
end
|
|
19
20
|
|
|
20
21
|
def size
|
|
@@ -27,9 +28,11 @@ module HTTParty
|
|
|
27
28
|
return read_all(outbuf) if length.nil?
|
|
28
29
|
|
|
29
30
|
while outbuf.bytesize < length
|
|
30
|
-
|
|
31
|
+
remaining = length - outbuf.bytesize
|
|
32
|
+
chunk = @read_buffer.empty? ? read_chunk(remaining) : @read_buffer
|
|
31
33
|
break if chunk.nil?
|
|
32
|
-
outbuf << chunk
|
|
34
|
+
outbuf << chunk.byteslice(0, remaining)
|
|
35
|
+
@read_buffer = chunk.byteslice(remaining..-1) || ''.b
|
|
33
36
|
end
|
|
34
37
|
|
|
35
38
|
outbuf.empty? ? nil : outbuf
|
|
@@ -42,6 +45,7 @@ module HTTParty
|
|
|
42
45
|
@header_buffer = nil
|
|
43
46
|
@header_offset = 0
|
|
44
47
|
@footer_sent = false
|
|
48
|
+
@read_buffer = ''.b
|
|
45
49
|
@parts.each do |_key, value, _is_file|
|
|
46
50
|
value.rewind if value.respond_to?(:rewind)
|
|
47
51
|
end
|
|
@@ -50,6 +54,8 @@ module HTTParty
|
|
|
50
54
|
private
|
|
51
55
|
|
|
52
56
|
def read_all(outbuf)
|
|
57
|
+
outbuf << @read_buffer
|
|
58
|
+
@read_buffer = ''.b
|
|
53
59
|
while (chunk = read_chunk(CHUNK_SIZE))
|
|
54
60
|
outbuf << chunk
|
|
55
61
|
end
|
|
@@ -110,6 +116,7 @@ module HTTParty
|
|
|
110
116
|
if chunk
|
|
111
117
|
return chunk
|
|
112
118
|
else
|
|
119
|
+
value.rewind if value.respond_to?(:rewind)
|
|
113
120
|
@current_file = nil
|
|
114
121
|
@state = :newline
|
|
115
122
|
return nil
|
data/lib/httparty/request.rb
CHANGED
|
@@ -78,11 +78,15 @@ module HTTParty
|
|
|
78
78
|
|
|
79
79
|
def path=(uri)
|
|
80
80
|
uri_adapter = options[:uri_adapter]
|
|
81
|
+
@slash_added_to_empty_path = false
|
|
81
82
|
|
|
82
83
|
@path = if uri.is_a?(uri_adapter)
|
|
83
84
|
uri
|
|
84
85
|
elsif String.try_convert(uri)
|
|
85
|
-
uri_adapter.parse(uri)
|
|
86
|
+
parsed_uri = uri_adapter.parse(uri)
|
|
87
|
+
normalized_uri = parsed_uri.normalize
|
|
88
|
+
@slash_added_to_empty_path = empty_path_reference?(parsed_uri) && normalized_uri.path == '/'
|
|
89
|
+
normalized_uri
|
|
86
90
|
else
|
|
87
91
|
raise ArgumentError,
|
|
88
92
|
"bad argument (expected #{uri_adapter} object or URI string)"
|
|
@@ -93,7 +97,7 @@ module HTTParty
|
|
|
93
97
|
if uri.respond_to? :request_uri
|
|
94
98
|
uri.request_uri
|
|
95
99
|
else
|
|
96
|
-
uri.path
|
|
100
|
+
uri.query ? "#{uri.path}?#{uri.query}" : uri.path
|
|
97
101
|
end
|
|
98
102
|
end
|
|
99
103
|
|
|
@@ -109,6 +113,7 @@ module HTTParty
|
|
|
109
113
|
new_uri = options[:uri_adapter].parse("#{@last_uri.scheme}:#{path}").normalize
|
|
110
114
|
elsif path.relative?
|
|
111
115
|
new_uri = options[:uri_adapter].parse("#{base_uri}#{path}").normalize
|
|
116
|
+
warn_about_empty_path_trailing_slash(new_uri) if !redirect && @slash_added_to_empty_path && new_uri.path != '/'
|
|
112
117
|
else
|
|
113
118
|
new_uri = path.clone
|
|
114
119
|
end
|
|
@@ -171,7 +176,7 @@ module HTTParty
|
|
|
171
176
|
end
|
|
172
177
|
|
|
173
178
|
handle_host_redirection if response_redirects?
|
|
174
|
-
result = handle_unauthorized
|
|
179
|
+
result = handle_unauthorized(&block)
|
|
175
180
|
result ||= handle_response(chunked_body, &block)
|
|
176
181
|
result
|
|
177
182
|
rescue *COMMON_NETWORK_ERRORS => e
|
|
@@ -191,9 +196,7 @@ module HTTParty
|
|
|
191
196
|
end
|
|
192
197
|
|
|
193
198
|
def _dump(_level)
|
|
194
|
-
opts = options.
|
|
195
|
-
opts.delete(:logger)
|
|
196
|
-
opts.delete(:parser) if opts[:parser] && opts[:parser].is_a?(Proc)
|
|
199
|
+
opts = options.reject { |key, value| value.is_a?(Proc) || %i[logger debug_output].include?(key) }
|
|
197
200
|
Marshal.dump([http_method, path, opts, last_response, @last_uri, @raw_request])
|
|
198
201
|
end
|
|
199
202
|
|
|
@@ -445,6 +448,26 @@ module HTTParty
|
|
|
445
448
|
).call
|
|
446
449
|
end
|
|
447
450
|
|
|
451
|
+
# A reference with no scheme, host or path ("", "?query" or "#fragment")
|
|
452
|
+
# refers to the base URI itself (RFC 3986 section 5.2.2).
|
|
453
|
+
def empty_path_reference?(uri)
|
|
454
|
+
uri.scheme.nil? && uri.host.nil? && uri.path.to_s.empty?
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
def warn_about_empty_path_trailing_slash(new_uri)
|
|
458
|
+
@slash_added_to_empty_path = false # warn once per request
|
|
459
|
+
trace_line = caller.reject { |line| line.include?('httparty') }.first
|
|
460
|
+
warning = "[DEPRECATION] HTTParty added a trailing slash to the request path " \
|
|
461
|
+
"(#{new_uri.path}) because the path passed to the request was empty. " \
|
|
462
|
+
"In HTTParty 0.25, an empty, query-only (\"?a=1\") or fragment-only path " \
|
|
463
|
+
"will request the base_uri path as-is, without a trailing slash, matching " \
|
|
464
|
+
"RFC 3986 and other HTTP clients. To keep the trailing slash, pass \"/\" as the path. " \
|
|
465
|
+
"For more info refer to: https://github.com/jnunemaker/httparty/issues/742\n" \
|
|
466
|
+
"#{trace_line}"
|
|
467
|
+
|
|
468
|
+
warn(warning)
|
|
469
|
+
end
|
|
470
|
+
|
|
448
471
|
def validate_uri_safety!(new_uri)
|
|
449
472
|
return if options[:skip_uri_validation]
|
|
450
473
|
|
data/lib/httparty/response.rb
CHANGED
|
@@ -11,7 +11,7 @@ module HTTParty
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def call
|
|
14
|
-
if
|
|
14
|
+
if charset
|
|
15
15
|
encoded_text
|
|
16
16
|
else
|
|
17
17
|
text
|
|
@@ -20,10 +20,6 @@ module HTTParty
|
|
|
20
20
|
|
|
21
21
|
private
|
|
22
22
|
|
|
23
|
-
def can_encode?
|
|
24
|
-
''.respond_to?(:encoding) && charset
|
|
25
|
-
end
|
|
26
|
-
|
|
27
23
|
def encoded_text
|
|
28
24
|
if 'utf-16'.casecmp(charset) == 0
|
|
29
25
|
encode_utf_16
|
data/lib/httparty/utils.rb
CHANGED
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
module HTTParty
|
|
4
4
|
module Utils
|
|
5
5
|
def self.stringify_keys(hash)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
hash.each_with_object({}) do |(key, value), new_hash|
|
|
9
|
-
new_hash[key.to_s] = value
|
|
10
|
-
end
|
|
6
|
+
hash.transform_keys(&:to_s)
|
|
11
7
|
end
|
|
12
8
|
end
|
|
13
9
|
end
|
data/lib/httparty/version.rb
CHANGED
data/lib/httparty.rb
CHANGED
|
@@ -37,7 +37,11 @@ module HTTParty
|
|
|
37
37
|
# [:+http_proxypass+:] Password for proxy server authentication.
|
|
38
38
|
# [:+limit+:] Maximum number of redirects to follow. Takes precedences over :+no_follow+.
|
|
39
39
|
# [:+query+:] Query string, or an object that responds to #to_hash representing it. Normalized according to the same rules as :+body+. If you specify this on a POST, you must use an object which responds to #to_hash. See also HTTParty::ClassMethods.default_params.
|
|
40
|
-
# [:+timeout+:] Timeout for opening connection and
|
|
40
|
+
# [:+timeout+:] Timeout for opening the connection, reading and writing.
|
|
41
|
+
# [:+open_timeout+:] Timeout for opening the connection. Overrides :+timeout+.
|
|
42
|
+
# [:+read_timeout+:] Timeout for each read. Overrides :+timeout+.
|
|
43
|
+
# [:+write_timeout+:] Timeout for each write. Overrides :+timeout+.
|
|
44
|
+
# [:+max_retries+:] Number of times Net::HTTP retries an idempotent request that times out or fails after connecting. Net::HTTP's default is 1.
|
|
41
45
|
# [:+local_host+:] Local address to bind to before connecting.
|
|
42
46
|
# [:+local_port+:] Local port to bind to before connecting.
|
|
43
47
|
# [:+body_stream+:] Allow streaming to a REST server to specify a body_stream.
|
|
@@ -85,11 +89,12 @@ module HTTParty
|
|
|
85
89
|
end
|
|
86
90
|
|
|
87
91
|
# Raises HTTParty::ResponseError if the response status matches a code,
|
|
88
|
-
# range, or regular expression string.
|
|
92
|
+
# range, or regular expression string. Codes and strings match anywhere
|
|
93
|
+
# in the status, so '3..' means any 3xx while '3[0-9]*' also matches 403.
|
|
89
94
|
#
|
|
90
95
|
# class Foo
|
|
91
96
|
# include HTTParty
|
|
92
|
-
# raise_on [404, 500..599, '3
|
|
97
|
+
# raise_on [404, 500..599, '3..']
|
|
93
98
|
# end
|
|
94
99
|
def raise_on(codes = [])
|
|
95
100
|
default_options[:raise_on] = codes.is_a?(Range) ? [codes] : [*codes]
|
|
@@ -210,7 +215,6 @@ module HTTParty
|
|
|
210
215
|
end
|
|
211
216
|
|
|
212
217
|
# Allows setting a default write_timeout for all HTTP calls in seconds
|
|
213
|
-
# Supported by Ruby > 2.6.0
|
|
214
218
|
#
|
|
215
219
|
# class Foo
|
|
216
220
|
# include HTTParty
|
|
@@ -251,7 +255,7 @@ module HTTParty
|
|
|
251
255
|
|
|
252
256
|
def cookies(h = {})
|
|
253
257
|
raise ArgumentError, 'Cookies must be an object which responds to #to_hash' unless h.respond_to?(:to_hash)
|
|
254
|
-
default_cookies.add_cookies(h)
|
|
258
|
+
default_cookies.add_cookies(h.to_hash)
|
|
255
259
|
end
|
|
256
260
|
|
|
257
261
|
# Proceed to the location header when an HTTP response dictates a redirect.
|
|
@@ -396,7 +400,7 @@ module HTTParty
|
|
|
396
400
|
default_options[:query_string_normalizer] = normalizer
|
|
397
401
|
end
|
|
398
402
|
|
|
399
|
-
# Allows setting of SSL version to use.
|
|
403
|
+
# Allows setting of SSL version to use.
|
|
400
404
|
# You can get a list of valid versions from OpenSSL::SSL::SSLContext::METHODS.
|
|
401
405
|
#
|
|
402
406
|
# class Foo
|
|
@@ -423,7 +427,7 @@ module HTTParty
|
|
|
423
427
|
default_options[:skip_decompression] = !!value
|
|
424
428
|
end
|
|
425
429
|
|
|
426
|
-
# Allows setting of SSL ciphers to use.
|
|
430
|
+
# Allows setting of SSL ciphers to use.
|
|
427
431
|
# You can get a list of valid specific ciphers from OpenSSL::Cipher.ciphers.
|
|
428
432
|
# You also can specify a cipher suite here, listed here at openssl.org:
|
|
429
433
|
# http://www.openssl.org/docs/apps/ciphers.html#CIPHER_SUITE_NAMES
|
|
@@ -575,8 +579,7 @@ module HTTParty
|
|
|
575
579
|
|
|
576
580
|
# Perform a HEAD request to a path
|
|
577
581
|
def head(path, options = {}, &block)
|
|
578
|
-
|
|
579
|
-
perform_request Net::HTTP::Head, path, options, &block
|
|
582
|
+
perform_request Net::HTTP::Head, path, { maintain_method_across_redirects: true }.merge(options), &block
|
|
580
583
|
end
|
|
581
584
|
|
|
582
585
|
# Perform an OPTIONS request to a path
|
|
@@ -589,10 +592,12 @@ module HTTParty
|
|
|
589
592
|
perform_request Net::HTTP::Mkcol, path, options, &block
|
|
590
593
|
end
|
|
591
594
|
|
|
595
|
+
# Perform a LOCK request to a path
|
|
592
596
|
def lock(path, options = {}, &block)
|
|
593
597
|
perform_request Net::HTTP::Lock, path, options, &block
|
|
594
598
|
end
|
|
595
599
|
|
|
600
|
+
# Perform an UNLOCK request to a path
|
|
596
601
|
def unlock(path, options = {}, &block)
|
|
597
602
|
perform_request Net::HTTP::Unlock, path, options, &block
|
|
598
603
|
end
|
|
@@ -612,12 +617,6 @@ module HTTParty
|
|
|
612
617
|
raise ArgumentError, "#{ timeout_type } must be an integer or float" unless value && (value.is_a?(Integer) || value.is_a?(Float))
|
|
613
618
|
end
|
|
614
619
|
|
|
615
|
-
def ensure_method_maintained_across_redirects(options)
|
|
616
|
-
unless options.key?(:maintain_method_across_redirects)
|
|
617
|
-
options[:maintain_method_across_redirects] = true
|
|
618
|
-
end
|
|
619
|
-
end
|
|
620
|
-
|
|
621
620
|
def perform_request(http_method, path, options, &block) #:nodoc:
|
|
622
621
|
build_request(http_method, path, options).perform(&block)
|
|
623
622
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: httparty
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.24.
|
|
4
|
+
version: 0.24.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John Nunemaker
|
|
8
8
|
- Sandro Turriate
|
|
9
|
+
autorequire:
|
|
9
10
|
bindir: bin
|
|
10
11
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
+
date: 2026-11-20 00:00:00.000000000 Z
|
|
12
13
|
dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
|
14
15
|
name: csv
|
|
@@ -61,28 +62,22 @@ extensions: []
|
|
|
61
62
|
extra_rdoc_files: []
|
|
62
63
|
files:
|
|
63
64
|
- ".editorconfig"
|
|
64
|
-
- ".github/dependabot.yml"
|
|
65
|
-
- ".github/workflows/ci.yml"
|
|
66
65
|
- ".gitignore"
|
|
67
|
-
- ".rubocop.yml"
|
|
68
|
-
- ".rubocop_todo.yml"
|
|
69
66
|
- CONTRIBUTING.md
|
|
70
67
|
- Changelog.md
|
|
71
|
-
- Gemfile
|
|
72
|
-
- Guardfile
|
|
73
68
|
- MIT-LICENSE
|
|
74
69
|
- README.md
|
|
75
70
|
- Rakefile
|
|
76
71
|
- bin/httparty
|
|
77
|
-
- cucumber.yml
|
|
78
72
|
- docs/README.md
|
|
79
73
|
- examples/README.md
|
|
80
|
-
- examples/aaws.rb
|
|
81
74
|
- examples/basic.rb
|
|
75
|
+
- examples/basic_auth.rb
|
|
82
76
|
- examples/body_stream.rb
|
|
77
|
+
- examples/cookies.rb
|
|
83
78
|
- examples/crack.rb
|
|
84
79
|
- examples/custom_parsers.rb
|
|
85
|
-
- examples/
|
|
80
|
+
- examples/debug_output.rb
|
|
86
81
|
- examples/google.rb
|
|
87
82
|
- examples/headers_and_user_agents.rb
|
|
88
83
|
- examples/idn.rb
|
|
@@ -93,11 +88,8 @@ files:
|
|
|
93
88
|
- examples/party_foul_mode.rb
|
|
94
89
|
- examples/peer_cert.rb
|
|
95
90
|
- examples/rescue_json.rb
|
|
96
|
-
- examples/rubyurl.rb
|
|
97
91
|
- examples/stackexchange.rb
|
|
98
92
|
- examples/stream_download.rb
|
|
99
|
-
- examples/tripit_sign_in.rb
|
|
100
|
-
- examples/twitter.rb
|
|
101
93
|
- examples/whoismyrep.rb
|
|
102
94
|
- httparty.gemspec
|
|
103
95
|
- lib/httparty.rb
|
|
@@ -124,9 +116,6 @@ files:
|
|
|
124
116
|
- lib/httparty/text_encoder.rb
|
|
125
117
|
- lib/httparty/utils.rb
|
|
126
118
|
- lib/httparty/version.rb
|
|
127
|
-
- script/release
|
|
128
|
-
- website/css/common.css
|
|
129
|
-
- website/index.html
|
|
130
119
|
homepage: https://github.com/jnunemaker/httparty
|
|
131
120
|
licenses:
|
|
132
121
|
- MIT
|
|
@@ -147,7 +136,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
147
136
|
- !ruby/object:Gem::Version
|
|
148
137
|
version: '0'
|
|
149
138
|
requirements: []
|
|
150
|
-
rubygems_version:
|
|
139
|
+
rubygems_version: 3.3.7
|
|
140
|
+
signing_key:
|
|
151
141
|
specification_version: 4
|
|
152
142
|
summary: Makes http fun! Also, makes consuming restful web services dead easy.
|
|
153
143
|
test_files: []
|
data/.github/dependabot.yml
DELETED
data/.github/workflows/ci.yml
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
on: [push, pull_request]
|
|
3
|
-
jobs:
|
|
4
|
-
build:
|
|
5
|
-
runs-on: ubuntu-latest
|
|
6
|
-
strategy:
|
|
7
|
-
matrix:
|
|
8
|
-
ruby:
|
|
9
|
-
- 2.7
|
|
10
|
-
- "3.0" # Quoted, to avoid YAML float 3.0 interplated to "3"
|
|
11
|
-
- 3.1
|
|
12
|
-
- 3.2
|
|
13
|
-
- 3.3
|
|
14
|
-
- 3.4
|
|
15
|
-
steps:
|
|
16
|
-
- name: Check out repository code
|
|
17
|
-
uses: actions/checkout@v6
|
|
18
|
-
- name: Set up Ruby
|
|
19
|
-
uses: ruby/setup-ruby@v1
|
|
20
|
-
with:
|
|
21
|
-
ruby-version: ${{ matrix.ruby }}
|
|
22
|
-
bundler-cache: true # Run "bundle install", and cache the result automatically.
|
|
23
|
-
- name: Run Rake
|
|
24
|
-
run: bundle exec rake
|
data/.rubocop.yml
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
|
2
|
-
|
|
3
|
-
# Offense count: 963
|
|
4
|
-
# Cop supports --auto-correct.
|
|
5
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
6
|
-
Style/StringLiterals:
|
|
7
|
-
Enabled: false
|
|
8
|
-
|
|
9
|
-
# Offense count: 327
|
|
10
|
-
# Cop supports --auto-correct.
|
|
11
|
-
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
|
12
|
-
Style/SpaceInsideHashLiteralBraces:
|
|
13
|
-
Enabled: false
|
|
14
|
-
|
|
15
|
-
# Offense count: 33
|
|
16
|
-
# Cop supports --auto-correct.
|
|
17
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
|
18
|
-
Style/SpaceInsideBlockBraces:
|
|
19
|
-
Enabled: false
|
|
20
|
-
|
|
21
|
-
# Offense count: 1
|
|
22
|
-
# Cop supports --auto-correct.
|
|
23
|
-
Style/SpaceBeforeSemicolon:
|
|
24
|
-
Enabled: false
|
|
25
|
-
|
|
26
|
-
# Offense count: 20
|
|
27
|
-
# Cop supports --auto-correct.
|
|
28
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
29
|
-
Style/SignalException:
|
|
30
|
-
Enabled: false
|
|
31
|
-
|
|
32
|
-
# Offense count: 1
|
|
33
|
-
# Configuration parameters: Methods.
|
|
34
|
-
Style/SingleLineBlockParams:
|
|
35
|
-
Enabled: false
|
|
36
|
-
|
|
37
|
-
# Offense count: 6
|
|
38
|
-
# Cop supports --auto-correct.
|
|
39
|
-
Style/PerlBackrefs:
|
|
40
|
-
Enabled: false
|
|
41
|
-
|
|
42
|
-
# Offense count: 2
|
|
43
|
-
# Cop supports --auto-correct.
|
|
44
|
-
# Configuration parameters: AllowAsExpressionSeparator.
|
|
45
|
-
Style/Semicolon:
|
|
46
|
-
Enabled: false
|
|
47
|
-
|
|
48
|
-
# Offense count: 77
|
|
49
|
-
# Cop supports --auto-correct.
|
|
50
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
51
|
-
Style/BracesAroundHashParameters:
|
|
52
|
-
Enabled: false
|
|
53
|
-
|
|
54
|
-
# Offense count: 36
|
|
55
|
-
Style/Documentation:
|
|
56
|
-
Enabled: false
|
|
57
|
-
|
|
58
|
-
# Offense count: 6
|
|
59
|
-
# Cop supports --auto-correct.
|
|
60
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
|
|
61
|
-
Style/RegexpLiteral:
|
|
62
|
-
Enabled: false
|
|
63
|
-
|
|
64
|
-
# Offense count: 5
|
|
65
|
-
# Cop supports --auto-correct.
|
|
66
|
-
Style/NumericLiterals:
|
|
67
|
-
MinDigits: 6
|
|
68
|
-
|
|
69
|
-
# Offense count: 4
|
|
70
|
-
# Cop supports --auto-correct.
|
|
71
|
-
Lint/UnusedMethodArgument:
|
|
72
|
-
Enabled: false
|
|
73
|
-
|
|
74
|
-
# Offense count: 11
|
|
75
|
-
# Cop supports --auto-correct.
|
|
76
|
-
Lint/UnusedBlockArgument:
|
|
77
|
-
Enabled: false
|
|
78
|
-
|
|
79
|
-
# Offense count: 1
|
|
80
|
-
Lint/Void:
|
|
81
|
-
Enabled: false
|
|
82
|
-
|
|
83
|
-
# Offense count: 22
|
|
84
|
-
# Cop supports --auto-correct.
|
|
85
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
86
|
-
Style/IndentHash:
|
|
87
|
-
Enabled: false
|
|
88
|
-
|
|
89
|
-
# Offense count: 7
|
|
90
|
-
# Configuration parameters: MinBodyLength.
|
|
91
|
-
Style/GuardClause:
|
|
92
|
-
Enabled: false
|
data/.rubocop_todo.yml
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
# This configuration was generated by `rubocop --auto-gen-config`
|
|
2
|
-
# on 2015-04-24 07:22:28 +0200 using RuboCop version 0.30.0.
|
|
3
|
-
# The point is for the user to remove these configuration records
|
|
4
|
-
# one by one as the offenses are removed from the code base.
|
|
5
|
-
# Note that changes in the inspected code, or installation of new
|
|
6
|
-
# versions of RuboCop, may require this file to be generated again.
|
|
7
|
-
|
|
8
|
-
# Offense count: 33
|
|
9
|
-
Lint/AmbiguousRegexpLiteral:
|
|
10
|
-
Enabled: false
|
|
11
|
-
|
|
12
|
-
# Offense count: 1
|
|
13
|
-
# Configuration parameters: AlignWith, SupportedStyles.
|
|
14
|
-
Lint/EndAlignment:
|
|
15
|
-
Enabled: false
|
|
16
|
-
|
|
17
|
-
# Offense count: 1
|
|
18
|
-
Lint/SuppressedException:
|
|
19
|
-
Enabled: false
|
|
20
|
-
|
|
21
|
-
# Offense count: 5
|
|
22
|
-
Lint/UselessAssignment:
|
|
23
|
-
Enabled: false
|
|
24
|
-
|
|
25
|
-
# Offense count: 23
|
|
26
|
-
Metrics/AbcSize:
|
|
27
|
-
Max: 86
|
|
28
|
-
|
|
29
|
-
# Offense count: 1
|
|
30
|
-
# Configuration parameters: CountComments.
|
|
31
|
-
Metrics/ClassLength:
|
|
32
|
-
Max: 285
|
|
33
|
-
|
|
34
|
-
# Offense count: 8
|
|
35
|
-
Metrics/CyclomaticComplexity:
|
|
36
|
-
Max: 17
|
|
37
|
-
|
|
38
|
-
# Offense count: 332
|
|
39
|
-
# Configuration parameters: AllowURI, URISchemes.
|
|
40
|
-
Metrics/LineLength:
|
|
41
|
-
Max: 266
|
|
42
|
-
|
|
43
|
-
# Offense count: 17
|
|
44
|
-
# Configuration parameters: CountComments.
|
|
45
|
-
Metrics/MethodLength:
|
|
46
|
-
Max: 39
|
|
47
|
-
|
|
48
|
-
# Offense count: 8
|
|
49
|
-
Metrics/PerceivedComplexity:
|
|
50
|
-
Max: 20
|
|
51
|
-
|
|
52
|
-
# Offense count: 1
|
|
53
|
-
Style/AccessorMethodName:
|
|
54
|
-
Enabled: false
|
|
55
|
-
|
|
56
|
-
# Offense count: 1
|
|
57
|
-
Style/AsciiComments:
|
|
58
|
-
Enabled: false
|
|
59
|
-
|
|
60
|
-
# Offense count: 14
|
|
61
|
-
# Cop supports --auto-correct.
|
|
62
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
|
63
|
-
Style/BlockDelimiters:
|
|
64
|
-
Enabled: false
|
|
65
|
-
|
|
66
|
-
# Offense count: 2
|
|
67
|
-
Style/CaseEquality:
|
|
68
|
-
Enabled: false
|
|
69
|
-
|
|
70
|
-
# Offense count: 3
|
|
71
|
-
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
|
|
72
|
-
Style/CaseIndentation:
|
|
73
|
-
Enabled: false
|
|
74
|
-
|
|
75
|
-
# Offense count: 4
|
|
76
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
77
|
-
Style/ClassAndModuleChildren:
|
|
78
|
-
Enabled: false
|
|
79
|
-
|
|
80
|
-
# Offense count: 7
|
|
81
|
-
Style/ConstantName:
|
|
82
|
-
Enabled: false
|
|
83
|
-
|
|
84
|
-
# Offense count: 2
|
|
85
|
-
Style/EachWithObject:
|
|
86
|
-
Enabled: false
|
|
87
|
-
|
|
88
|
-
# Offense count: 2
|
|
89
|
-
# Cop supports --auto-correct.
|
|
90
|
-
Style/ElseAlignment:
|
|
91
|
-
Enabled: false
|
|
92
|
-
|
|
93
|
-
# Offense count: 3
|
|
94
|
-
# Cop supports --auto-correct.
|
|
95
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
96
|
-
Style/FirstParameterIndentation:
|
|
97
|
-
Enabled: false
|
|
98
|
-
|
|
99
|
-
# Offense count: 2
|
|
100
|
-
# Cop supports --auto-correct.
|
|
101
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
|
|
102
|
-
Style/HashSyntax:
|
|
103
|
-
Enabled: false
|
|
104
|
-
|
|
105
|
-
# Offense count: 7
|
|
106
|
-
# Cop supports --auto-correct.
|
|
107
|
-
# Configuration parameters: MaxLineLength.
|
|
108
|
-
Style/IfUnlessModifier:
|
|
109
|
-
Enabled: false
|
|
110
|
-
|
|
111
|
-
# Offense count: 11
|
|
112
|
-
# Cop supports --auto-correct.
|
|
113
|
-
Style/Lambda:
|
|
114
|
-
Enabled: false
|
|
115
|
-
|
|
116
|
-
# Offense count: 1
|
|
117
|
-
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
|
|
118
|
-
Style/Next:
|
|
119
|
-
Enabled: false
|
|
120
|
-
|
|
121
|
-
# Offense count: 2
|
|
122
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
123
|
-
Style/RaiseArgs:
|
|
124
|
-
Enabled: false
|