alinta-rest-client 2.2.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) 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 +393 -0
  7. data/.rubocop.yml +8 -0
  8. data/.travis.yml +49 -0
  9. data/AUTHORS +106 -0
  10. data/Gemfile +11 -0
  11. data/LICENSE +21 -0
  12. data/README.md +896 -0
  13. data/Rakefile +140 -0
  14. data/bin/restclient +92 -0
  15. data/history.md +357 -0
  16. data/lib/rest-client.rb +2 -0
  17. data/lib/rest_client.rb +2 -0
  18. data/lib/restclient.rb +183 -0
  19. data/lib/restclient/abstract_response.rb +252 -0
  20. data/lib/restclient/exceptions.rb +244 -0
  21. data/lib/restclient/params_array.rb +72 -0
  22. data/lib/restclient/payload.rb +234 -0
  23. data/lib/restclient/platform.rb +49 -0
  24. data/lib/restclient/raw_response.rb +49 -0
  25. data/lib/restclient/request.rb +875 -0
  26. data/lib/restclient/resource.rb +178 -0
  27. data/lib/restclient/response.rb +90 -0
  28. data/lib/restclient/utils.rb +274 -0
  29. data/lib/restclient/version.rb +8 -0
  30. data/lib/restclient/windows.rb +8 -0
  31. data/lib/restclient/windows/root_certs.rb +105 -0
  32. data/rest-client.gemspec +32 -0
  33. data/rest-client.windows.gemspec +19 -0
  34. data/spec/ISS.jpg +0 -0
  35. data/spec/helpers.rb +54 -0
  36. data/spec/integration/_lib.rb +1 -0
  37. data/spec/integration/capath_digicert/244b5494.0 +19 -0
  38. data/spec/integration/capath_digicert/81b9768f.0 +19 -0
  39. data/spec/integration/capath_digicert/README +8 -0
  40. data/spec/integration/capath_digicert/digicert.crt +19 -0
  41. data/spec/integration/capath_verisign/415660c1.0 +14 -0
  42. data/spec/integration/capath_verisign/7651b327.0 +14 -0
  43. data/spec/integration/capath_verisign/README +8 -0
  44. data/spec/integration/capath_verisign/verisign.crt +14 -0
  45. data/spec/integration/certs/digicert.crt +19 -0
  46. data/spec/integration/certs/verisign.crt +14 -0
  47. data/spec/integration/httpbin_spec.rb +128 -0
  48. data/spec/integration/integration_spec.rb +118 -0
  49. data/spec/integration/request_spec.rb +127 -0
  50. data/spec/spec_helper.rb +29 -0
  51. data/spec/unit/_lib.rb +1 -0
  52. data/spec/unit/abstract_response_spec.rb +145 -0
  53. data/spec/unit/exceptions_spec.rb +108 -0
  54. data/spec/unit/params_array_spec.rb +36 -0
  55. data/spec/unit/payload_spec.rb +295 -0
  56. data/spec/unit/raw_response_spec.rb +22 -0
  57. data/spec/unit/request2_spec.rb +54 -0
  58. data/spec/unit/request_spec.rb +1238 -0
  59. data/spec/unit/resource_spec.rb +134 -0
  60. data/spec/unit/response_spec.rb +252 -0
  61. data/spec/unit/restclient_spec.rb +80 -0
  62. data/spec/unit/utils_spec.rb +147 -0
  63. data/spec/unit/windows/root_certs_spec.rb +22 -0
  64. metadata +318 -0
