multipart-post 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1a26f1b06e253bdd1a96889881cd28090f1bb294754de989b5d01ee173f2251
4
- data.tar.gz: f0df38197a55f9470d21d0284fb12c16deabe86e1ab71e39f409bcbabfb9cf86
3
+ metadata.gz: f1ecac652cc8dcabe4e9cd2c7f83da1a08170324f114ba8422a414ca22e44bfb
4
+ data.tar.gz: c486ff96370ec89f3a92fdf24780f84228a5f50e227d7e1badb7f020b8b0c8f7
5
5
  SHA512:
6
- metadata.gz: 8048da79e851331b26fae693ce8e5329481c729934f3653fce804332df8b3f8edcdc566dc543a14e461ec674bb0700e87b92d26b5fe24dc4fcb13312574faf04
7
- data.tar.gz: 1323dbcffd530f36bbb14e7ca5f90033ce3bf558ef669387df855638da7a6a619b4fe355ab5b2470428edfd2bb5c1fdbd267b848a940d84a0bbcb451c341c743
6
+ metadata.gz: bd062538fab61cd651ba6624c4b78be77d9c5c072843cb104b4b3538d9d5acbb17501716ec61dc1e6095c86098a76f2f6021304c8142638166993a2162882eaf
7
+ data.tar.gz: fdb4e0833f1ee4b28e0d7d2322e1ca515ae8d8a598dfe3f6ae6986789520f593ae564174e969755be16f47e630bd44b80b95b2a145351dfdf9b89b109dd8be98
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/composite_io.rb CHANGED
@@ -11,7 +11,7 @@
11
11
  # Copyright, 2013, by Mislav Marohnić.
12
12
  # Copyright, 2013, by Leo Cassarani.
13
13
  # Copyright, 2019, by Olle Jonsson.
14
- # Copyright, 2022, by Samuel Williams.
14
+ # Copyright, 2022-2024, by Samuel Williams.
15
15
 
16
16
  warn "Top level ::CompositeIO is deprecated, require 'multipart/post' and use `Multipart::Post::CompositeReadIO` instead!"
17
17
  require_relative 'multipart/post'
@@ -13,7 +13,7 @@
13
13
  # Copyright, 2019, by Olle Jonsson.
14
14
  # Copyright, 2019, by Patrick Davey.
15
15
  # Copyright, 2021, by Lewis Cowles.
16
- # Copyright, 2021-2022, by Samuel Williams.
16
+ # Copyright, 2021-2024, by Samuel Williams.
17
17
 
18
18
  module Multipart
19
19
  module Post
@@ -33,8 +33,26 @@ module Multipart
33
33
  @index = 0
34
34
  end
35
35
 
36
+ # Close all the underyling IOs.
37
+ def close
38
+ @ios.each do |io|
39
+ io.close if io.respond_to?(:close)
40
+ end
41
+
42
+ @ios = nil
43
+ @index = 0
44
+ end
45
+
46
+ def closed?
47
+ @ios.nil?
48
+ end
49
+
36
50
  # Read from IOs in order until `length` bytes have been received.
37
51
  def read(length = nil, outbuf = nil)
52
+ if @ios.nil?
53
+ raise IOError, "CompositeReadIO is closed!"
54
+ end
55
+
38
56
  got_result = false
39
57
  outbuf = outbuf ? outbuf.replace("") : String.new
40
58
 
@@ -9,7 +9,7 @@
9
9
  # Copyright, 2013, by Socrates Vicente.
10
10
  # Copyright, 2013, by Steffen Grunwald.
11
11
  # Copyright, 2019, by Olle Jonsson.
12
- # Copyright, 2019-2022, by Samuel Williams.
12
+ # Copyright, 2019-2024, by Samuel Williams.
13
13
  # Copyright, 2019, by Patrick Davey.
14
14
  # Copyright, 2022, by Jason York.
15
15
 
@@ -62,14 +62,8 @@ module Multipart
62
62
 
63
63
  private
64
64
 
65
- if RUBY_VERSION >= "2.5.0"
66
- def symbolize_keys(hash)
67
- hash.transform_keys(&:to_sym)
68
- end
69
- else
70
- def symbolize_keys(hash)
71
- hash.map{|key,value| [key.to_sym, value]}.to_h
72
- end
65
+ def symbolize_keys(hash)
66
+ hash.transform_keys(&:to_sym)
73
67
  end
74
68
  end
75
69
  end
@@ -17,7 +17,7 @@
17
17
  # Copyright, 2019-2021, by Olle Jonsson.
18
18
  # Copyright, 2019, by Ethan Turkeltaub.
19
19
  # Copyright, 2019, by Patrick Davey.
20
- # Copyright, 2021-2022, by Samuel Williams.
20
+ # Copyright, 2021-2024, by Samuel Williams.
21
21
 
22
22
  require 'stringio'
23
23
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2022, by Samuel Williams.
4
+ # Copyright, 2022-2024, by Samuel Williams.
5
5
 
6
6
  module Multipart
7
7
  module Post
@@ -6,6 +6,6 @@
6
6
 
7
7
  module Multipart
8
8
  module Post
9
- VERSION = "2.3.0"
9
+ VERSION = "2.4.0"
10
10
  end
11
11
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2019, by Patrick Davey.
5
- # Copyright, 2021-2022, by Samuel Williams.
5
+ # Copyright, 2021-2024, by Samuel Williams.
6
6
 
7
7
  require_relative 'post/multipartable'
