rest-client 1.6.7 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.mailmap +10 -0
  4. data/.rspec +2 -0
  5. data/.rubocop +2 -0
  6. data/.rubocop-disables.yml +386 -0
  7. data/.rubocop.yml +8 -0
  8. data/.travis.yml +62 -0
  9. data/AUTHORS +106 -0
  10. data/Gemfile +11 -0
  11. data/LICENSE +21 -0
  12. data/README.md +901 -0
  13. data/Rakefile +109 -35
  14. data/bin/restclient +11 -12
  15. data/history.md +244 -1
  16. data/lib/restclient.rb +27 -18
  17. data/lib/restclient/abstract_response.rb +197 -51
  18. data/lib/restclient/exceptions.rb +110 -59
  19. data/lib/restclient/params_array.rb +72 -0
  20. data/lib/restclient/payload.rb +74 -75
  21. data/lib/restclient/platform.rb +49 -0
  22. data/lib/restclient/raw_response.rb +21 -6
  23. data/lib/restclient/request.rb +747 -183
  24. data/lib/restclient/resource.rb +22 -13
  25. data/lib/restclient/response.rb +75 -9
  26. data/lib/restclient/utils.rb +274 -0
  27. data/lib/restclient/version.rb +8 -0
  28. data/lib/restclient/windows.rb +8 -0
  29. data/lib/restclient/windows/root_certs.rb +105 -0
  30. data/rest-client.gemspec +32 -0
  31. data/rest-client.windows.gemspec +19 -0
  32. data/spec/ISS.jpg +0 -0
  33. data/spec/helpers.rb +54 -0
  34. data/spec/integration/_lib.rb +1 -0
  35. data/spec/integration/capath_digicert/3513523f.0 +22 -0
  36. data/spec/integration/capath_digicert/399e7759.0 +22 -0
  37. data/spec/integration/capath_digicert/README +8 -0
  38. data/spec/integration/capath_digicert/digicert.crt +22 -0
  39. data/spec/integration/capath_verisign/415660c1.0 +14 -0
  40. data/spec/integration/capath_verisign/7651b327.0 +14 -0
  41. data/spec/integration/capath_verisign/README +8 -0
  42. data/spec/integration/capath_verisign/verisign.crt +14 -0
  43. data/spec/integration/certs/digicert.crt +22 -0
  44. data/spec/integration/httpbin_spec.rb +128 -0
  45. data/spec/integration/integration_spec.rb +118 -0
  46. data/spec/integration/request_spec.rb +109 -7
  47. data/spec/spec_helper.rb +29 -0
  48. data/spec/unit/_lib.rb +1 -0
  49. data/spec/unit/abstract_response_spec.rb +145 -0
  50. data/spec/unit/exceptions_spec.rb +108 -0
  51. data/spec/unit/params_array_spec.rb +36 -0
  52. data/spec/unit/payload_spec.rb +295 -0
  53. data/spec/unit/raw_response_spec.rb +22 -0
  54. data/spec/unit/request2_spec.rb +54 -0
  55. data/spec/unit/request_spec.rb +1238 -0
  56. data/spec/unit/resource_spec.rb +134 -0
  57. data/spec/unit/response_spec.rb +252 -0
  58. data/spec/unit/restclient_spec.rb +80 -0
  59. data/spec/unit/utils_spec.rb +147 -0
  60. data/spec/unit/windows/root_certs_spec.rb +22 -0
  61. metadata +265 -117
  62. data/README.rdoc +0 -285
  63. data/VERSION +0 -1
  64. data/lib/restclient/net_http_ext.rb +0 -55
  65. data/spec/abstract_response_spec.rb +0 -85
  66. data/spec/base.rb +0 -16
  67. data/spec/exceptions_spec.rb +0 -98
  68. data/spec/integration/certs/equifax.crt +0 -19
  69. data/spec/integration_spec.rb +0 -38
  70. data/spec/master_shake.jpg +0 -0
  71. data/spec/payload_spec.rb +0 -234
  72. data/spec/raw_response_spec.rb +0 -17
  73. data/spec/request2_spec.rb +0 -40
  74. data/spec/request_spec.rb +0 -529
  75. data/spec/resource_spec.rb +0 -134
  76. data/spec/response_spec.rb +0 -169
  77. data/spec/restclient_spec.rb +0 -73