@@ -0,0 +1,140 @@
1
+ # load `rake build/install/release tasks'
2
+ require 'bundler/setup'
3
+ require_relative './lib/restclient/version'
4
+
5
+ namespace :ruby do
6
+ Bundler::GemHelper.install_tasks(:name => 'rest-client')
7
+ end
8
+
9
+ require "rspec/core/rake_task"
10
+
11
+ desc "Run all specs"
12
+ RSpec::Core::RakeTask.new('spec')
13
+
14
+ desc "Run unit specs"
15
+ RSpec::Core::RakeTask.new('spec:unit') do |t|
16
+ t.pattern = 'spec/unit/*_spec.rb'
17
+ end
18
+
19
+ desc "Run integration specs"
20
+ RSpec::Core::RakeTask.new('spec:integration') do |t|
21
+ t.pattern = 'spec/integration/*_spec.rb'
22
+ end
23
+
24
+ desc "Print specdocs"
25
+ RSpec::Core::RakeTask.new(:doc) do |t|
26
+ t.rspec_opts = ["--format", "specdoc", "--dry-run"]
27
+ t.pattern = 'spec/**/*_spec.rb'
28
+ end
29
+
30
+ desc "Run all examples with RCov"
31
+ RSpec::Core::RakeTask.new('rcov') do |t|
32
+ t.pattern = 'spec/*_spec.rb'
33
+ t.rcov = true
34
+ t.rcov_opts = ['--exclude', 'examples']
35
+ end
36
+
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
119
+
120
+ ############################
121
+
122
+ require 'rdoc/task'
123
+
124
+ Rake::RDocTask.new do |t|
125
+ t.rdoc_dir = 'rdoc'
126
+ t.title = "rest-client, fetch RESTful resources effortlessly"
127
+ t.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
128
+ t.options << '--charset' << 'utf-8'
129
+ t.rdoc_files.include('README.md')
130
+ t.rdoc_files.include('lib/*.rb')
131
+ end
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)
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib"
4
+
5
+ require 'rubygems'
6
+ require 'restclient'
7
+ require 'yaml'
8
+
9
+ def usage(why = nil)
10
+ puts "failed for reason: #{why}" if why
11
+ puts "usage: restclient [get|put|post|delete] url|name [username] [password]"
12
+ puts " The verb is optional, if you leave it off you'll get an interactive shell."
13
+ puts " put and post both take the input body on stdin."
14
+ exit(1)
15
+ end
16
+
17
+ POSSIBLE_VERBS = ['get', 'put', 'post', 'delete']
18
+
19
+ if POSSIBLE_VERBS.include? ARGV.first
20
+ @verb = ARGV.shift
21
+ else
22
+ @verb = nil
23
+ end
24
+
25
+ @url = ARGV.shift || 'http://localhost:4567'
26
+
27
+ config = YAML.load(File.read(ENV['HOME'] + "/.restclient")) rescue {}
28
+
29
+ if (c = config[@url])
30
+ @url, @username, @password = [c['url'], c['username'], c['password']]
31
+ else
32
+ @url, @username, @password = [@url, * ARGV]
33
+ end
34
+
35
+ usage("invalid url '#{@url}") unless @url =~ /^https?/
36
+ usage("too few args") unless ARGV.size < 3
37
+
38
+ def r
39
+ @r ||= RestClient::Resource.new(@url, @username, @password)
40
+ end
41
+
42
+ r # force rc to load
43
+
44
+ if @verb
45
+ begin
46
+ if %w( put post ).include? @verb
47
+ puts r.send(@verb, STDIN.read)
48
+ else
49
+ puts r.send(@verb)
50
+ end
51
+ exit 0
52
+ rescue RestClient::Exception => e
53
+ puts e.response.body if e.respond_to?(:response) && e.response
54
+ raise
55
+ end
56
+ end
57
+
58
+ POSSIBLE_VERBS.each do |m|
59
+ define_method(m.to_sym) do |path, *args, &b|
60
+ r[path].public_send(m.to_sym, *args, &b)
61
+ end
62
+ end
63
+
64
+ def method_missing(s, * args, & b)
65
+ if POSSIBLE_VERBS.include? s
66
+ begin
67
+ r.send(s, *args, & b)
68
+ rescue RestClient::RequestFailed => e
69
+ print STDERR, e.response.body
70
+ raise e
71
+ end
72
+ else
73
+ super
74
+ end
75
+ end
76
+
77
+ require 'irb'
78
+ require 'irb/completion'
79
+
80
+ if File.exist? ".irbrc"
81
+ ENV['IRBRC'] = ".irbrc"
82
+ end
83
+
84
+ rcfile = File.expand_path("~/.restclientrc")
85
+ if File.exist?(rcfile)
86
+ load(rcfile)
87
+ end
88
+
89
+ ARGV.clear
90
+
91
+ IRB.start
92
+ exit!
@@ -0,0 +1,357 @@
1
+ # 2.1.0.rc1
2
+
3
+ - Add a dependency on http-accept for parsing Content-Type charset headers.
4
+ This works around a bad memory leak introduced in Ruby 2.4.x (the leak is
5
+ probably a bug in MRI). (#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
+ - Drop custom handling of compression and use built-in Net::HTTP support for
15
+ supported Content-Encodings like gzip and deflate. Don't set any explicit
16
+ `Accept-Encoding` header, rely instead on Net::HTTP defaults. (#597)
17
+ - Note: this changes behavior for compressed responses when using
18
+ `:raw_response => true`. Previously the raw response would not have been
19
+ uncompressed by rest-client, but now Net::HTTP will uncompress it.
20
+ - The previous fix to avoid having Netrc username/password override an
21
+ Authorization header was case-sensitive and incomplete. Fix this by
22
+ respecting existing Authorization headers, regardless of letter case. (#550)
23
+ - Handle ParamsArray payloads. Previously, rest-client would silently drop a
24
+ ParamsArray passed as the payload. Instead, automatically use
25
+ Payload::Multipart if the ParamsArray contains a file handle, or use
26
+ Payload::UrlEncoded if it doesn't. (#508)
27
+ - Gracefully handle Payload objects (Payload::Base or subclasses) that are
28
+ passed as a payload argument. Previously, `Payload.generate` would wrap a
29
+ Payload object in Payload::Streamed, creating a pointlessly nested payload.
30
+ Also add a `closed?` method to Payload objects, and don't error in
31
+ `short_inspect` if `size` returns nil. (#603)
32
+ - Test with an image in the public domain to avoid licensing complexity. (#607)
33
+
34
+ # 2.0.2
35
+
36
+ - Suppress the header override warning introduced in 2.0.1 if the value is the
37
+ same. There's no conflict if the value is unchanged. (#578)
38
+
39
+ # 2.0.1
40
+
41
+ - Warn if auto-generated headers from the payload, such as Content-Type,
42
+ override headers set by the user. This is usually not what the user wants to
43
+ happen, and can be surprising. (#554)
44
+ - Drop the old check for weak default TLS ciphers, and use the built-in Ruby
45
+ defaults. Ruby versions from Oct. 2014 onward use sane defaults, so this is
46
+ no longer needed. (#573)
47
+
48
+ # 2.0.0
49
+
50
+ This release is largely API compatible, but makes several breaking changes.
51
+
52
+ - Drop support for Ruby 1.9
53
+ - Allow mime-types as new as 3.x (requires ruby 2.0)
54
+ - Respect Content-Type charset header provided by server. Previously,
55
+ rest-client would not override the string encoding chosen by Net::HTTP. Now
56
+ responses that specify a charset will yield a body string in that encoding.
57
+ For example, `Content-Type: text/plain; charset=EUC-JP` will return a String
58
+ encoded with `Encoding::EUC_JP`. (#361)
59
+ - Change exceptions raised on request timeout. Instead of
60
+ `RestClient::RequestTimeout` (which is still used for HTTP 408), network
61
+ timeouts will now raise either `RestClient::Exceptions::ReadTimeout` or
62
+ `RestClient::Exceptions::OpenTimeout`, both of which inherit from
63
+ `RestClient::Exceptions::Timeout`. For backwards compatibility, this still
64
+ inherits from `RestClient::RequestTimeout` so existing uses will still work.
65
+ This may change in a future major release. These new timeout classes also
66
+ make the original wrapped exception available as `#original_exception`.
67
+ - Unify request exceptions under `RestClient::RequestFailed`, which still
68
+ inherits from `ExceptionWithResponse`. Previously, HTTP 304, 401, and 404
69
+ inherited directly from `ExceptionWithResponse` rather than from
70
+ `RequestFailed`. Now _all_ HTTP status code exceptions inherit from both.
71
+ - Rename the `:timeout` request option to `:read_timeout`. When `:timeout` is
72
+ passed, now set both `:read_timeout` and `:open_timeout`.
73
+ - Change default HTTP Accept header to `*/*`
74
+ - Use a more descriptive User-Agent header by default
75
+ - Drop RC4-MD5 from default cipher list
76
+ - Only prepend http:// to URIs without a scheme
77
+ - Fix some support for using IPv6 addresses in URLs (still affected by Ruby
78
+ 2.0+ bug https://bugs.ruby-lang.org/issues/9129, with the fix expected to be
79
+ backported to 2.0 and 2.1)
80
+ - `Response` objects are now a subclass of `String` rather than a `String` that
81
+ mixes in the response functionality. Most of the methods remain unchanged,
82
+ but this makes it much easier to understand what is happening when you look
83
+ at a RestClient response object. There are a few additional changes:
84
+ - Response objects now implement `.inspect` to make this distinction clearer.
85
+ - `Response#to_i` will now behave like `String#to_i` instead of returning the
86
+ HTTP response code, which was very surprising behavior.
87
+ - `Response#body` and `#to_s` will now return a true `String` object rather
88
+ than self. Previously there was no easy way to get the true `String`
89
+ response instead of the Frankenstein response string object with
90
+ AbstractResponse mixed in.
91
+ - Response objects no longer accept an extra request args hash, but instead
92
+ access request args directly from the request object, which reduces
93
+ confusion and duplication.
94
+ - Handle multiple HTTP response headers with the same name (except for
95
+ Set-Cookie, which is special) by joining the values with a comma space,
96
+ compliant with RFC 7230
97
+ - Rewrite cookie support to be much smarter and to use cookie jars consistently
98
+ for requests, responses, and redirection in order to resolve long-standing
99
+ complaints about the previously broken behavior: (#498)
100
+ - The `:cookies` option may now be a Hash of Strings, an Array of
101
+ HTTP::Cookie objects, or a full HTTP::CookieJar.
102
+ - Add `RestClient::Request#cookie_jar` and reimplement `Request#cookies` to
103
+ be a wrapper around the cookie jar.
104
+ - Still support passing the `:cookies` option in the headers hash, but now
105
+ raise ArgumentError if that option is also passed to `Request#initialize`.
106
+ - Warn if both `:cookies` and a `Cookie` header are supplied.
107
+ - Use the `Request#cookie_jar` as the basis for `Response#cookie_jar`,
108
+ creating a copy of the jar and adding any newly received cookies.
109
+ - When following redirection, also use this same strategy so that cookies
110
+ from the original request are carried through in a standards-compliant way
111
+ by the cookie jar.
112
+ - Don't set basic auth header if explicit `Authorization` header is specified
113
+ - Add `:proxy` option to requests, which can be used for thread-safe
114
+ per-request proxy configuration, overriding `RestClient.proxy`
115
+ - Allow overriding `ENV['http_proxy']` to disable proxies by setting
116
+ `RestClient.proxy` to a falsey value. Previously there was no way in Ruby 2.x
117
+ to turn off a proxy specified in the environment without changing `ENV`.
118
+ - Add actual support for streaming request payloads. Previously rest-client
119
+ would call `.to_s` even on RestClient::Payload::Streamed objects. Instead,
120
+ treat any object that responds to `.read` as a streaming payload and pass it
121
+ through to `.body_stream=` on the Net:HTTP object. This massively reduces the
122
+ memory required for large file uploads.
123
+ - Changes to redirection behavior: (#381, #484)
124
+ - Remove `RestClient::MaxRedirectsReached` in favor of the normal
125
+ `ExceptionWithResponse` subclasses. This makes the response accessible on
126
+ the exception object as `.response`, making it possible for callers to tell
127
+ what has actually happened when the redirect limit is reached.
128
+ - When following HTTP redirection, store a list of each previous response on
129
+ the response object as `.history`. This makes it possible to access the
130
+ original response headers and body before the redirection was followed.
131
+ - Follow redirection consistently, regardless of whether the HTTP method was
132
+ passed as a symbol or string. Under the hood rest-client now normalizes the
133
+ HTTP request method to a lowercase string.
134
+ - Add `:before_execution_proc` option to `RestClient::Request`. This makes it
135
+ possible to add procs like `RestClient.add_before_execution_proc` to a single
136
+ request without global state.
137
+ - Run tests on Travis's beta OS X support.
138
+ - Make `Request#transmit` a private method, along with a few others.
139
+ - Refactor URI parsing to happen earlier, in Request initialization.
140
+ - Improve consistency and functionality of complex URL parameter handling:
141
+ - When adding URL params, handle URLs that already contain params.
142
+ - Add new convention for handling URL params containing deeply nested arrays
143
+ and hashes, unify handling of null/empty values, and use the same code for
144
+ GET and POST params. (#437)
145
+ - Add the RestClient::ParamsArray class, a simple array-like container that
146
+ can be used to pass multiple keys with same name or keys where the ordering
147
+ is significant.
148
+ - Add a few more exception classes for obscure HTTP status codes.
149
+ - Multipart: use a much more robust multipart boundary with greater entropy.
150
+ - Make `RestClient::Payload::Base#inspect` stop pretending to be a String.
151
+ - Add `Request#redacted_uri` and `Request#redacted_url` to display the URI
152
+ with any password redacted.
153
+
154
+ # 2.0.0.rc1
155
+
156
+ Changes in the release candidate that did not persist through the final 2.0.0
157
+ release:
158
+ - RestClient::Exceptions::Timeout was originally going to be a direct subclass
159
+ of RestClient::Exception in the release candidate. This exception tree was
160
+ made a subclass of RestClient::RequestTimeout prior to the final release.
161
+
162
+ # 1.8.0
163
+
164
+ - Security: implement standards compliant cookie handling by adding a
165
+ dependency on http-cookie. This breaks compatibility, but was necessary to
166
+ address a session fixation / cookie disclosure vulnerability.
167
+ (#369 / CVE-2015-1820)
168
+
169
+ Previously, any Set-Cookie headers found in an HTTP 30x response would be
170
+ sent to the redirection target, regardless of domain. Responses now expose a
171
+ cookie jar and respect standards compliant domain / path flags in Set-Cookie
172
+ headers.
173
+
174
+ # 1.7.3
175
+
176
+ - Security: redact password in URI from logs (#349 / OSVDB-117461)
177
+ - Drop monkey patch on MIME::Types (added `type_for_extension` method, use
178
+ the public interface instead.
179
+
180
+ # 1.7.2
181
+
182
+ - Ignore duplicate certificates in CA store on Windows
183
+
184
+ # 1.7.1
185
+
186
+ - Relax mime-types dependency to continue supporting mime-types 1.x series.
187
+ There seem to be a large number of popular gems that have depended on
188
+ mime-types '~> 1.16' until very recently.
189
+ - Improve urlencode performance
190
+ - Clean up a number of style points
191
+
192
+ # 1.7.0
193
+
194
+ - This release drops support for Ruby 1.8.7 and breaks compatibility in a few
195
+ other relatively minor ways
196
+ - Upgrade to mime-types ~> 2.0
197
+ - Don't CGI.unescape cookie values sent to the server (issue #89)
198
+ - Add support for reading credentials from netrc
199
+ - Lots of SSL changes and enhancements: (#268)
200
+ - Enable peer verification by default (setting `VERIFY_PEER` with OpenSSL)
201
+ - By default, use the system default certificate store for SSL verification,
202
+ even on Windows (this uses a separate Windows build that pulls in ffi)
203
+ - Add support for SSL `ca_path`
204
+ - Add support for SSL `cert_store`
205
+ - Add support for SSL `verify_callback` (with some caveats for jruby, OS X, #277)
206
+ - Add support for SSL ciphers, and choose secure ones by default
207
+ - Run tests under travis
208
+ - Several other bugfixes and test improvements
209
+ - Convert Errno::ETIMEDOUT to RestClient::RequestTimeout
210
+ - Handle more HTTP response codes from recent standards
211
+ - Save raw responses to binary mode tempfile (#110)
212
+ - Disable timeouts with :timeout => nil rather than :timeout => -1
213
+ - Drop all Net::HTTP monkey patches
214
+
215
+ # 1.6.8
216
+
217
+ - The 1.6.x series will be the last to support Ruby 1.8.7
218
+ - Pin mime-types to < 2.0 to maintain Ruby 1.8.7 support
219
+ - Add Gemfile, AUTHORS, add license to gemspec
220
+ - Point homepage at https://github.com/rest-client/rest-client
221
+ - Clean up and fix various tests and ruby warnings
222
+ - Backport `ssl_verify_callback` functionality from 1.7.0
223
+
224
+ # 1.6.7
225
+
226
+ - rebuild with 1.8.7 to avoid https://github.com/rubygems/rubygems/pull/57
227
+
228
+ # 1.6.6
229
+
230
+ - 1.6.5 was yanked
231
+
232
+ # 1.6.5
233
+
234
+ - RFC6265 requires single SP after ';' for separating parameters pairs in the 'Cookie:' header (patch provided by Hiroshi Nakamura)
235
+ - enable url parameters for all actions
236
+ - detect file parameters in arrays
237
+ - allow disabling the timeouts by passing -1 (patch provided by Sven Böhm)
238
+
239
+ # 1.6.4
240
+
241
+ - fix restclient script compatibility with 1.9.2
242
+ - fix unlinking temp file (patch provided by Evan Smith)
243
+ - monkeypatching ruby for http patch method (patch provided by Syl Turner)
244
+
245
+ # 1.6.3
246
+
247
+ - 1.6.2 was yanked
248
+
249
+ # 1.6.2
250
+
251
+ - add support for HEAD in resources (patch provided by tpresa)
252
+ - fix shell for 1.9.2
253
+ - workaround when some gem monkeypatch net/http (patch provided by Ian Warshak)
254
+ - DELETE requests should process parameters just like GET and HEAD
255
+ - adding :block_response parameter for manual processing
256
+ - limit number of redirections (patch provided by Chris Dinn)
257
+ - close and unlink the temp file created by playload (patch provided by Chris Green)
258
+ - make gemspec Rubygems 1.8 compatible (patch provided by David Backeus)
259
+ - added RestClient.reset_before_execution_procs (patch provided by Cloudify)
260
+ - added PATCH method (patch provided by Jeff Remer)
261
+ - hack for HTTP servers that use raw DEFLATE compression, see http://www.ruby-forum.com/topic/136825 (path provided by James Reeves)
262
+
263
+ # 1.6.1
264
+
265
+ - add response body in Exception#inspect
266
+ - add support for RestClient.options
267
+ - fix tests for 1.9.2 (patch provided by Niko Dittmann)
268
+ - block passing in Resource#[] (patch provided by Niko Dittmann)
269
+ - cookies set in a response should be kept in a redirect
270
+ - HEAD requests should process parameters just like GET (patch provided by Rob Eanes)
271
+ - exception message should never be nil (patch provided by Michael Klett)
272
+
273
+ # 1.6.0
274
+
275
+ - forgot to include rest-client.rb in the gem
276
+ - user, password and user-defined headers should survive a redirect
277
+ - added all missing status codes
278
+ - added parameter passing for get request using the :param key in header
279
+ - the warning about the logger when using a string was a bad idea
280
+ - multipart parameters names should not be escaped
281
+ - remove the cookie escaping introduced by migrating to CGI cookie parsing in 1.5.1
282
+ - add a streamed payload type (patch provided by Caleb Land)
283
+ - Exception#http_body works even when no response
284
+
285
+ # 1.5.1
286
+
287
+ - only converts headers keys which are Symbols
288
+ - use CGI for cookie parsing instead of custom code
289
+ - unescape user and password before using them (patch provided by Lars Gierth)
290
+ - expand ~ in ~/.restclientrc (patch provided by Mike Fletcher)
291
+ - ssl verification raise an exception when the ca certificate is incorrect (patch provided by Braintree)
292
+
293
+ # 1.5.0
294
+
295
+ - the response is now a String with the Response module a.k.a. the change in 1.4.0 was a mistake (Response.body is returning self for compatability)
296
+ - added AbstractResponse.to_i to improve semantic
297
+ - multipart Payloads ignores the name attribute if it's not set (patch provided by Tekin Suleyman)
298
+ - correctly takes into account user headers whose keys are strings (path provided by Cyril Rohr)
299
+ - use binary mode for payload temp file
300
+ - concatenate cookies with ';'
301
+ - fixed deeper parameter handling
302
+ - do not quote the boundary in the Content-Type header (patch provided by W. Andrew Loe III)
303
+
304
+ # 1.4.2
305
+
306
+ - fixed RestClient.add_before_execution_proc (patch provided by Nicholas Wieland)
307
+ - fixed error when an exception is raised without a response (patch provided by Caleb Land)
308
+
309
+ # 1.4.1
310
+
311
+ - fixed parameters managment when using hash
312
+
313
+ # 1.4.0
314
+
315
+ - Response is no more a String, and the mixin is replaced by an abstract_response, existing calls are redirected to response body with a warning.
316
+ - enable repeated parameters RestClient.post 'http://example.com/resource', :param1 => ['one', 'two', 'three'], => :param2 => 'foo' (patch provided by Rodrigo Panachi)
317
+ - fixed the redirect code concerning relative path and query string combination (patch provided by Kevin Read)
318
+ - redirection code moved to Response so redirection can be customized using the block syntax
319
+ - only get and head redirections are now followed by default, as stated in the specification
320
+ - added RestClient.add_before_execution_proc to hack the http request, like for oauth
321
+
322
+ The response change may be breaking in rare cases.
323
+
324
+ # 1.3.1
325
+
326
+ - added compatibility to enable responses in exception to act like Net::HTTPResponse
327
+
328
+ # 1.3.0
329
+
330
+ - a block can be used to process a request's result, this enable to handle custom error codes or paththrought (design by Cyril Rohr)
331
+ - cleaner log API, add a warning for some cases but should be compatible
332
+ - accept multiple "Set-Cookie" headers, see http://www.ietf.org/rfc/rfc2109.txt (patch provided by Cyril Rohr)
333
+ - remove "Content-Length" and "Content-Type" headers when following a redirection (patch provided by haarts)
334
+ - all http error codes have now a corresponding exception class and all of them contain the Reponse -> this means that the raised exception can be different
335
+ - changed "Content-Disposition: multipart/form-data" to "Content-Disposition: form-data" per RFC 2388 (patch provided by Kyle Crawford)
336
+
337
+ The only breaking change should be the exception classes, but as the new classes inherits from the existing ones, the breaking cases should be rare.
338
+
339
+ # 1.2.0
340
+
341
+ - formatting changed from tabs to spaces
342
+ - logged requests now include generated headers
343
+ - accept and content-type headers can now be specified using extentions: RestClient.post "http://example.com/resource", { 'x' => 1 }.to_json, :content_type => :json, :accept => :json
344
+ - should be 1.1.1 but renamed to 1.2.0 because 1.1.X versions has already been packaged on Debian
345
+
346
+ # 1.1.0
347
+
348
+ - new maintainer: Archiloque, the working repo is now at http://github.com/archiloque/rest-client
349
+ - a mailing list has been created at rest.client@librelist.com and an freenode irc channel #rest-client
350
+ - François Beausoleil' multipart code from http://github.com/francois/rest-client has been merged
351
+ - ability to use hash in hash as payload
352
+ - the mime-type code now rely on the mime-types gem http://mime-types.rubyforge.org/ instead of an internal partial list
353
+ - 204 response returns a Response instead of nil (patch provided by Elliott Draper)
354
+
355
+ All changes exept the last one should be fully compatible with the previous version.
356
+
357
+ 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.