8
8
  require_relative 'post/upload_io'
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2009-2013, by Nick Sieger.
5
- # Copyright, 2019-2022, by Samuel Williams.
5
+ # Copyright, 2019-2024, by Samuel Williams.
6
6
 
7
7
  warn "Top level ::MultipartPost is deprecated, require 'multipart/post' and use `Multipart::Post` instead!"
8
8
  require_relative 'multipart/post'
data/lib/multipartable.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  # Copyright, 2013, by Socrates Vicente.
10
10
  # Copyright, 2013, by Steffen Grunwald.
11
11
  # Copyright, 2019, by Olle Jonsson.
12
- # Copyright, 2019-2022, by Samuel Williams.
12
+ # Copyright, 2019-2024, by Samuel Williams.
13
13
  # Copyright, 2019, by Patrick Davey.
14
14
 
15
15
  warn "Top level ::Multipartable is deprecated, require 'multipart/post' and use `Multipart::Post::Multipartable` instead!"
@@ -5,7 +5,7 @@
5
5
  # Copyright, 2008, by McClain Looney.
6
6
  # Copyright, 2019, by Olle Jonsson.
7
7
  # Copyright, 2019, by Patrick Davey.
8
- # Copyright, 2021-2022, by Samuel Williams.
8
+ # Copyright, 2021-2024, by Samuel Williams.
9
9
 
10
10
  require 'net/http'
11
11
 
data/lib/parts.rb CHANGED
@@ -16,7 +16,7 @@
16
16
  # Copyright, 2017, by Eric Hutzelman.
17
17
  # Copyright, 2019, by Olle Jonsson.
18
18
  # Copyright, 2019, by Ethan Turkeltaub.
19
- # Copyright, 2022, by Samuel Williams.
19
+ # Copyright, 2022-2024, by Samuel Williams.
20
20
 
21
21
  warn "Top level ::Parts is deprecated, require 'multipart/post' and use `Multipart::Post::Parts` instead!"
22
22
  require_relative 'multipart/post'
data/license.md CHANGED
@@ -21,7 +21,7 @@ Copyright, 2013, by Leo Cassarani.
21
21
  Copyright, 2013, by Jagtesh Chadha.
22
22
  Copyright, 2013, by Steffen Grunwald.
23
23
  Copyright, 2013, by Lonre Wang.
24
- Copyright, 2017-2023, by Samuel Williams.
24
+ Copyright, 2017-2024, by Samuel Williams.
25
25
  Copyright, 2017, by Feuda Nan.
26
26
  Copyright, 2017, by David Moles.
27
27
  Copyright, 2017, by Matt Colyer.
@@ -37,6 +37,7 @@ Copyright, 2021, by Lewis Cowles.
37
37
  Copyright, 2022, by Jason York.
38
38
  Copyright, 2022, by Takuya Noguchi.
39
39
  Copyright, 2023, by Peter Goldstein.
40
+ Copyright, 2024, by Masato Nakamura.
40
41
 
41
42
  Permission is hereby granted, free of charge, to any person obtaining a copy
42
43
  of this software and associated documentation files (the "Software"), to deal
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multipart-post
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sieger
@@ -34,6 +34,7 @@ authors:
34
34
  - Leo Cassarani
35
35
  - Lonre Wang
36
36
  - Luke Redpath
37
+ - Masato Nakamura
37
38
  - Matt Colyer
38
39
  - Mislav Marohnić
39
40
  - Peter Goldstein
@@ -73,50 +74,8 @@ cert_chain:
73
74
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
74
75
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
75
76
  -----END CERTIFICATE-----
76
- date: 2023-01-26 00:00:00.000000000 Z
77
- dependencies:
78
- - !ruby/object:Gem::Dependency
79
- name: bundler
80
- requirement: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: '0'
85
- type: :development
86
- prerelease: false
87
- version_requirements: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- version: '0'
92
- - !ruby/object:Gem::Dependency
93
- name: rspec
94
- requirement: !ruby/object:Gem::Requirement
95
- requirements:
96
- - - "~>"
97
- - !ruby/object:Gem::Version
98
- version: '3.4'
99
- type: :development
100
- prerelease: false
101
- version_requirements: !ruby/object:Gem::Requirement
102
- requirements:
103
- - - "~>"
104
- - !ruby/object:Gem::Version
105
- version: '3.4'
106
- - !ruby/object:Gem::Dependency
107
- name: covered
108
- requirement: !ruby/object:Gem::Requirement
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: '0'
113
- type: :development
114
- prerelease: false
115
- version_requirements: !ruby/object:Gem::Requirement
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- version: '0'
77
+ date: 2024-02-07 00:00:00.000000000 Z
78
+ dependencies: []
120
79
  description:
121
80
  email:
122
81
  executables: []
@@ -149,14 +108,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
108
  requirements:
150
109
  - - ">="
151
110
  - !ruby/object:Gem::Version
152
- version: 2.3.0
111
+ version: 2.5.0
153
112
  required_rubygems_version: !ruby/object:Gem::Requirement
154
113
  requirements:
155
114
  - - ">="
156
115
  - !ruby/object:Gem::Version
157
116
  version: '0'
158
117
  requirements: []
159
- rubygems_version: 3.4.1
118
+ rubygems_version: 3.5.3
160
119
  signing_key:
161
120
  specification_version: 4
162
121
  summary: A multipart form post accessory for Net::HTTP.
metadata.gz.sig CHANGED
Binary file