data/Rakefile CHANGED
@@ -1,66 +1,140 @@
1
- require 'rake'
2
-
3
- require 'jeweler'
4
-
5
- Jeweler::Tasks.new do |s|
6
- s.name = "rest-client"
7
- s.description = "A simple HTTP and REST client for Ruby, inspired by the Sinatra microframework style of specifying actions: get, put, post, delete."
8
- s.summary = "Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions."
9
- s.authors = ["Adam Wiggins", "Julien Kirch"]
10
- s.email = "rest.client@librelist.com"
11
- s.homepage = "http://github.com/archiloque/rest-client"
12
- s.files = FileList["[A-Z]*", "{bin,lib,spec}/**/*"]
13
- s.test_files = FileList["{spec}/**/*"]
14
- s.add_runtime_dependency("mime-types", ">= 1.16")
15
- s.add_development_dependency("webmock", ">= 0.9.1")
16
- s.add_development_dependency("rspec")
17
- s.extra_rdoc_files = [ 'README.rdoc', 'history.md']
18
- end
1
+ # load `rake build/install/release tasks'
2
+ require 'bundler/setup'
3
+ require_relative './lib/restclient/version'
19
4
 
20
- ############################
5
+ namespace :ruby do
6
+ Bundler::GemHelper.install_tasks(:name => 'rest-client')
7
+ end
21
8
 
22
- require 'spec/rake/spectask'
9
+ require "rspec/core/rake_task"
23
10
 
24
11
  desc "Run all specs"
25
- task :spec => ["spec:unit", "spec:integration"]
12
+ RSpec::Core::RakeTask.new('spec')
26
13
 
27
14
  desc "Run unit specs"
28
- Spec::Rake::SpecTask.new('spec:unit') do |t|
29
- t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
30
- t.spec_files = FileList['spec/*_spec.rb']
15
+ RSpec::Core::RakeTask.new('spec:unit') do |t|
16
+ t.pattern = 'spec/unit/*_spec.rb'
31
17
  end
32
18
 
33
19
  desc "Run integration specs"
34
- Spec::Rake::SpecTask.new('spec:integration') do |t|
35
- t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
36
- t.spec_files = FileList['spec/integration/*_spec.rb']
20
+ RSpec::Core::RakeTask.new('spec:integration') do |t|
21
+ t.pattern = 'spec/integration/*_spec.rb'
37
22
  end
38
23
 
39
24
  desc "Print specdocs"
40
- Spec::Rake::SpecTask.new(:doc) do |t|
41
- t.spec_opts = ["--format", "specdoc", "--dry-run"]
42
- t.spec_files = FileList['spec/*_spec.rb']
25
+ RSpec::Core::RakeTask.new(:doc) do |t|
26
+ t.rspec_opts = ["--format", "specdoc", "--dry-run"]
27
+ t.pattern = 'spec/**/*_spec.rb'
43
28
  end
44
29
 
45
30
  desc "Run all examples with RCov"
46
- Spec::Rake::SpecTask.new('rcov') do |t|
47
- t.spec_files = FileList['spec/*_spec.rb']
31
+ RSpec::Core::RakeTask.new('rcov') do |t|
32
+ t.pattern = 'spec/*_spec.rb'
48
33
  t.rcov = true
49
34
  t.rcov_opts = ['--exclude', 'examples']
50
35
  end
51
36
 
