multipart-post 2.1.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/changelog.md +14 -0
- data/lib/composite_io.rb +17 -108
- data/lib/multipart/post/composite_read_io.rb +73 -0
- data/lib/multipart/post/multipartable.rb +76 -0
- data/lib/multipart/post/parts.rb +148 -0
- data/lib/multipart/post/upload_io.rb +64 -0
- data/lib/multipart/post/version.rb +11 -0
- data/lib/multipart/post.rb +8 -0
- data/lib/multipart_post.rb +10 -8
- data/lib/multipartable.rb +17 -46
- data/lib/net/http/post/multipart.rb +12 -12
- data/lib/parts.rb +25 -126
- data/license.md +57 -0
- data/readme.md +170 -0
- data.tar.gz.sig +0 -0
- metadata +87 -44
- metadata.gz.sig +0 -0
- data/.gitignore +0 -6
- data/.rspec +0 -5
- data/.travis.yml +0 -18
- data/.yardopts +0 -6
- data/Gemfile +0 -6
- data/History.txt +0 -64
- data/LICENSE +0 -21
- data/Manifest.txt +0 -9
- data/README.md +0 -127
- data/Rakefile +0 -9
- data/multipart-post.gemspec +0 -23
- data/spec/composite_io_spec.rb +0 -138
- data/spec/multibyte.txt +0 -1
- data/spec/net/http/post/multipart_spec.rb +0 -123
- data/spec/parts_spec.rb +0 -102
- data/spec/spec_helper.rb +0 -29
data/lib/parts.rb
CHANGED
@@ -1,126 +1,25 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
#
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
def to_io
|
27
|
-
@io
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
# Represents a parametric part to be filled with given value.
|
32
|
-
class ParamPart
|
33
|
-
include Part
|
34
|
-
|
35
|
-
# @param boundary [String]
|
36
|
-
# @param name [#to_s]
|
37
|
-
# @param value [String]
|
38
|
-
# @param headers [Hash] Content-Type is used, if present.
|
39
|
-
def initialize(boundary, name, value, headers = {})
|
40
|
-
@part = build_part(boundary, name, value, headers)
|
41
|
-
@io = StringIO.new(@part)
|
42
|
-
end
|
43
|
-
|
44
|
-
def length
|
45
|
-
@part.bytesize
|
46
|
-
end
|
47
|
-
|
48
|
-
# @param boundary [String]
|
49
|
-
# @param name [#to_s]
|
50
|
-
# @param value [String]
|
51
|
-
# @param headers [Hash] Content-Type is used, if present.
|
52
|
-
def build_part(boundary, name, value, headers = {})
|
53
|
-
part = ''
|
54
|
-
part << "--#{boundary}\r\n"
|
55
|
-
part << "Content-Disposition: form-data; name=\"#{name.to_s}\"\r\n"
|
56
|
-
part << "Content-Type: #{headers["Content-Type"]}\r\n" if headers["Content-Type"]
|
57
|
-
part << "\r\n"
|
58
|
-
part << "#{value}\r\n"
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
# Represents a part to be filled from file IO.
|
63
|
-
class FilePart
|
64
|
-
include Part
|
65
|
-
|
66
|
-
attr_reader :length
|
67
|
-
|
68
|
-
# @param boundary [String]
|
69
|
-
# @param name [#to_s]
|
70
|
-
# @param io [IO]
|
71
|
-
# @param headers [Hash]
|
72
|
-
def initialize(boundary, name, io, headers = {})
|
73
|
-
file_length = io.respond_to?(:length) ? io.length : File.size(io.local_path)
|
74
|
-
@head = build_head(boundary, name, io.original_filename, io.content_type, file_length,
|
75
|
-
io.respond_to?(:opts) ? io.opts.merge(headers) : headers)
|
76
|
-
@foot = "\r\n"
|
77
|
-
@length = @head.bytesize + file_length + @foot.length
|
78
|
-
@io = CompositeReadIO.new(StringIO.new(@head), io, StringIO.new(@foot))
|
79
|
-
end
|
80
|
-
|
81
|
-
# @param boundary [String]
|
82
|
-
# @param name [#to_s]
|
83
|
-
# @param filename [String]
|
84
|
-
# @param type [String]
|
85
|
-
# @param content_len [Integer]
|
86
|
-
# @param opts [Hash]
|
87
|
-
def build_head(boundary, name, filename, type, content_len, opts = {})
|
88
|
-
opts = opts.clone
|
89
|
-
|
90
|
-
trans_encoding = opts.delete("Content-Transfer-Encoding") || "binary"
|
91
|
-
content_disposition = opts.delete("Content-Disposition") || "form-data"
|
92
|
-
|
93
|
-
part = ''
|
94
|
-
part << "--#{boundary}\r\n"
|
95
|
-
part << "Content-Disposition: #{content_disposition}; name=\"#{name.to_s}\"; filename=\"#{filename}\"\r\n"
|
96
|
-
part << "Content-Length: #{content_len}\r\n"
|
97
|
-
if content_id = opts.delete("Content-ID")
|
98
|
-
part << "Content-ID: #{content_id}\r\n"
|
99
|
-
end
|
100
|
-
|
101
|
-
if opts["Content-Type"] != nil
|
102
|
-
part << "Content-Type: " + opts["Content-Type"] + "\r\n"
|
103
|
-
else
|
104
|
-
part << "Content-Type: #{type}\r\n"
|
105
|
-
end
|
106
|
-
|
107
|
-
part << "Content-Transfer-Encoding: #{trans_encoding}\r\n"
|
108
|
-
|
109
|
-
opts.each do |k, v|
|
110
|
-
part << "#{k}: #{v}\r\n"
|
111
|
-
end
|
112
|
-
|
113
|
-
part << "\r\n"
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
# Represents the epilogue or closing boundary.
|
118
|
-
class EpiloguePart
|
119
|
-
include Part
|
120
|
-
|
121
|
-
def initialize(boundary)
|
122
|
-
@part = "--#{boundary}--\r\n"
|
123
|
-
@io = StringIO.new(@part)
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2008-2009, by McClain Looney.
|
5
|
+
# Copyright, 2009-2013, by Nick Sieger.
|
6
|
+
# Copyright, 2011, by Johannes Wagener.
|
7
|
+
# Copyright, 2011, by Gerrit Riessen.
|
8
|
+
# Copyright, 2011, by Jason Moore.
|
9
|
+
# Copyright, 2012, by Steven Davidovitz.
|
10
|
+
# Copyright, 2012, by hexfet.
|
11
|
+
# Copyright, 2013, by Vincent Pellé.
|
12
|
+
# Copyright, 2013, by Gustav Ernberg.
|
13
|
+
# Copyright, 2013, by Socrates Vicente.
|
14
|
+
# Copyright, 2017, by David Moles.
|
15
|
+
# Copyright, 2017, by Matt Colyer.
|
16
|
+
# Copyright, 2017, by Eric Hutzelman.
|
17
|
+
# Copyright, 2019, by Olle Jonsson.
|
18
|
+
# Copyright, 2019, by Ethan Turkeltaub.
|
19
|
+
# Copyright, 2022, by Samuel Williams.
|
20
|
+
|
21
|
+
warn "Top level ::Parts is deprecated, require 'multipart/post' and use `Multipart::Post::Parts` instead!"
|
22
|
+
require_relative 'multipart/post'
|
23
|
+
|
24
|
+
Parts = Multipart::Post::Parts
|
25
|
+
Object.deprecate_constant :Parts
|
data/license.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# MIT License
|
2
|
+
|
3
|
+
Copyright, 2006-2014, by Nick Sieger.
|
4
|
+
Copyright, 2008-2009, by McClain Looney.
|
5
|
+
Copyright, 2010, by Tohru Hashimoto.
|
6
|
+
Copyright, 2011, by Jeff Hodges.
|
7
|
+
Copyright, 2011, by Alex Koppel.
|
8
|
+
Copyright, 2011, by Johannes Wagener.
|
9
|
+
Copyright, 2011, by Christine Yen.
|
10
|
+
Copyright, 2011, by Gerrit Riessen.
|
11
|
+
Copyright, 2011, by Jason Moore.
|
12
|
+
Copyright, 2011, by Luke Redpath.
|
13
|
+
Copyright, 2012, by Steven Davidovitz.
|
14
|
+
Copyright, 2012, by hexfet.
|
15
|
+
Copyright, 2013, by Jordi Massaguer Pla.
|
16
|
+
Copyright, 2013, by Mislav Marohnić.
|
17
|
+
Copyright, 2013, by Vincent Pellé.
|
18
|
+
Copyright, 2013, by Gustav Ernberg.
|
19
|
+
Copyright, 2013, by Socrates Vicente.
|
20
|
+
Copyright, 2013, by Leo Cassarani.
|
21
|
+
Copyright, 2013, by Jagtesh Chadha.
|
22
|
+
Copyright, 2013, by Steffen Grunwald.
|
23
|
+
Copyright, 2013, by Lonre Wang.
|
24
|
+
Copyright, 2017-2023, by Samuel Williams.
|
25
|
+
Copyright, 2017, by Feuda Nan.
|
26
|
+
Copyright, 2017, by David Moles.
|
27
|
+
Copyright, 2017, by Matt Colyer.
|
28
|
+
Copyright, 2017, by Eric Hutzelman.
|
29
|
+
Copyright, 2019, by Lachlan Priest.
|
30
|
+
Copyright, 2019, by Jan Piotrowski.
|
31
|
+
Copyright, 2019-2022, by Olle Jonsson.
|
32
|
+
Copyright, 2019, by Ethan Turkeltaub.
|
33
|
+
Copyright, 2019, by Jan-Joost Spanjers.
|
34
|
+
Copyright, 2019, by Patrick Davey.
|
35
|
+
Copyright, 2021, by Tim Barkley.
|
36
|
+
Copyright, 2021, by Lewis Cowles.
|
37
|
+
Copyright, 2022, by Jason York.
|
38
|
+
Copyright, 2022, by Takuya Noguchi.
|
39
|
+
Copyright, 2023, by Peter Goldstein.
|
40
|
+
|
41
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
42
|
+
of this software and associated documentation files (the "Software"), to deal
|
43
|
+
in the Software without restriction, including without limitation the rights
|
44
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
45
|
+
copies of the Software, and to permit persons to whom the Software is
|
46
|
+
furnished to do so, subject to the following conditions:
|
47
|
+
|
48
|
+
The above copyright notice and this permission notice shall be included in all
|
49
|
+
copies or substantial portions of the Software.
|
50
|
+
|
51
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
52
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
53
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
54
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
55
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
56
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
57
|
+
SOFTWARE.
|
data/readme.md
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
# Multipart::Post
|
2
|
+
|
3
|
+
Adds a streamy multipart form post capability to `Net::HTTP`. Also supports other
|
4
|
+
methods besides `POST`.
|
5
|
+
|
6
|
+
[![Development Status](https://github.com/socketry/multipart-post/workflows/Test/badge.svg)](https://github.com/socketry/multipart-post/actions?workflow=Test)
|
7
|
+
|
8
|
+
## Features/Problems
|
9
|
+
|
10
|
+
- Appears to actually work. A good feature to have.
|
11
|
+
- Encapsulates posting of file/binary parts and name/value parameter parts, similar to
|
12
|
+
most browsers' file upload forms.
|
13
|
+
- Provides an `UploadIO` helper class to prepare IO objects for inclusion in the params
|
14
|
+
hash of the multipart post object.
|
15
|
+
|
16
|
+
## Installation
|
17
|
+
|
18
|
+
``` shell
|
19
|
+
bundle add multipart-post
|
20
|
+
```
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
``` ruby
|
25
|
+
require 'net/http/post/multipart'
|
26
|
+
|
27
|
+
url = URI.parse('http://www.example.com/upload')
|
28
|
+
File.open("./image.jpg") do |jpg|
|
29
|
+
req = Net::HTTP::Post::Multipart.new url.path,
|
30
|
+
"file" => UploadIO.new(jpg, "image/jpeg", "image.jpg")
|
31
|
+
res = Net::HTTP.start(url.host, url.port) do |http|
|
32
|
+
http.request(req)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
```
|
36
|
+
|
37
|
+
To post multiple files or attachments, simply include multiple parameters with
|
38
|
+
`UploadIO` values:
|
39
|
+
|
40
|
+
``` ruby
|
41
|
+
require 'net/http/post/multipart'
|
42
|
+
|
43
|
+
url = URI.parse('http://www.example.com/upload')
|
44
|
+
req = Net::HTTP::Post::Multipart.new url.path,
|
45
|
+
"file1" => UploadIO.new(File.new("./image.jpg"), "image/jpeg", "image.jpg"),
|
46
|
+
"file2" => UploadIO.new(File.new("./image2.jpg"), "image/jpeg", "image2.jpg")
|
47
|
+
res = Net::HTTP.start(url.host, url.port) do |http|
|
48
|
+
http.request(req)
|
49
|
+
end
|
50
|
+
```
|
51
|
+
|
52
|
+
To post files with other normal, non-file params such as input values, you need to pass hashes to the `Multipart.new` method.
|
53
|
+
|
54
|
+
In Rails 4 for example:
|
55
|
+
|
56
|
+
``` ruby
|
57
|
+
def model_params
|
58
|
+
require_params = params.require(:model).permit(:param_one, :param_two, :param_three, :avatar)
|
59
|
+
require_params[:avatar] = model_params[:avatar].present? ? UploadIO.new(model_params[:avatar].tempfile, model_params[:avatar].content_type, model_params[:avatar].original_filename) : nil
|
60
|
+
require_params
|
61
|
+
end
|
62
|
+
|
63
|
+
require 'net/http/post/multipart'
|
64
|
+
|
65
|
+
url = URI.parse('http://www.example.com/upload')
|
66
|
+
Net::HTTP.start(url.host, url.port) do |http|
|
67
|
+
req = Net::HTTP::Post::Multipart.new(url, model_params)
|
68
|
+
key = "authorization_key"
|
69
|
+
req.add_field("Authorization", key) #add to Headers
|
70
|
+
http.use_ssl = (url.scheme == "https")
|
71
|
+
http.request(req)
|
72
|
+
end
|
73
|
+
```
|
74
|
+
|
75
|
+
Or in plain ruby:
|
76
|
+
|
77
|
+
``` ruby
|
78
|
+
def params(file)
|
79
|
+
params = { "description" => "A nice picture!" }
|
80
|
+
params[:datei] = UploadIO.new(file, "image/jpeg", "image.jpg")
|
81
|
+
params
|
82
|
+
end
|
83
|
+
|
84
|
+
url = URI.parse('http://www.example.com/upload')
|
85
|
+
File.open("./image.jpg") do |file|
|
86
|
+
req = Net::HTTP::Post::Multipart.new(url.path, params(file))
|
87
|
+
res = Net::HTTP.start(url.host, url.port) do |http|
|
88
|
+
return http.request(req).body
|
89
|
+
end
|
90
|
+
end
|
91
|
+
```
|
92
|
+
|
93
|
+
### Parts Headers
|
94
|
+
|
95
|
+
By default, all individual parts will include the header `Content-Disposition` as well as `Content-Length`, `Content-Transfer-Encoding` and `Content-Type` for the File Parts.
|
96
|
+
|
97
|
+
You may optionally configure the headers `Content-Type` and `Content-ID` for both ParamPart and FilePart by passing in a `parts` header.
|
98
|
+
|
99
|
+
For example:
|
100
|
+
|
101
|
+
``` ruby
|
102
|
+
url = URI.parse('http://www.example.com/upload')
|
103
|
+
|
104
|
+
params = {
|
105
|
+
"file_metadata_01" => { "description" => "A nice picture!" },
|
106
|
+
"file_content_01" => UploadIO.new(file, "image/jpeg", "image.jpg")
|
107
|
+
}
|
108
|
+
|
109
|
+
headers = {
|
110
|
+
'parts': {
|
111
|
+
'file_metadata_01': {
|
112
|
+
'Content-Type' => "application/json"
|
113
|
+
}
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
req = Net::HTTP::Post::Multipart.new(uri, params, headers)
|
118
|
+
```
|
119
|
+
|
120
|
+
This would configure the `file_metadata_01` part to include `Content-Type`
|
121
|
+
|
122
|
+
Content-Disposition: form-data; name="file_metadata_01"
|
123
|
+
Content-Type: application/json
|
124
|
+
{
|
125
|
+
"description" => "A nice picture!"
|
126
|
+
}
|
127
|
+
|
128
|
+
#### Custom Parts Headers
|
129
|
+
|
130
|
+
*For FileParts only.*
|
131
|
+
|
132
|
+
You can include any number of custom parts headers in addition to `Content-Type` and `Content-ID`.
|
133
|
+
|
134
|
+
``` ruby
|
135
|
+
headers = {
|
136
|
+
'parts': {
|
137
|
+
'file_metadata_01': {
|
138
|
+
'Content-Type' => "application/json",
|
139
|
+
'My-Custom-Header' => "Yo Yo!"
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
```
|
144
|
+
|
145
|
+
### Debugging
|
146
|
+
|
147
|
+
You can debug requests and responses (e.g. status codes) for all requests by adding the following code:
|
148
|
+
|
149
|
+
``` ruby
|
150
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
151
|
+
http.set_debug_output($stdout)
|
152
|
+
```
|
153
|
+
|
154
|
+
## Versioning
|
155
|
+
|
156
|
+
This library aims to adhere to [Semantic Versioning 2.0.0](http://semver.org/).
|
157
|
+
Violations of this scheme should be reported as bugs. Specifically,
|
158
|
+
if a minor or patch version is released that breaks backward
|
159
|
+
compatibility, a new version should be immediately released that
|
160
|
+
restores compatibility. Breaking changes to the public API will
|
161
|
+
only be introduced with new major versions.
|
162
|
+
|
163
|
+
As a result of this policy, you can (and should) specify a
|
164
|
+
dependency on this gem using the [Pessimistic Version Constraint](http://guides.rubygems.org/patterns/#pessimistic-version-constraint) with two digits of precision.
|
165
|
+
|
166
|
+
For example:
|
167
|
+
|
168
|
+
``` ruby
|
169
|
+
spec.add_dependency 'multipart-post', '~> 2.1'
|
170
|
+
```
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
CHANGED
@@ -1,15 +1,79 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multipart-post
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sieger
|
8
8
|
- Samuel Williams
|
9
|
-
|
9
|
+
- Olle Jonsson
|
10
|
+
- McClain Looney
|
11
|
+
- Lewis Cowles
|
12
|
+
- Gustav Ernberg
|
13
|
+
- Patrick Davey
|
14
|
+
- Steven Davidovitz
|
15
|
+
- Alex Koppel
|
16
|
+
- Ethan Turkeltaub
|
17
|
+
- Jagtesh Chadha
|
18
|
+
- Jason York
|
19
|
+
- Tohru Hashimoto
|
20
|
+
- Vincent Pellé
|
21
|
+
- hexfet
|
22
|
+
- Christine Yen
|
23
|
+
- David Moles
|
24
|
+
- Eric Hutzelman
|
25
|
+
- Feuda Nan
|
26
|
+
- Gerrit Riessen
|
27
|
+
- Jan Piotrowski
|
28
|
+
- Jan-Joost Spanjers
|
29
|
+
- Jason Moore
|
30
|
+
- Jeff Hodges
|
31
|
+
- Johannes Wagener
|
32
|
+
- Jordi Massaguer Pla
|
33
|
+
- Lachlan Priest
|
34
|
+
- Leo Cassarani
|
35
|
+
- Lonre Wang
|
36
|
+
- Luke Redpath
|
37
|
+
- Matt Colyer
|
38
|
+
- Mislav Marohnić
|
39
|
+
- Peter Goldstein
|
40
|
+
- Socrates Vicente
|
41
|
+
- Steffen Grunwald
|
42
|
+
- Takuya Noguchi
|
43
|
+
- Tim Barkley
|
44
|
+
autorequire:
|
10
45
|
bindir: bin
|
11
|
-
cert_chain:
|
12
|
-
|
46
|
+
cert_chain:
|
47
|
+
- |
|
48
|
+
-----BEGIN CERTIFICATE-----
|
49
|
+
MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
|
50
|
+
ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
|
51
|
+
CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
|
52
|
+
MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
|
53
|
+
MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
|
54
|
+
bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
|
55
|
+
igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
|
56
|
+
9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
|
57
|
+
sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
|
58
|
+
e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
|
59
|
+
XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
|
60
|
+
RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
|
61
|
+
tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
|
62
|
+
zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
|
63
|
+
xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
|
64
|
+
BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
|
65
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
|
66
|
+
aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
|
67
|
+
cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
|
68
|
+
xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
|
69
|
+
c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
|
70
|
+
8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
|
71
|
+
JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
|
72
|
+
eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
|
73
|
+
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
74
|
+
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
75
|
+
-----END CERTIFICATE-----
|
76
|
+
date: 2023-01-26 00:00:00.000000000 Z
|
13
77
|
dependencies:
|
14
78
|
- !ruby/object:Gem::Dependency
|
15
79
|
name: bundler
|
@@ -17,20 +81,14 @@ dependencies:
|
|
17
81
|
requirements:
|
18
82
|
- - ">="
|
19
83
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
21
|
-
- - "<"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: '3'
|
84
|
+
version: '0'
|
24
85
|
type: :development
|
25
86
|
prerelease: false
|
26
87
|
version_requirements: !ruby/object:Gem::Requirement
|
27
88
|
requirements:
|
28
89
|
- - ">="
|
29
90
|
- !ruby/object:Gem::Version
|
30
|
-
version: '
|
31
|
-
- - "<"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '3'
|
91
|
+
version: '0'
|
34
92
|
- !ruby/object:Gem::Dependency
|
35
93
|
name: rspec
|
36
94
|
requirement: !ruby/object:Gem::Requirement
|
@@ -46,7 +104,7 @@ dependencies:
|
|
46
104
|
- !ruby/object:Gem::Version
|
47
105
|
version: '3.4'
|
48
106
|
- !ruby/object:Gem::Dependency
|
49
|
-
name:
|
107
|
+
name: covered
|
50
108
|
requirement: !ruby/object:Gem::Requirement
|
51
109
|
requirements:
|
52
110
|
- - ">="
|
@@ -59,41 +117,31 @@ dependencies:
|
|
59
117
|
- - ">="
|
60
118
|
- !ruby/object:Gem::Version
|
61
119
|
version: '0'
|
62
|
-
description:
|
63
|
-
#content_type, #original_filename, and #local_path will be posted as a binary file.'
|
120
|
+
description:
|
64
121
|
email:
|
65
|
-
- nick@nicksieger.com
|
66
|
-
- samuel.williams@oriontransfer.co.nz
|
67
122
|
executables: []
|
68
123
|
extensions: []
|
69
124
|
extra_rdoc_files: []
|
70
125
|
files:
|
71
|
-
-
|
72
|
-
- ".rspec"
|
73
|
-
- ".travis.yml"
|
74
|
-
- ".yardopts"
|
75
|
-
- Gemfile
|
76
|
-
- History.txt
|
77
|
-
- LICENSE
|
78
|
-
- Manifest.txt
|
79
|
-
- README.md
|
80
|
-
- Rakefile
|
126
|
+
- changelog.md
|
81
127
|
- lib/composite_io.rb
|
128
|
+
- lib/multipart/post.rb
|
129
|
+
- lib/multipart/post/composite_read_io.rb
|
130
|
+
- lib/multipart/post/multipartable.rb
|
131
|
+
- lib/multipart/post/parts.rb
|
132
|
+
- lib/multipart/post/upload_io.rb
|
133
|
+
- lib/multipart/post/version.rb
|
82
134
|
- lib/multipart_post.rb
|
83
135
|
- lib/multipartable.rb
|
84
136
|
- lib/net/http/post/multipart.rb
|
85
137
|
- lib/parts.rb
|
86
|
-
-
|
87
|
-
-
|
88
|
-
|
89
|
-
- spec/net/http/post/multipart_spec.rb
|
90
|
-
- spec/parts_spec.rb
|
91
|
-
- spec/spec_helper.rb
|
92
|
-
homepage: https://github.com/nicksieger/multipart-post
|
138
|
+
- license.md
|
139
|
+
- readme.md
|
140
|
+
homepage: https://github.com/socketry/multipart-post
|
93
141
|
licenses:
|
94
142
|
- MIT
|
95
143
|
metadata: {}
|
96
|
-
post_install_message:
|
144
|
+
post_install_message:
|
97
145
|
rdoc_options: []
|
98
146
|
require_paths:
|
99
147
|
- lib
|
@@ -101,20 +149,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
149
|
requirements:
|
102
150
|
- - ">="
|
103
151
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
152
|
+
version: 2.3.0
|
105
153
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
154
|
requirements:
|
107
155
|
- - ">="
|
108
156
|
- !ruby/object:Gem::Version
|
109
157
|
version: '0'
|
110
158
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
112
|
-
signing_key:
|
159
|
+
rubygems_version: 3.4.1
|
160
|
+
signing_key:
|
113
161
|
specification_version: 4
|
114
162
|
summary: A multipart form post accessory for Net::HTTP.
|
115
|
-
test_files:
|
116
|
-
- spec/composite_io_spec.rb
|
117
|
-
- spec/multibyte.txt
|
118
|
-
- spec/net/http/post/multipart_spec.rb
|
119
|
-
- spec/parts_spec.rb
|
120
|
-
- spec/spec_helper.rb
|
163
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
data/.yardopts
DELETED
data/Gemfile
DELETED
data/History.txt
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
# @markup rdoc
|
3
|
-
# @title CHANGELOG
|
4
|
-
-->
|
5
|
-
|
6
|
-
=== 2.0.0 / 2013-12-21
|
7
|
-
|
8
|
-
- Drop Ruby 1.8 compatibility
|
9
|
-
- GH #21: Fix FilePart length calculation for Ruby 1.9 when filename contains
|
10
|
-
multibyte characters (hexfet)
|
11
|
-
- GH #20: Ensure upload responds to both #content_type and #original_filename
|
12
|
-
(Steven Davidovitz)
|
13
|
-
- GH #31: Support setting headers on any part of the request (Socrates Vicente)
|
14
|
-
- GH #30: Support array values for params (Gustav Ernberg)
|
15
|
-
- GH #32: Fix respond_to? signature (Leo Cassarani)
|
16
|
-
- GH #33: Update README to markdown (Jagtesh Chadha)
|
17
|
-
- GH #35: Improved handling of array-type parameters (Steffen Grunwald)
|
18
|
-
|
19
|
-
=== 1.2.0 / 2013-02-25
|
20
|
-
|
21
|
-
- #25: Ruby 2 compatibility (thanks mislav)
|
22
|
-
|
23
|
-
=== 1.1.5 / 2012-02-12
|
24
|
-
|
25
|
-
- Fix length/bytesize of parts in 1.9 (#7, #14) (Jason Moore)
|
26
|
-
- Allow CompositeIO objects to be re-read by rewinding, like other IO
|
27
|
-
objects. (Luke Redpath)
|
28
|
-
|
29
|
-
=== 1.1.4 / 2011-11-23
|
30
|
-
|
31
|
-
- Non-functional changes in release (switch to Bundler gem tasks)
|
32
|
-
|
33
|
-
=== 1.1.3 / 2011-07-25
|
34
|
-
|
35
|
-
- More configurable header specification for parts (Gerrit Riessen)
|
36
|
-
|
37
|
-
=== 1.1.2 / 2011-05-24
|
38
|
-
|
39
|
-
- Fix CRLF file part miscalculation (Johannes Wagener)
|
40
|
-
- Fix Epilogue CRLF issue (suggestion by Neil Spring)
|
41
|
-
|
42
|
-
=== 1.1.1 / 2011-05-13
|
43
|
-
|
44
|
-
- GH# 9: Fixed Ruby 1.9.2 StringIO bug (thanks Alex Koppel)
|
45
|
-
|
46
|
-
=== 1.1.0 / 2011-01-11
|
47
|
-
|
48
|
-
- API CHANGE: UploadIO.convert! removed in favor of UploadIO.new
|
49
|
-
(Jeff Hodges)
|
50
|
-
|
51
|
-
=== 1.0.1 / 2010-04-27
|
52
|
-
|
53
|
-
- Doc updates, make gemspec based on more modern Rubygems
|
54
|
-
|
55
|
-
=== 1.0 / 2009-02-12
|
56
|
-
|
57
|
-
- Many fixes from mlooney, seems to work now. Putting the 0.9 seal of
|
58
|
-
approval on it.
|
59
|
-
|
60
|
-
=== 0.1 / 2008-08-12
|
61
|
-
|
62
|
-
* 1 major enhancement
|
63
|
-
|
64
|
-
* Birthday!
|