multipart-post 2.2.2 → 2.2.3

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: b35663b5864e84de5c0105883e785d221f5d721df8feac0f793adbe9c0778419
4
- data.tar.gz: e653f283f339ce00a3ac4446cacde77854eb751ffaea05f2ce583b70608950be
3
+ metadata.gz: a490fccc98196854246d34c31cfb5a02027e6de137056244c64243861c4300d4
4
+ data.tar.gz: f30b2512b74ff3000ca0f8d6fcc2a0fe323532049a2710870a95b3a719fe8391
5
5
  SHA512:
6
- metadata.gz: 721a3cdae109205ebcccc5cbdc2e4f1f68d10f19b9bbb94e8c4b0b2484459f3fbc73f064e517e0d86577418a30d302bb2640874dce3a473f206cc5fcbb6afc73
7
- data.tar.gz: be6ddbcbf9941f51b3906e53f1b8e429f9fad134edd43d164d33fd82c8db33c2a46a71b92559696ef6286af548222e4a0391c1156874084acf7cff7ab1229815
6
+ metadata.gz: 020ed9e1c057b7a71278c7fa3b3449084d96d3088165e8e1954175b5df28a73528fda7740a8598ed16de3ed111dd5b693d0363dced16f66d2fe48edbcdd624d0
7
+ data.tar.gz: dad4720dca5d10ff7b5806931a4ce91c2858217e4212b5d4c9355383945b4750b17e19d7290d521287f402b23108ddfb2d351215332f96579bec13156f219d71
checksums.yaml.gz.sig CHANGED
Binary file
@@ -44,11 +44,10 @@ module Multipart
44
44
 
45
45
  def initialize(path, params, headers={}, boundary = Multipartable.secure_boundary)
46
46
  headers = headers.clone # don't want to modify the original variable
47
- parts_headers = headers.delete(:parts) || {}
48
- parts_headers.transform_keys!(&:to_sym)
47
+ parts_headers = symbolize_keys(headers.delete(:parts) || {})
49
48
 
50
49
  super(path, headers)
51
- parts = params.transform_keys(&:to_sym).map do |k,v|
50
+ parts = symbolize_keys(params).map do |k,v|
52
51
  case v
53
52
  when Array
54
53
  v.map {|item| Parts::Part.new(boundary, k, item, parts_headers[k]) }
@@ -67,6 +66,18 @@ module Multipart
67
66
  end
68
67
 
69
68
  attr :boundary
69
+
70
+ private
71
+
72
+ if RUBY_VERSION >= "2.5.0"
73
+ def symbolize_keys(hash)
74
+ hash.transform_keys(&:to_sym)
75
+ end
76
+ else
77
+ def symbolize_keys(hash)
78
+ hash.map{|key,value| [key.to_sym, value]}.to_h
79
+ end
80
+ end
70
81
  end
71
82
  end
72
83
  end
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Multipart
24
24
  module Post
25
- VERSION = "2.2.2"
25
+ VERSION = "2.2.3"
26
26
  end
27
27
  end
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.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sieger
@@ -71,7 +71,7 @@ cert_chain:
71
71
  RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
72
72
  HiLJ8VOFx6w=
73
73
  -----END CERTIFICATE-----
74
- date: 2022-06-09 00:00:00.000000000 Z
74
+ date: 2022-06-10 00:00:00.000000000 Z
75
75
  dependencies:
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: bundler
@@ -87,20 +87,6 @@ dependencies:
87
87
  - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
- - !ruby/object:Gem::Dependency
91
- name: rake
92
- requirement: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- type: :development
98
- prerelease: false
99
- version_requirements: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
90
  - !ruby/object:Gem::Dependency
105
91
  name: rspec
106
92
  requirement: !ruby/object:Gem::Requirement
@@ -144,14 +130,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
130
  requirements:
145
131
  - - ">="
146
132
  - !ruby/object:Gem::Version
147
- version: 2.6.0
133
+ version: 2.3.0
148
134
  required_rubygems_version: !ruby/object:Gem::Requirement
149
135
  requirements:
150
136
  - - ">="
151
137
  - !ruby/object:Gem::Version
152
138
  version: '0'
153
139
  requirements: []
154
- rubygems_version: 3.3.8
140
+ rubygems_version: 3.1.6
155
141
  signing_key:
156
142
  specification_version: 4
157
143
  summary: A multipart form post accessory for Net::HTTP.
metadata.gz.sig CHANGED
Binary file