52
- task :default => :spec
37
+ desc 'Regenerate authors file'
38
+ task :authors do
39
+ Dir.chdir(File.dirname(__FILE__)) do
40
+ File.open('AUTHORS', 'w') do |f|
41
+ f.write <<-EOM
42
+ The Ruby REST Client would not be what it is today without the help of
43
+ the following kind souls:
44
+
45
+ EOM
46
+ end
47
+
48
+ sh 'git shortlog -s | cut -f 2 >> AUTHORS'
49
+ end
50
+ end
51
+
52
+ task :default do
53
+ sh 'rake -T'
54
+ end
55
+
56
+ def alias_task(alias_task, original)
57
+ desc "Alias for rake #{original}"
58
+ task alias_task, Rake.application[original].arg_names => original
59
+ end
60
+ alias_task(:test, :spec)
61
+
62
+ ############################
63
+
64
+ WindowsPlatforms = %w{x86-mingw32 x64-mingw32 x86-mswin32}
65
+
66
+ namespace :all do
67
+
68
+ desc "Build rest-client #{RestClient::VERSION} for all platforms"
69
+ task :build => ['ruby:build'] + \
70
+ WindowsPlatforms.map {|p| "windows:#{p}:build"}
71
+
72
+ desc "Create tag v#{RestClient::VERSION} and for all platforms build and " \
73
+ "push rest-client #{RestClient::VERSION} to Rubygems"
74
+ task :release => ['build', 'ruby:release'] + \
75
+ WindowsPlatforms.map {|p| "windows:#{p}:push"}
76
+
77
+ end
78
+
79
+ namespace :windows do
80
+ spec_path = File.join(File.dirname(__FILE__), 'rest-client.windows.gemspec')
81
+
82
+ WindowsPlatforms.each do |platform|
83
+ namespace platform do
84
+ gem_filename = "rest-client-#{RestClient::VERSION}-#{platform}.gem"
85
+ base = File.dirname(__FILE__)
86
+ pkg_dir = File.join(base, 'pkg')
87
+ gem_file_path = File.join(pkg_dir, gem_filename)
88
+
89
+ desc "Build #{gem_filename} into the pkg directory"
90
+ task 'build' do
91
+ orig_platform = ENV['BUILD_PLATFORM']
92
+ begin
93
+ ENV['BUILD_PLATFORM'] = platform
94
+
95
+ sh("gem build -V #{spec_path}") do |ok, res|
96
+ if ok
97
+ FileUtils.mkdir_p(pkg_dir)
98
+ FileUtils.mv(File.join(base, gem_filename), pkg_dir)
99
+ Bundler.ui.confirm("rest-client #{RestClient::VERSION} " \
100
+ "built to pkg/#{gem_filename}")
101
+ else
102
+ abort "Command `gem build` failed: #{res}"
103
+ end
104
+ end
105
+
106
+ ensure
107
+ ENV['BUILD_PLATFORM'] = orig_platform
108
+ end
109
+ end
110
+
111
+ desc "Push #{gem_filename} to Rubygems"
112
+ task 'push' do
113
+ sh("gem push #{gem_file_path}")
114
+ end
115
+ end
116
+ end
117
+
118
+ end
53
119
 
54
120
  ############################
55
121
 
56
- require 'rake/rdoctask'
122
+ require 'rdoc/task'
57
123
 
58
124
  Rake::RDocTask.new do |t|
59
125
  t.rdoc_dir = 'rdoc'
60
126
  t.title = "rest-client, fetch RESTful resources effortlessly"
61
127
  t.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
62
128
  t.options << '--charset' << 'utf-8'
63
- t.rdoc_files.include('README.rdoc')
129
+ t.rdoc_files.include('README.md')
64
130
  t.rdoc_files.include('lib/*.rb')
65
131
  end
66
132
 
133
+ ############################
134
+
135
+ require 'rubocop/rake_task'
136
+
137
+ RuboCop::RakeTask.new(:rubocop) do |t|
138
+ t.options = ['--display-cop-names']
139
+ end
140
+ alias_task(:lint, :rubocop)
data/bin/restclient CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $:.unshift File.dirname(__FILE__) + "/../lib"
3
+ $LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib"
4
4
 
5
5
  require 'rubygems'
6
6
  require 'restclient'
@@ -26,10 +26,10 @@ end
26
26
 
27
27
  config = YAML.load(File.read(ENV['HOME'] + "/.restclient")) rescue {}
28
28
 
29
- @url, @username, @password = if c = config[@url]
30
- [c['url'], c['username'], c['password']]
29
+ if (c = config[@url])
30
+ @url, @username, @password = [c['url'], c['username'], c['password']]
31
31
  else
