httmultiparty 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/httmultiparty.rb +6 -2
- data/lib/httmultiparty/version.rb +1 -1
- metadata +2 -2
data/lib/httmultiparty.rb
CHANGED
@@ -8,9 +8,13 @@ module HTTMultiParty
|
|
8
8
|
TRANSFORMABLE_TYPES = [File, Tempfile]
|
9
9
|
|
10
10
|
QUERY_STRING_NORMALIZER = Proc.new do |params|
|
11
|
-
|
12
|
-
|
11
|
+
multipart = false
|
12
|
+
result = HTTMultiParty.flatten_params(params).map do |(k,v)|
|
13
|
+
multipart ||= TRANSFORMABLE_TYPES.include?(v.class)
|
14
|
+
[k, multipart ? HTTMultiParty.file_to_upload_io(v) : v]
|
13
15
|
end
|
16
|
+
|
17
|
+
multipart ? result : HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER.call(params)
|
14
18
|
end
|
15
19
|
|
16
20
|
def self.included(base)
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: httmultiparty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.9
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Johannes Wagener
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2013-04-01 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: httparty
|