32
- [@url, * ARGV]
32
+ @url, @username, @password = [@url, * ARGV]
33
33
  end
34
34
 
35
35
  usage("invalid url '#{@url}") unless @url =~ /^https?/
@@ -50,17 +50,15 @@ if @verb
50
50
  end
51
51
  exit 0
52
52
  rescue RestClient::Exception => e
53
- puts e.response.body if e.respond_to? :response
53
+ puts e.response.body if e.respond_to?(:response) && e.response
54
54
  raise
55
55
  end
56
56
  end
57
57
 
58
58
  POSSIBLE_VERBS.each do |m|
59
- eval <<-end_eval
60
- def #{m}(path, *args, &b)
61
- r[path].#{m}(*args, &b)
62
- end
63
- end_eval
59
+ define_method(m.to_sym) do |path, *args, &b|
60
+ r[path].public_send(m.to_sym, *args, &b)
61
+ end
64
62
  end
65
63
 
66
64
  def method_missing(s, * args, & b)
@@ -79,11 +77,12 @@ end
79
77
  require 'irb'
80
78
  require 'irb/completion'
81
79
 
82
- if File.exists? ".irbrc"
80
+ if File.exist? ".irbrc"
83
81
  ENV['IRBRC'] = ".irbrc"
84
82
  end
85
83
 
86
- if File.exists?(File.expand_path(rcfile = "~/.restclientrc"))
84
+ rcfile = File.expand_path("~/.restclientrc")
85
+ if File.exist?(rcfile)
87
86
  load(rcfile)
88
87
  end
89
88
 
data/history.md CHANGED
@@ -1,3 +1,246 @@
1
+ # 2.1.0
2
+
3
+ - Add a dependency on http-accept for parsing Content-Type charset headers.
4
+ This works around a bad memory leak introduced in MRI Ruby 2.4.0 and fixed in
5
+ Ruby 2.4.2. (#615)
6
+ - Use mime/types/columnar from mime-types 2.6.1+, which is leaner in memory
7
+ usage than the older storage model of mime-types. (#393)
8
+ - Add `:log` option to individual requests. This allows users to set a log on a
9
+ per-request / per-resource basis instead of the kludgy global log. (#538)
10
+ - Log request duration by tracking request start and end times. Make
11
+ `log_response` a method on the Response object, and ensure the `size` method
12
+ works on RawResponse objects. (#126)
13
+ - `# => 200 OK | text/html 1270 bytes, 0.08s`
14
+ - Also add a new `:stream_log_percent` parameter, which is applicable only
15
+ when `:raw_response => true` is set. This causes progress logs to be
16
+ emitted only on every N% (default 10%) of the total download size rather
17
+ than on every chunk.
18
+ - Drop custom handling of compression and use built-in Net::HTTP support for
19
+ supported Content-Encodings like gzip and deflate. Don't set any explicit
20
+ `Accept-Encoding` header, rely instead on Net::HTTP defaults. (#597)
21
+ - Note: this changes behavior for compressed responses when using
22
+ `:raw_response => true`. Previously the raw response would not have been
23
+ uncompressed by rest-client, but now Net::HTTP will uncompress it.
24
+ - The previous fix to avoid having Netrc username/password override an
25
+ Authorization header was case-sensitive and incomplete. Fix this by
26
+ respecting existing Authorization headers, regardless of letter case. (#550)
27
+ - Handle ParamsArray payloads. Previously, rest-client would silently drop a
28
+ ParamsArray passed as the payload. Instead, automatically use
29
+ Payload::Multipart if the ParamsArray contains a file handle, or use
30
+ Payload::UrlEncoded if it doesn't. (#508)
31
+ - Gracefully handle Payload objects (Payload::Base or subclasses) that are
32
+ passed as a payload argument. Previously, `Payload.generate` would wrap a
33
+ Payload object in Payload::Streamed, creating a pointlessly nested payload.
34
+ Also add a `closed?` method to Payload objects, and don't error in
35
+ `short_inspect` if `size` returns nil. (#603)
36
+ - Test with an image in the public domain to avoid licensing complexity. (#607)
37
+
38
+ # 2.0.2
39
+
40
+ - Suppress the header override warning introduced in 2.0.1 if the value is the
41
+ same. There's no conflict if the value is unchanged. (#578)
42
+
43
+ # 2.0.1
44
+
45
+ - Warn if auto-generated headers from the payload, such as Content-Type,
46
+ override headers set by the user. This is usually not what the user wants to
47
+ happen, and can be surprising. (#554)
48
+ - Drop the old check for weak default TLS ciphers, and use the built-in Ruby
49
+ defaults. Ruby versions from Oct. 2014 onward use sane defaults, so this is
50
+ no longer needed. (#573)
51
+
52
+ # 2.0.0
53
+
54
+ This release is largely API compatible, but makes several breaking changes.
55
+
56
+ - Drop support for Ruby 1.9
57
+ - Allow mime-types as new as 3.x (requires ruby 2.0)
58
+ - Respect Content-Type charset header provided by server. Previously,
59
+ rest-client would not override the string encoding chosen by Net::HTTP. Now
60
+ responses that specify a charset will yield a body string in that encoding.
61
+ For example, `Content-Type: text/plain; charset=EUC-JP` will return a String
62
+ encoded with `Encoding::EUC_JP`. (#361)
63
+ - Change exceptions raised on request timeout. Instead of
64
+ `RestClient::RequestTimeout` (which is still used for HTTP 408), network
65
+ timeouts will now raise either `RestClient::Exceptions::ReadTimeout` or
66
+ `RestClient::Exceptions::OpenTimeout`, both of which inherit from
67
+ `RestClient::Exceptions::Timeout`. For backwards compatibility, this still
68
+ inherits from `RestClient::RequestTimeout` so existing uses will still work.
69
+ This may change in a future major release. These new timeout classes also
70
+ make the original wrapped exception available as `#original_exception`.
71
+ - Unify request exceptions under `RestClient::RequestFailed`, which still
72
+ inherits from `ExceptionWithResponse`. Previously, HTTP 304, 401, and 404
73
+ inherited directly from `ExceptionWithResponse` rather than from
74
+ `RequestFailed`. Now _all_ HTTP status code exceptions inherit from both.
75
+ - Rename the `:timeout` request option to `:read_timeout`. When `:timeout` is
76
+ passed, now set both `:read_timeout` and `:open_timeout`.
77
+ - Change default HTTP Accept header to `*/*`
78
+ - Use a more descriptive User-Agent header by default
79
+ - Drop RC4-MD5 from default cipher list
80
+ - Only prepend http:// to URIs without a scheme
81
+ - Fix some support for using IPv6 addresses in URLs (still affected by Ruby
82
+ 2.0+ bug https://bugs.ruby-lang.org/issues/9129, with the fix expected to be
83
+ backported to 2.0 and 2.1)
84
+ - `Response` objects are now a subclass of `String` rather than a `String` that
85
+ mixes in the response functionality. Most of the methods remain unchanged,
86
+ but this makes it much easier to understand what is happening when you look
87
+ at a RestClient response object. There are a few additional changes:
88
+ - Response objects now implement `.inspect` to make this distinction clearer.
89
+ - `Response#to_i` will now behave like `String#to_i` instead of returning the
90
+ HTTP response code, which was very surprising behavior.
91
+ - `Response#body` and `#to_s` will now return a true `String` object rather
92
+ than self. Previously there was no easy way to get the true `String`
93
+ response instead of the Frankenstein response string object with
94
+ AbstractResponse mixed in.
95
+ - Response objects no longer accept an extra request args hash, but instead
96
+ access request args directly from the request object, which reduces
97
+ confusion and duplication.
98
+ - Handle multiple HTTP response headers with the same name (except for
99
+ Set-Cookie, which is special) by joining the values with a comma space,
100
+ compliant with RFC 7230
101
+ - Rewrite cookie support to be much smarter and to use cookie jars consistently
102
+ for requests, responses, and redirection in order to resolve long-standing
103
+ complaints about the previously broken behavior: (#498)
104
+ - The `:cookies` option may now be a Hash of Strings, an Array of
105
+ HTTP::Cookie objects, or a full HTTP::CookieJar.
106
+ - Add `RestClient::Request#cookie_jar` and reimplement `Request#cookies` to
107
+ be a wrapper around the cookie jar.
108
+ - Still support passing the `:cookies` option in the headers hash, but now
109
+ raise ArgumentError if that option is also passed to `Request#initialize`.
110
+ - Warn if both `:cookies` and a `Cookie` header are supplied.
111
+ - Use the `Request#cookie_jar` as the basis for `Response#cookie_jar`,
112
+ creating a copy of the jar and adding any newly received cookies.
113
+ - When following redirection, also use this same strategy so that cookies
114
+ from the original request are carried through in a standards-compliant way
115
+ by the cookie jar.
116
+ - Don't set basic auth header if explicit `Authorization` header is specified
117
+ - Add `:proxy` option to requests, which can be used for thread-safe
118
+ per-request proxy configuration, overriding `RestClient.proxy`
119
+ - Allow overriding `ENV['http_proxy']` to disable proxies by setting
120
+ `RestClient.proxy` to a falsey value. Previously there was no way in Ruby 2.x
121
+ to turn off a proxy specified in the environment without changing `ENV`.
122
+ - Add actual support for streaming request payloads. Previously rest-client
123
+ would call `.to_s` even on RestClient::Payload::Streamed objects. Instead,
124
+ treat any object that responds to `.read` as a streaming payload and pass it
125
+ through to `.body_stream=` on the Net:HTTP object. This massively reduces the
126
+ memory required for large file uploads.
127
+ - Changes to redirection behavior: (#381, #484)
128
+ - Remove `RestClient::MaxRedirectsReached` in favor of the normal
129
+ `ExceptionWithResponse` subclasses. This makes the response accessible on
130
+ the exception object as `.response`, making it possible for callers to tell
131
+ what has actually happened when the redirect limit is reached.
132
+ - When following HTTP redirection, store a list of each previous response on
133
+ the response object as `.history`. This makes it possible to access the
134
+ original response headers and body before the redirection was followed.
135
+ - Follow redirection consistently, regardless of whether the HTTP method was
136
+ passed as a symbol or string. Under the hood rest-client now normalizes the
137
+ HTTP request method to a lowercase string.
138
+ - Add `:before_execution_proc` option to `RestClient::Request`. This makes it
139
+ possible to add procs like `RestClient.add_before_execution_proc` to a single
140
+ request without global state.
141
+ - Run tests on Travis's beta OS X support.
142
+ - Make `Request#transmit` a private method, along with a few others.
143
+ - Refactor URI parsing to happen earlier, in Request initialization.
144
+ - Improve consistency and functionality of complex URL parameter handling:
145
+ - When adding URL params, handle URLs that already contain params.
146
+ - Add new convention for handling URL params containing deeply nested arrays
147
+ and hashes, unify handling of null/empty values, and use the same code for
148
+ GET and POST params. (#437)
149
+ - Add the RestClient::ParamsArray class, a simple array-like container that
150
+ can be used to pass multiple keys with same name or keys where the ordering
151
+ is significant.
152
+ - Add a few more exception classes for obscure HTTP status codes.
153
+ - Multipart: use a much more robust multipart boundary with greater entropy.
154
+ - Make `RestClient::Payload::Base#inspect` stop pretending to be a String.
155
+ - Add `Request#redacted_uri` and `Request#redacted_url` to display the URI
156
+ with any password redacted.
157
+
158
+ # 2.0.0.rc1
159
+
160
+ Changes in the release candidate that did not persist through the final 2.0.0
161
+ release:
162
+ - RestClient::Exceptions::Timeout was originally going to be a direct subclass
163
+ of RestClient::Exception in the release candidate. This exception tree was
164
+ made a subclass of RestClient::RequestTimeout prior to the final release.
165
+
166
+ # 1.8.0
167
+
168
+ - Security: implement standards compliant cookie handling by adding a
169
+ dependency on http-cookie. This breaks compatibility, but was necessary to
170
+ address a session fixation / cookie disclosure vulnerability.
171
+ (#369 / CVE-2015-1820)
172
+
173
+ Previously, any Set-Cookie headers found in an HTTP 30x response would be
174
+ sent to the redirection target, regardless of domain. Responses now expose a
175
+ cookie jar and respect standards compliant domain / path flags in Set-Cookie
176
+ headers.
177
+
178
+ # 1.7.3
179
+
180
+ - Security: redact password in URI from logs (#349 / OSVDB-117461)
181
+ - Drop monkey patch on MIME::Types (added `type_for_extension` method, use
182
+ the public interface instead.
183
+
184
+ # 1.7.2
185
+
186
+ - Ignore duplicate certificates in CA store on Windows
187
+
188
+ # 1.7.1
189
+
190
+ - Relax mime-types dependency to continue supporting mime-types 1.x series.
191
+ There seem to be a large number of popular gems that have depended on
192
+ mime-types '~> 1.16' until very recently.
193
+ - Improve urlencode performance
194
+ - Clean up a number of style points
195
+
196
+ # 1.7.0
197
+
198
+ - This release drops support for Ruby 1.8.7 and breaks compatibility in a few
199
+ other relatively minor ways
200
+ - Upgrade to mime-types ~> 2.0
201
+ - Don't CGI.unescape cookie values sent to the server (issue #89)
202
+ - Add support for reading credentials from netrc
203
+ - Lots of SSL changes and enhancements: (#268)
204
+ - Enable peer verification by default (setting `VERIFY_PEER` with OpenSSL)
205
+ - By default, use the system default certificate store for SSL verification,
206
+ even on Windows (this uses a separate Windows build that pulls in ffi)
207
+ - Add support for SSL `ca_path`
208
+ - Add support for SSL `cert_store`
209
+ - Add support for SSL `verify_callback` (with some caveats for jruby, OS X, #277)
210
+ - Add support for SSL ciphers, and choose secure ones by default
211
+ - Run tests under travis
212
+ - Several other bugfixes and test improvements
213
+ - Convert Errno::ETIMEDOUT to RestClient::RequestTimeout
214
+ - Handle more HTTP response codes from recent standards
215
+ - Save raw responses to binary mode tempfile (#110)
216
+ - Disable timeouts with :timeout => nil rather than :timeout => -1
217
+ - Drop all Net::HTTP monkey patches
218
+
219
+ # 1.6.14
220
+
221
+ - This release is unchanged from 1.6.9. It was published in order to supersede
222
+ the malicious 1.6.10-13 versions, even for users who are still pinning to the
223
+ legacy 1.6.x series. All users are encouraged to upgrade to rest-client 2.x.
224
+
225
+ # 1.6.10, 1.6.11, 1.6.12, 1.6.13 (CVE-2019-15224)
226
+
227
+ - These versions were pushed by a malicious actor and included a backdoor permitting
228
+ remote code execution in Rails environments. (#713)
229
+ - They were live for about five days before being yanked.
230
+
231
+ # 1.6.9
232
+
233
+ - Move rdoc to a development dependency
234
+
235
+ # 1.6.8
236
+
237
+ - The 1.6.x series will be the last to support Ruby 1.8.7
238
+ - Pin mime-types to < 2.0 to maintain Ruby 1.8.7 support
239
+ - Add Gemfile, AUTHORS, add license to gemspec
240
+ - Point homepage at https://github.com/rest-client/rest-client
241
+ - Clean up and fix various tests and ruby warnings
242
+ - Backport `ssl_verify_callback` functionality from 1.7.0
243
+
1
244
  # 1.6.7
2
245
 
3
246
  - rebuild with 1.8.7 to avoid https://github.com/rubygems/rubygems/pull/57
@@ -131,4 +374,4 @@ The only breaking change should be the exception classes, but as the new classes
131
374
 
132
375
  All changes exept the last one should be fully compatible with the previous version.
133
376
 
134
- NOTE: due to a dependency problem and to the last change, heroku users should update their heroku gem to >= 1.5.3 to be able to use this version.
377
+ NOTE: due to a dependency problem and to the last change, heroku users should update their heroku gem to >= 1.5.3 to be able to use this version.